A Python scraper for Immowelt.de property listings using the ScrapingAnt API. It extracts detailed property information including price, location, size, energy rating, and more.
- Scrape property listings from any supported German city
- Support for multiple property types (houses, apartments, land, commercial, etc.)
- Parallel execution for fast scraping
- Extract 13 property attributes per listing
- CSV export with German number formatting handled
- Residential German proxies for reliable scraping
- Python 3.10+
- ScrapingAnt API key
-
Clone this repository or download the files
-
Create a virtual environment (recommended):
python3 -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Add your ScrapingAnt API key to
config.py:SCRAPINGANT_API_KEY = "<YOUR_SCRAPINGANT_API_KEY>"
- Go to ScrapingAnt
- Click Sign Up or Get Started Free
- Create an account using email or Google/GitHub OAuth
- After registration, navigate to your Dashboard
- Find your API key in the API Key section
- Copy the API key and paste it into
config.py
Note: ScrapingAnt offers a free tier with limited API credits. For production usage, consider upgrading to a paid plan.
python main.py hamburgpython main.py berlin --type apartmentpython main.py munich --limit 50python main.py cologne -o cologne_properties.csvpython main.py frankfurt --verbose --max-workers 5python main.py --help| Argument | Description | Default |
|---|---|---|
city |
City name to search | Required |
--type, -t |
Property type | house |
--output, -o |
Output CSV file | {city}{type}{date}.csv |
--limit, -l |
Max properties to scrape | None (all) |
--max-workers, -w |
Parallel requests | 5 |
--verbose, -v |
Enable debug output | False |
Berlin, Hamburg, Munich, Cologne, Frankfurt, Stuttgart, Dusseldorf, Dortmund, Essen, Leipzig, Bremen, Dresden, Hanover, Nuremberg, Duisburg
| Type | Description |
|---|---|
house |
Houses (Häuser) |
apartment |
Apartments (Wohnungen) |
land |
Land plots (Grundstücke) |
commercial |
Commercial properties |
office |
Office spaces |
gastronomy |
Gastronomy businesses |
Each property listing includes:
| Field | Description |
|---|---|
url |
Property listing URL |
price |
Purchase price in EUR |
price_per_sqm |
Price per square meter |
living_area |
Living area in m² |
plot_size |
Plot size in m² |
location |
District and city |
postal_code |
German postal code |
property_type |
Type of property |
year_built |
Year of construction |
energy_rating |
Energy efficiency class (A+ to H) |
heating_type |
Type of heating system |
energy_source |
Energy source |
commission |
Buyer's commission |
The script will:
- Fetch the first search page to get total listings count
- Fetch remaining pages in parallel to collect all property URLs
- Scrape each property detail page in parallel
- Export results to CSV file
- Print a summary with property count
Example output:
==================================================
Scraping Complete!
==================================================
City: Hamburg
Property Type: house
Properties Found: 1641
Output File: hamburg_house_20251220.csv
==================================================
- Builds search URL with city code and property type filters
- Fetches first page via ScrapingAnt API with German residential proxies
- Extracts total count and property URLs from search results
- Fetches remaining pages in parallel using ThreadPoolExecutor
- Collects all unique property expose URLs
- Scrapes each property detail page in parallel
- Parses HTML to extract all property attributes
- Exports structured data to CSV
- 423 errors: The scraper uses residential German proxies to avoid bot detection
- Missing data: Some fields may be empty if not provided by the seller
- Rate limiting: Reduce
--max-workersif you encounter 429 errors - API errors: Verify your API key is correct and has available credits
MIT License