Skip to content

kami4ka/LogicImmoScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logic-Immo Scraper

A Python scraper for extracting real estate property listings from Logic-Immo.com, one of France's leading real estate portals.

Features

  • 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

Requirements

Installation

  1. Clone the repository:
git clone https://github.com/kami4ka/LogicImmoScraper.git
cd LogicImmoScraper
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set your ScrapingAnt API key:
export SCRAPINGANT_API_KEY="your_api_key_here"

Usage

Basic Usage

Scrape apartments for sale in Paris:

python main.py --location paris --property apartment

Command Line Options

usage: 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

Examples

Scrape rental houses in Lyon:

python main.py --location lyon --contract rent --property house

Scrape first 3 pages of listings in Marseille:

python main.py --location marseille --max-pages 3

Scrape up to 100 properties in Toulouse (quick mode, no details):

python main.py --location toulouse --limit 100 --no-details

Output

The 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

Project Structure

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

API Usage

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}€")

License

MIT License

Disclaimer

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.

About

Python scraper for Logic-Immo.com French real estate portal using ScrapingAnt API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages