DEV Community

Devil Scrapes
Devil Scrapes

Posted on

How to Scrape leboncoin Car Listings (France) to JSON/CSV

Quick answer: Use the leboncoin France Car Scraper on Apify. Paste a filtered leboncoin.fr Voitures search URL, set maxResults, and the Actor walks the result pages and returns structured rows — price in EUR, brand, model, year, mileage, fuel, gearbox, Crit'Air sticker, seller, location, and photos — as a JSON or CSV dataset. No API key, no local scraping stack to configure.

Why scrape leboncoin for car listings?

leboncoin.fr is France's largest classifieds marketplace and the default venue for millions of French used-car transactions each year. The Voitures section carries hundreds of thousands of live listings from private sellers and professional dealers alike. There is no public API — structured data access means extracting it from the search pages.

That extraction is not straightforward. leboncoin is fronted by bot protection. Datacenter IP ranges get challenged or blocked. The listing data is embedded in JSON inside server-rendered HTML, paginated at 35 results per page. The French automotive classification has its own vocabulary: Crit'Air air-quality stickers (a regulatory requirement for driving in low-emission zones), horsepower measured in chevaux, fuel types like Essence and Hybride. The Actor handles all of it and delivers clean, typed rows.

What fields does the scraper return?

Every row maps exactly to the ResultRow Pydantic class in the Actor source. Here is a realistic sample row:

{
  "listing_id": "3117822207",
  "listing_url": "https://www.leboncoin.fr/ad/voitures/3117822207",
  "title": "Morris Mini COOPER 1275 S",
  "make": "MORRIS",
  "model": "Autre",
  "year": 1968,
  "price": 34900,
  "currency": "EUR",
  "mileage_km": 101890,
  "fuel_type": "Essence",
  "transmission": "Manuelle",
  "engine_power_hp": null,
  "engine_size_cc": null,
  "body_type": "Citadine",
  "color": "Vert",
  "first_registration": "07/1968",
  "location": "Saint-Jean-du-Cardonnay",
  "region": "Seine-Maritime",
  "postcode": "76150",
  "seller_type": "dealer",
  "seller_name": "MECA SPORT",
  "critair": "Non classé",
  "photo_urls": [
    "https://img.leboncoin.fr/api/v1/lbcpb1/images/12/99/eb/1299eb9f07aa41b5f0430ce684d22b4e689dc47c.jpg?rule=ad-image"
  ],
  "description": "Magnifique Morris Mini Cooper 1275 S restaurée.",
  "posted_date": "2025-12-26 14:04:00",
  "scraped_at": "2026-06-02T00:00:00+00:00"
}
Enter fullscreen mode Exit fullscreen mode

The full field set is: listing_id, listing_url, title, make, model, year, price, currency (always EUR), mileage_km, fuel_type, transmission, engine_power_hp, engine_size_cc, body_type, color, first_registration, location, region, postcode, seller_type, seller_name, critair, photo_urls, description, posted_date, and scraped_at. The description field comes from the search payload; when enrichDetails is on, it is re-fetched from the detail page for the freshest copy.

What does it cost to scrape leboncoin listings? 💰

Pricing is Pay-Per-Event — you pay only when rows land in the dataset.

Event Price
actor-start (one-off per run) $0.05
result-row (per car listing) $0.002

1,000 results in a single run costs $2.05 ($0.05 start + 1,000 × $0.002). Every new Apify account receives $5 of free credit — enough to pull your first couple of thousand listings before you spend anything. No credit card required to begin.

How does the anti-blocking work?

leboncoin.fr is fronted by bot protection. Residential proxy sessions are not optional — they are required for reliable access. Here is what we do so you do not have to:

  • We rotate Chrome, Firefox, and Safari TLS fingerprints on every request using curl-cffi browser impersonation. The site's protection stack sees a real browser handshake, not a Python HTTP client.
  • We rotate residential proxy sessions through Apify Proxy on every block — a fresh session ID and a fresh French exit IP, automatically.
  • We retry on 408, 429, and 5xx responses with exponential backoff (starting at two seconds, capped at thirty, up to five attempts per page), honouring Retry-After headers.
  • When the site pushes back, we slow down rather than triggering a harder block. Partial runs surface with a clear status message; we never return empty data with a green status.

The default proxy config already requests RESIDENTIAL exits. You do not need to configure anything.

How to run the scraper from Python 🔥

Install the apify-client library and call the Actor:

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")

run_input = {
    "searchUrl": "https://www.leboncoin.fr/recherche?category=2&brand=Peugeot&vehicle_type=4",
    "maxResults": 300,
    "enrichDetails": True,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

run = client.actor("DevilScrapes/leboncoin-france-cars").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["make"], item["model"], item["price"], item["mileage_km"], item["critair"])
Enter fullscreen mode Exit fullscreen mode

To target a specific search, apply your filters on leboncoin.fr, copy the URL, and paste it into searchUrl. The Actor walks result pages from there. Set enrichDetails to False if you only need the search-payload fields — price, brand, model, year, mileage, fuel, gearbox, colour, seller, location, and photos — and want to halve the request count.

What are the main use cases?

Used-car price analytics for the French market

Pull listings for a specific make and model, export to CSV, and load into your analysis tool of choice. leboncoin's depth in the private-seller segment gives a view of French retail pricing that dealer-only datasets miss.

Crit'Air label composition research

France's Crit'Air system classifies vehicles from label 0 (fully electric) through to Non classé for the oldest polluters. Low-emission zones in Paris, Lyon, and other major cities restrict entry by Crit'Air label. The critair field lets you aggregate the sticker distribution across any filtered search — useful for policy research, fleet management planning, or market forecasting.

Dealer inventory monitoring

Filter seller_type to dealer, set a daily schedule, and diff successive datasets by listing_id to catch new arrivals and price cuts. seller_name, location, and postcode let you segment by dealer and geography.

Cross-border arbitrage from France

French private-seller prices, especially on diesel estates and older luxury cars, can diverge meaningfully from equivalent listings in neighbouring markets. A dataset filtered by fuel_type, year, and mileage_km gives importers a current benchmark.

Lead generation: French car dealers

Dealer listings carry seller_name and the dealer's location and postcode. Run a broad sweep across the Voitures section and you have a structured directory of active French car dealers, filterable by region.

FAQ

Is it legal to scrape leboncoin.fr?

The Actor accesses publicly visible listing data — the same data any browser user sees without logging in. leboncoin's terms of service govern automated access; review them for your jurisdiction and use case before running at scale. We recommend responsible pacing and legitimate analytical use.

Why does this Actor require a residential proxy?

leboncoin.fr's bot protection challenges or blocks datacenter IP ranges. Residential exit IPs from Apify Proxy ride past this reliably. The default proxy configuration already requests RESIDENTIAL — you do not need to change anything.

What is the Crit'Air field?

The Crit'Air (Certificat Qualité de l'Air) is a French government air-quality sticker required for driving in designated low-emission zones (Zones à Faibles Émissions). It is published on listings where the seller has declared it. Values include 0, 1, 2, 3, 4, 5, and Non classé. Not all listings include it.

How much does 5,000 listings cost?

$0.05 (start) + 5,000 × $0.002 = $10.05 for one run of 5,000 results.

How often can I run it?

As often as you need. Schedule in the Apify Console with a cron expression. The Apify API lets you access and diff successive datasets programmatically.

Start collecting French car listing data

The leboncoin France Car Scraper is live on the Apify Store. Click Try for free — $5 of credit included, no card required.

Your first dataset is minutes away. If you hit an edge case or need an additional field, open an issue on the Actor's Issues tab and we'll address it in the next weekly release.

Resources:

Top comments (0)