A Python scraper for extracting property listings from immonet.de using the ScrapingAnt API.
- Scrapes property listings from immonet.de for major German cities
- Supports multiple property types (houses, apartments, land, commercial, office)
- Parallel scraping for improved performance
- Extracts 12+ property attributes including price, area, location, energy rating
- Exports data to CSV format
- Rate limiting and retry logic for reliability
- Clone the repository:
git clone https://github.com/ScrapingAnt/ImmonetScraper.git
cd ImmonetScraper- Create a virtual environment and install dependencies:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt- Set your ScrapingAnt API key in
config.py:
SCRAPINGANT_API_KEY = "your-api-key-here"# Scrape houses in Hamburg
python main.py hamburg
# Scrape apartments in Berlin with limit
python main.py berlin --type apartment --limit 50
# Scrape with custom output file
python main.py munich --type house --output munich_houses.csv
# Enable verbose logging
python main.py hamburg -v| Option | Description |
|---|---|
city |
City name (required) - see supported cities below |
--type, -t |
Property type: house, apartment, land, commercial, office (default: house) |
--output, -o |
Output CSV file path |
--limit, -l |
Limit number of properties to scrape |
--max-workers, -w |
Maximum parallel requests (default: 10) |
--verbose, -v |
Enable verbose logging |
Berlin, Hamburg, Munich/München, Cologne/Köln, Frankfurt, Stuttgart, Dusseldorf/Düsseldorf, Dortmund, Essen, Leipzig, Bremen, Dresden, Hanover/Hannover, Nuremberg/Nürnberg, Duisburg, Bonn
The scraper exports data to CSV with the following fields:
| 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² |
| rooms | Number of rooms |
| location | Location/district |
| postal_code | German postal code (5 digits) |
| property_type | Type of property |
| year_built | Year of construction |
| energy_rating | Energy efficiency class (A-H) |
| heating_type | Type of heating system |
| condition | Property condition |
| commission | Broker commission info |
This scraper uses the ScrapingAnt API for web scraping. Configuration options in config.py:
SCRAPINGANT_API_KEY: Your API keyDEFAULT_MAX_WORKERS: Parallel request limit (default: 10)DEFAULT_TIMEOUT: Request timeout in seconds (default: 60)MAX_RETRIES: Number of retry attempts (default: 3)
MIT License