A Python scraper for extracting property listings from Otodom.pl (Poland's largest real estate portal) using the ScrapingAnt API.
- Scrapes apartments, houses, rooms, land, and commercial properties
- Supports rental and sale listings
- Covers all 16 Polish voivodeships and 25+ major cities
- Parallel scraping for improved performance
- Extracts 20+ property attributes including price, area, rooms, location, amenities
- Exports data to CSV format
- Rate limiting and retry logic for reliability
- Clone the repository:
git clone https://github.com/kami4ka/OtodomScraper.git
cd OtodomScraper- 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# Scrape apartments for rent in Warsaw
python main.py --category rent --location warszawa
# Scrape houses for sale in Krakow
python main.py --category house-buy --location krakow --limit 100
# Scrape rooms for rent in Wroclaw with custom output
python main.py --category room-rent --location wroclaw --output wroclaw_rooms.csv
# Enable verbose logging
python main.py --category rent --location gdansk -v| Option | Description |
|---|---|
--category, -c |
Property category (default: rent) |
--location, -l |
City/region to search in (optional) |
--output, -o |
Output CSV file path (default: properties.csv) |
--limit |
Maximum number of properties to scrape |
--max-pages |
Maximum number of pages to scrape |
--max-workers, -w |
Maximum parallel requests (default: 10) |
--api-key, -k |
ScrapingAnt API key (overrides config) |
--verbose, -v |
Enable verbose logging |
| Category | Description |
|---|---|
rent, apartment-rent |
Apartments for rent |
house-rent |
Houses for rent |
room-rent |
Rooms for rent |
land-rent |
Land for rent |
commercial-rent |
Commercial properties for rent |
garage-rent |
Garages for rent |
buy, apartment-buy |
Apartments for sale |
house-buy |
Houses for sale |
land-buy |
Land for sale |
commercial-buy |
Commercial properties for sale |
garage-buy |
Garages for sale |
All of Poland: polska, all
Voivodeships: dolnoslaskie, kujawsko-pomorskie, lubelskie, lubuskie, lodzkie, malopolskie, mazowieckie, opolskie, podkarpackie, podlaskie, pomorskie, slaskie, swietokrzyskie, warminsko-mazurskie, wielkopolskie, zachodniopomorskie
Major Cities: Warszawa (Warsaw), Kraków (Cracow), Wrocław, Poznań, Gdańsk, Łódź, Szczecin, Bydgoszcz, Lublin, Katowice, Białystok, Gdynia, Częstochowa, Radom, Toruń, Rzeszów, Kielce, Gliwice, Olsztyn, Zabrze, Bytom, Zielona Góra, Opole
The scraper exports data to CSV with the following fields:
| Field | Description |
|---|---|
| url | Property listing URL |
| title | Property title/description |
| listing_id | Otodom listing ID |
| price | Listed price in PLN |
| price_currency | Currency (zł/PLN) |
| additional_rent | Monthly additional rent (czynsz) |
| deposit | Security deposit (kaucja) |
| living_area | Living area in m² |
| rooms | Number of rooms |
| floor | Floor level |
| total_floors | Total floors in building |
| address | Full address |
| street | Street name |
| district | District/neighborhood |
| city | City name |
| voivodeship | Voivodeship (region) |
| property_type | Property type |
| heating | Type of heating system |
| condition | Property condition |
| available_from | Availability date |
| advertiser_type | Advertiser type (prywatny/biuro) |
| advertiser_name | Advertiser name |
| amenities | Available amenities |
| description | Property description |
| last_updated | Last update date |
This scraper uses the ScrapingAnt API for web scraping. You can provide the API key via:
- Environment variable:
export SCRAPINGANT_API_KEY=your_key - Command line:
--api-key YOUR_KEY
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