# Leboncoin.fr Car Scraper - France Used Car Listings (`rastriq/leboncoin-scraper`) Actor

Scrape used car ads from leboncoin.fr, France's largest classifieds site: make, model, year, mileage, horsepower, price in EUR, fuel, gearbox, city, region and dealer/private flag. Fast HTTP scraper, no browser.

- **URL**: https://apify.com/rastriq/leboncoin-scraper.md
- **Developed by:** [Rastriq — Structured data from the world](https://apify.com/rastriq) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 60.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 car listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Leboncoin.fr Car Scraper: French used car ads to JSON, CSV or Excel

**Leboncoin.fr Car Scraper** extracts used car ads from the *Voitures* category of [leboncoin](https://www.leboncoin.fr/c/voitures), France's largest classifieds site, with more than 800,000 cars for sale at any time from private sellers and dealers. Type a brand or model such as `Peugeot 3008`, or leave the search empty to export the newest ads of the whole car category. For every ad you get the make, model, year, mileage in kilometres, DIN horsepower, asking price in euros, fuel type, gearbox, city, region, whether the seller is a dealer or a private person, the main photo and the ad URL.

The scraper sends plain HTTP requests with a real Chrome browser fingerprint instead of driving a headless browser. A page of 35 ads takes a few seconds, the actor needs only 256 MB of memory, and it starts with Apify's standard datacenter proxy. If leboncoin's anti-bot blocks every datacenter IP, the run switches to a French residential IP on its own, at no extra cost to you. No login and no cookies are required.

### What data does the leboncoin scraper extract?

Each ad becomes one row in the dataset with these fields:

| Field | Description | Example |
|---|---|---|
| `id` | Leboncoin ad ID | `3271279325` |
| `title` | Ad title as written by the seller | `Renault SCENIC III Authentique 1.2 TCE 116` |
| `make` | Car make, from leboncoin's structured ad attributes (not guessed from the title) | `Renault` |
| `model` | Car model, from the same attributes | `Scenic` |
| `year` | Year of first registration | `2013` |
| `km` | Mileage in kilometres | `63000` |
| `hp` | DIN horsepower (*ch DIN*); `null` when the seller left it empty | `116` |
| `price` | Asking price | `6990` |
| `currency` | Always `EUR` | `EUR` |
| `fuel_type` | Fuel as labelled on leboncoin: `Essence`, `Diesel`, `Hybride`, `Électrique`… | `Essence` |
| `gearbox` | `Manuelle` or `Automatique` | `Manuelle` |
| `city` | City of the ad | `Bruay-la-Buissière` |
| `region` | French region of the ad | `Nord-Pas-de-Calais` |
| `is_professional` | `true` for dealers (pro accounts), `false` for private sellers | `true` |
| `img_url` | Main photo URL | `https://img.leboncoin.fr/api/v1/...` |
| `url` | Link to the ad on leboncoin.fr | `https://www.leboncoin.fr/ad/voitures/3271279325` |
| `source` | Always `leboncoin.fr` | `leboncoin.fr` |
| `scraped_at` | Extraction time, ISO 8601 in UTC | `2026-11-14T07:52:41+00:00` |

All fields come from the search result pages. The scraper does not open individual ads, so it does not return the full description, the equipment list or the full photo gallery. It never collects seller names, phone numbers or e-mail addresses.

### Use cases

- **Used car price research.** Compare asking prices for a model across years, mileage bands and regions of France.
- **Dealer and trade-in pricing.** Benchmark your stock against what private sellers and other dealers are asking on the biggest French marketplace.
- **Market monitoring.** Schedule a daily run on a brand or model and track new ads, price drops and supply over time.
- **Private versus dealer supply.** The `is_professional` flag separates dealer stock from private sellers, which is useful for lead generation and market share analysis.
- **Data for valuation models.** Clean, typed columns (integers for year, mileage and horsepower, a number for the price) feed straight into a spreadsheet, a database or a machine-learning pipeline.
- **Cross-border comparison.** The output columns match our other European car marketplace scrapers, so French prices can be compared with Spain, Germany, the Netherlands or Scandinavia without remapping.

### How to use the Leboncoin.fr Car Scraper

1. Click **Try for free** (or **Start**) on this page.
2. In **Search text**, type a brand, a model or both, for example `Peugeot`, `Clio` or `Tesla Model 3`. Leave it empty to scrape the whole car category.
3. Set **Max search pages**. Each page holds up to 35 ads; one page is enough for a first test.
4. Keep the default **Apify proxy** setting.
5. Start the run and download the results as JSON, CSV, Excel or HTML, or read them through the Apify API.

You can also run the actor from your own code with the [Apify API](https://docs.apify.com/api/v2), the Python or JavaScript client, or connect it to Make, Zapier, n8n or Google Sheets through Apify integrations.

### Input example

```json
{
  "brand": "Peugeot",
  "max_pages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

| Input | Meaning |
|---|---|
| `brand` | Free-text search inside the car category, exactly like the leboncoin search box. Optional. |
| `max_pages` | Number of result pages to read (35 ads per page). Default 3. |
| `proxyConfiguration` | Apify proxy settings. The datacenter proxy is enough. |

### Output example

One item from a real run (the photo URL is shortened):

```json
{
  "id": "3271279325",
  "title": "Renault SCENIC III Authentique 1.2 TCE 116 2EME MAIN/SUIVI COMPLET",
  "make": "Renault",
  "model": "Scenic",
  "year": 2013,
  "km": 63000,
  "hp": 116,
  "price": 6990,
  "currency": "EUR",
  "fuel_type": "Essence",
  "gearbox": "Manuelle",
  "city": "Bruay-la-Buissière",
  "region": "Nord-Pas-de-Calais",
  "is_professional": true,
  "url": "https://www.leboncoin.fr/ad/voitures/3271279325",
  "img_url": "https://img.leboncoin.fr/api/v1/lbcpb1/images/1f/e1/41/....jpg?rule=ad-image",
  "source": "leboncoin.fr",
  "scraped_at": "2026-11-14T07:52:41.614290+00:00"
}
```

In the Apify Console the dataset has two ready-made views: **Overview** (the main columns in a table) and **Price and photo** (photo, make, model, year, mileage and price).

### How much does it cost to scrape leboncoin?

The actor uses pay-per-event pricing: you pay a small fee when a run starts and then a fixed price for each car ad saved to the dataset. Platform usage (compute and proxy) is included in that price, so the cost of a run is predictable: it depends only on the number of ads you get. Current prices are shown in the **Pricing** tab of this page.

Because the scraper does not start a browser, it is cheap to run: a page of 35 ads finishes in about ten seconds with 256 MB of memory. Use **Max search pages** as your cost cap: 1 page is up to 35 ads, 10 pages up to 350.

### Limits and good to know

- **100 pages per search.** Leboncoin shows at most 100 result pages (about 3,500 ads) for a single search. To export more, split the work into several narrower searches, for example one run per brand or per model.
- **Text search, not an exact brand filter.** The search text is matched against the ad, as on the website. Most results are the brand you typed, but an ad of another brand that mentions it (for example a part-exchange note) can appear. Filter on the `make` column when you need an exact brand.
- **Duplicates are removed** within a run: an ad that appears on two pages is saved once.
- **Anti-bot protection.** Leboncoin is protected by DataDome. When a request is challenged, the scraper drops the session and retries with a new proxy IP, up to three times per page. The number of challenges is written in the run log and status message. If leboncoin blocks every attempt, the run fails with a clear message instead of quietly finishing with an empty dataset.
- **France only.** The scraper reads leboncoin.fr. Prices are in euros as published.
- **Search cards only.** Fields that leboncoin shows only on the ad page (description, options, seller details) are not extracted.

### FAQ

**Do I need a residential proxy?**
No. The scraper starts with Apify's datacenter proxy and, when leboncoin challenges every datacenter IP, falls back automatically to a residential proxy in France within the same run. Proxy costs are included in the price per ad, so you do not need to change anything.

**Can I filter by brand, price or year?**
The input offers the free-text search used on leboncoin, which covers brands and models. Price, year and mileage filters are not available as inputs; filter the dataset after the run, which is easy because these columns are typed numbers.

**How fresh is the data?**
Every run reads leboncoin live. Results come in the site's default order, newest ads first, so a scheduled daily run on the same search gives you the latest supply.

**Does it scrape private sellers' contact details?**
No. The output contains vehicle data, the price, the city and region of the ad and a dealer/private flag. It never returns names, phone numbers or e-mail addresses.

**Can I schedule it?**
Yes. Create a task with your search and attach an Apify schedule, for example every morning. Combine it with a webhook or an integration to push new ads to Google Sheets, Slack or your database.

**Is scraping leboncoin legal?**
The actor extracts publicly available ads without logging in. You are responsible for how you use the data: respect leboncoin's terms of use and the GDPR, especially if you combine the data with other sources.

**Something does not work. What should I do?**
Open an issue in the **Issues** tab with the run ID. A run that fails with "0 items extracted" means leboncoin blocked both the datacenter and the residential IPs; retrying later normally solves it.

# Changelog

This Actor's version history is a separate document: https://apify.com/rastriq/leboncoin-scraper/changelog.md

# Actor input Schema

## `brand` (type: `string`):

Free-text search inside the leboncoin car category, exactly as typed in the leboncoin search box: a brand (`Peugeot`), a model (`Clio`) or both (`Peugeot 3008`). Leboncoin matches the text against the ad, so a few ads of other brands that mention it can appear; filter on the `make` column if you need an exact brand. Leave empty to scrape the whole car category, newest ads first.

## `max_pages` (type: `integer`):

Number of result pages to read. Each page holds up to 35 ads, and leboncoin shows at most 100 pages per search (about 3,500 ads). The run stops earlier when the search has no more results. You pay per ad, so this is also your cost cap.

## `proxyConfiguration` (type: `object`):

Leave the default. The scraper starts with Apify datacenter proxy and a Chrome browser fingerprint, rotates the IP when DataDome challenges a request, and if every datacenter attempt is blocked it switches to a French residential IP automatically. Proxy costs are included in the price.

## Actor input object example

```json
{
  "brand": "Peugeot",
  "max_pages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `allFields` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "brand": "Peugeot",
    "max_pages": 1,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rastriq/leboncoin-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "brand": "Peugeot",
    "max_pages": 1,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rastriq/leboncoin-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "brand": "Peugeot",
  "max_pages": 1,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rastriq/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rastriq/leboncoin-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/viL3wqHJkQkwTRWWe/builds/wuTZEQAXvq2eMVqD3/openapi.json
