A Python scraper for extracting property listings from SeLoger.com (France's #1 real estate portal) using the ScrapingAnt API.
- Scrapes apartments, houses, and other property types
- Supports buy and rent listings
- Covers all major French cities (Paris, Lyon, Marseille, etc.)
- Parallel scraping for improved performance
- Extracts 35+ property attributes including price, area, rooms, location, amenities
- Uses CSS selectors for reliable data extraction
- Exports data to CSV format
- Rate limiting and retry logic for reliability
- Clone the repository:
git clone https://github.com/kami4ka/SelogerScraper.git
cd SelogerScraper- 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 sale in Paris
python main.py --location paris --property apartment
# Scrape houses for rent in Lyon
python main.py --location lyon --contract rent --property house
# Scrape with page limit
python main.py --location marseille --max-pages 5
# Scrape with property limit
python main.py --location toulouse --limit 100
# Enable verbose logging
python main.py --location nice --max-pages 3 -v| Option | Description |
|---|---|
--location, -l |
Location to search (default: paris) |
--contract, -c |
Contract type: buy or rent (default: buy) |
--property, -p |
Property type (default: all) |
--output, -o |
Output CSV file path (default: properties.csv) |
--limit |
Maximum number of properties to scrape |
--max-pages |
Maximum number of listing pages to scrape |
--max-workers, -w |
Maximum parallel requests (default: 10) |
--api-key, -k |
ScrapingAnt API key (overrides environment variable) |
--verbose, -v |
Enable verbose logging |
| Type | Description |
|---|---|
all |
All properties (apartments + houses) |
apartment |
Apartments |
house |
Houses |
land |
Land/Plots |
parking |
Parking spaces |
office |
Offices |
commercial |
Commercial properties |
paris- Parislyon- Lyonmarseille- Marseilletoulouse- Toulousenice- Nicenantes- Nantesmontpellier- Montpellierstrasbourg- Strasbourgbordeaux- Bordeauxlille- Lille
The scraper exports data to CSV with the following fields:
| Field | Description |
|---|---|
| url | Property listing URL |
| listing_id | Unique listing identifier |
| title | Property title |
| property_type | Type (Apartment, House, etc.) |
| contract_type | Buy or Rent |
| price | Listed price in EUR |
| price_per_sqm | Price per square meter |
| city | City name |
| district | District/neighborhood name |
| postal_code | Postal code |
| rooms | Number of rooms |
| bedrooms | Number of bedrooms |
| living_area | Living area in m² |
| floor | Floor level |
| total_floors | Total floors in building |
| kitchen_type | Kitchen type |
| storage | Storage/cellar info |
| wc | Number of WCs |
| balcony | Balcony availability |
| terrace | Terrace availability |
| garden | Garden availability |
| parking | Parking availability |
| elevator | Elevator availability |
| exposure | Sun exposure |
| ambiance | Property ambiance |
| energy_rating | Energy certificate class (A-G) |
| emissions_rating | GES emissions class (A-G) |
| year_built | Year of construction |
| heating_type | Heating type |
| energy_source | Energy source |
| price_without_fees | Price excluding agency fees |
| agency_fees | Agency fees amount |
| agency_fees_percent | Agency fees percentage |
| notary_fees | Estimated notary fees |
| energy_bill_min | Min annual energy cost |
| energy_bill_max | Max annual energy cost |
| copro_charges | Annual co-ownership charges |
| copro_lots | Number of co-ownership lots |
| copro_procedures | Co-ownership procedures status |
| description | Property description |
| agency_name | Real estate agency name |
| reference | Agency reference number |
| date_scraped | Scraping timestamp |
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: 120)MAX_RETRIES: Number of retry attempts (default: 3)
MIT License