A Python scraper for extracting real estate property listings from Logic-Immo.com, one of France's leading real estate portals.
- Scrape property listings from Logic-Immo search results
- Extract detailed property information from individual listing pages
- Support for multiple French cities (Paris, Lyon, Marseille, Toulouse, Nice, Bordeaux, Lille, Nantes, Strasbourg, Montpellier)
- Filter by contract type (buy/rent) and property type (apartment, house, etc.)
- Parallel scraping for faster data collection
- Export results to CSV format
- Configurable pagination and result limits
- Python 3.8+
- ScrapingAnt API key (Get one here)
- Clone the repository:
git clone https://github.com/kami4ka/LogicImmoScraper.git
cd LogicImmoScraper- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set your ScrapingAnt API key:
export SCRAPINGANT_API_KEY="your_api_key_here"Scrape apartments for sale in Paris:
python main.py --location paris --property apartmentusage: main.py [-h] [--location LOCATION] [--contract {buy,rent}]
[--property {all,apartment,house,parking,land,commercial,office,building}]
[--output OUTPUT] [--limit LIMIT] [--max-pages MAX_PAGES]
[--max-workers MAX_WORKERS] [--no-details] [--api-key API_KEY]
[--verbose]
Options:
-h, --help Show this help message and exit
--location, -l Location to search (default: paris)
Available: paris, lyon, marseille, toulouse, nice,
bordeaux, lille, nantes, strasbourg, montpellier
--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: 5)
--no-details Skip fetching detail pages (faster but less data)
--api-key, -k ScrapingAnt API key (overrides environment variable)
--verbose, -v Enable verbose logging
Scrape rental houses in Lyon:
python main.py --location lyon --contract rent --property houseScrape first 3 pages of listings in Marseille:
python main.py --location marseille --max-pages 3Scrape up to 100 properties in Toulouse (quick mode, no details):
python main.py --location toulouse --limit 100 --no-detailsThe scraper exports data to a CSV file with the following fields:
| Field | Description |
|---|---|
| url | Property listing URL |
| listing_id | Unique listing identifier |
| reference | Agency reference number |
| title | Property title |
| property_type | Type (Apartment, House, etc.) |
| contract_type | Buy or Rent |
| price | Price in euros |
| price_per_sqm | Price per square meter |
| city | City name |
| district | District/neighborhood |
| postal_code | Postal code |
| full_address | Full address |
| rooms | Number of rooms |
| bedrooms | Number of bedrooms |
| bathrooms | Number of bathrooms |
| living_area | Living area in m² |
| floor | Floor number |
| has_elevator | Has elevator |
| has_parking | Has parking |
| has_cellar | Has cellar |
| has_balcony | Has balcony |
| has_terrace | Has terrace |
| has_garden | Has garden |
| is_furnished | Is furnished |
| energy_rating | Energy rating (A-G) |
| ges_rating | GES rating |
| year_built | Year of construction |
| description | Property description |
| agency_name | Real estate agency name |
| agent_name | Agent name |
| agency_address | Agency address |
| is_new | Is new construction |
| is_exclusive | Is exclusive listing |
| published_date | Publication date |
| date_scraped | Scraping timestamp |
LogicImmoScraper/
├── config.py # Configuration and constants
├── models.py # Data models
├── utils.py # Parsing utilities
├── scraper.py # Main scraper class
├── main.py # CLI entry point
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore file
└── README.md # This file
You can also use the scraper programmatically:
from scraper import LogicImmoScraper
# Initialize scraper
scraper = LogicImmoScraper(api_key="your_api_key")
# Scrape properties
properties = scraper.scrape(
location="paris",
contract_type="buy",
property_type="apartment",
max_pages=2,
fetch_details=True
)
# Access property data
for prop in properties:
print(f"{prop.title}: {prop.price}€")MIT License
This scraper is intended for educational and research purposes. Please respect Logic-Immo's terms of service and robots.txt. Use responsibly and consider rate limiting your requests.