# Leboncoin Scraper – Cars, Real Estate & All Listings (France) (`worshipful_knife/leboncoin-scraper`) Actor

Scrape Leboncoin.fr listings from any search URL or keyword + category + location: title, price, full description, photos, GPS, attributes (mileage, fuel, surface, rooms), seller type. Fast HTTP, $0.50 per 1,000 listings, proxy included.

- **URL**: https://apify.com/worshipful_knife/leboncoin-scraper.md
- **Developed by:** [kata Kuri](https://apify.com/worshipful_knife) (community)
- **Categories:** E-commerce, Lead generation, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.35 / 1,000 listings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Scraper – Cars, Real Estate & All Listings

Scrape **Leboncoin.fr** (Le Bon Coin) annonces from any search: cars, motorbikes, real estate for sale or rent, electronics, furniture, jobs and more. Get title, price, **full description**, all photos, attributes (mileage, fuel, surface, rooms...), location with GPS coordinates and the seller (private or pro, with SIREN) as JSON, CSV or Excel.

### Features

- **Two ways to search**: paste Leboncoin search URLs from your browser (every filter is kept), or use keyword + category + location + price
- **Full description in the search results**: no need to open every ad page
- **All attributes** as clean key/value pairs: `mileage`, `fuel`, `gearbox`, `regdate`, `square`, `rooms`, `energy_rate`...
- **Location** with city, postal code, department, region and latitude/longitude
- **Seller**: name, private/pro, SIREN number and store id for professionals
- **Optional ad pages** (`includeDetails`) for the most complete and up-to-date data
- **Works out of the box** through Leboncoin's DataDome protection (French residential proxy is the default)
- **Smart limits**: stops as soon as `maxResults` is reached, no wasted requests
- **Honest runs**: a blocked or empty run **fails with a clear message** instead of "succeeding" with an empty dataset
- **Live progress** in the run status message

### Pricing

Simple all-in pay-per-event pricing: **platform usage and the residential proxy are included**, nothing else is billed.

| Event | Price |
|---|---|
| Listing (search results: title, price, full description, photos, attributes, location, seller) | **$0.50 per 1,000** ($0.0005) |
| Ad page opened (`includeDetails`) | +$1.60 per 1,000 ($0.0016) |
| Run start | $0.003 |

Example: 1,000 listings = $0.003 + $0.50 = **$0.50**. With `includeDetails`: **$2.10**.
Most users do not need `includeDetails`: the description, photos, attributes and seller type already come with the search results.
Use `maxResults` to cap your cost. If a run returns 0 listings it is marked as failed.

#### Price comparison (Apify Store, November 2026, Free plan, per 1,000 listings)

| Actor | Listings | With details |
|---|---|---|
| **This actor** | **$0.50** | **$2.10** |
| clearpath/leboncoin-api | $1.49 + $0.009 start | $6.48 |
| fatihtahta/leboncoin-fr-scraper | $1.00 | – |
| memo23/leboncoin-scraper | $0.79 + $0.005 start | – |

Proxy and platform usage are included in our price — there is nothing else to pay.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `searchUrls` | string\[] | – | Leboncoin search URLs (up to 100), e.g. `https://www.leboncoin.fr/recherche?category=2&text=clio&locations=Lyon`. `/c/<category>` URLs work too. When set, the fields below (keyword to price) are ignored. |
| `keyword` | string | – | Text to search for, e.g. `clio`, `iphone 15`, `maison piscine` |
| `category` | enum | all | `voitures`, `motos`, `ventes_immobilieres`, `locations`, `telephones_objets_connectes`, `ordinateurs`, `electromenager`, `ameublement`, ... (38 categories) |
| `location` | string | France | City (`Lyon`), city + postal code (`Lyon 69003`), postal code (`33000`), department (`Gironde` or `33`), region (`Bretagne`, `Occitanie`). Several: separate with `;` |
| `minPrice` / `maxPrice` | integer | – | Price range in € |
| `sortBy` | enum | `newest` | `newest`, `relevance`, `oldest`, `price_asc`, `price_desc` (keyword search only; pasted URLs keep their sort) |
| `maxResults` | integer | 50 | Stop after this many listings |
| `includeDetails` | boolean | false | Also open every ad page (slower, costs more) |
| `proxyConfiguration` | object | Residential FR | Keep the default: Leboncoin blocks datacenter IPs |
| `maxConcurrency` | integer | 5 | Parallel requests |

Use one mode or the other: when `searchUrls` is filled, the keyword / category / location / price fields are ignored (put those filters in the URLs). Searches run one after another and stop as soon as `maxResults` is reached.

#### Example input

```json
{
    "keyword": "clio",
    "category": "voitures",
    "location": "Lyon",
    "minPrice": 5000,
    "maxPrice": 15000,
    "maxResults": 200
}
```

### Output

One item per listing:

```json
{
    "id": "3286020389",
    "url": "https://www.leboncoin.fr/ad/voitures/3286020389",
    "title": "Renault Clio V Eco-G 100 ch GSR2 Techno",
    "price": 16590,
    "currency": "EUR",
    "category": "Voitures",
    "categoryId": "2",
    "adType": "offer",
    "location": {
        "city": "Saint-Junien",
        "zipcode": "87200",
        "department": "Haute-Vienne",
        "departmentId": "87",
        "region": "Limousin",
        "regionId": "14",
        "lat": 45.88737,
        "lng": 0.90097
    },
    "date": "2026-10-10T19:50:46.000Z",
    "updatedAt": "2026-11-15T09:54:05.000Z",
    "images": ["https://img.leboncoin.fr/api/v1/lbcpb1/images/43/e6/c3/43e6c349....jpg?rule=ad-large"],
    "imageCount": 31,
    "description": "RENAULT CLIO V ...",
    "attributes": {
        "brand": "Renault",
        "model": "Clio",
        "regdate": "2025",
        "mileage": "10 km",
        "fuel": "Essence",
        "gearbox": "Manuelle"
    },
    "seller": { "name": "GARAGE ...", "type": "pro", "siren": "349287052", "storeId": "52832062", "userId": "073e8d43-..." },
    "isPro": true,
    "hasPhone": true,
    "isShippable": false,
    "status": "active",
    "detailsScraped": false,
    "searchUrl": "https://www.leboncoin.fr/recherche?category=2&text=clio&sort=time&order=desc",
    "scrapedAt": "2026-11-16T13:40:00.000Z"
}
```

`date` is the first publication time and `updatedAt` the last time the ad was re-indexed (both converted from Paris time to UTC).
Leboncoin region ids follow its own 22 historical regions (e.g. `Limousin`), as on the site.

### Use cases

- **Car dealers & buyers**: track prices of a model, spot under-priced cars, monitor new ads every hour
- **Real estate**: collect apartments and houses for sale or rent in a city, price per m², agency vs private
- **Market research**: price levels and supply by category and region
- **Lead generation**: professional sellers with SIREN numbers

### FAQ

**Why does a search stop at 3,500 results?** Leboncoin shows at most 100 pages of 35 ads per search. Split big searches by location (department/region) or price range and add them all to `searchUrls`.

**Do I need `includeDetails`?** Usually not: search results already contain the full description, photos, attributes and seller type. Turn it on if you want data straight from the ad page.

**Phone numbers?** Not collected. Leboncoin only shows them to logged-in users.

**My run failed with "blocked"**: keep the default proxy (Apify RESIDENTIAL, country France). Datacenter proxies are blocked by DataDome.

### How it works

The scraper uses plain HTTP requests with a real Firefox TLS/HTTP2 fingerprint over French residential IPs (no browser, so it is fast and cheap). Each proxy session first gets its DataDome cookie with a tiny request, then reads the search page (to get the exact filters of your URL) and pages through Leboncoin's own search API, which also returns the descriptions. If the API is blocked it falls back to the search pages' embedded data. Blocked sessions are rotated automatically; no CAPTCHA is ever solved.

### Local development

```bash
npm install
npm test
apify run --input '{"keyword":"clio","category":"voitures","maxResults":20}'
```

Running locally needs a French residential proxy (Apify Proxy RESIDENTIAL) or most requests are blocked.

# Actor input Schema

## `searchUrls` (type: `array`):

Search results URLs copied from your browser, e.g. https://www.leboncoin.fr/recherche?category=2\&text=clio\&locations=Lyon. All filters of the URL are kept (max 100 URLs). When this is set, the keyword / category / location / price fields below are ignored.

## `keyword` (type: `string`):

What to search for, e.g. "clio", "iphone 15", "maison piscine". Used only when searchUrls is empty.

## `category` (type: `string`):

Leboncoin category. Leave empty to search all categories. Used only when searchUrls is empty.

## `location` (type: `string`):

City ("Lyon"), city + postal code ("Lyon 69003"), postal code ("33000"), department name or number ("Gironde", "33") or region ("Bretagne", "Occitanie"). Separate several with ";". Empty = all of France.

## `minPrice` (type: `integer`):

Only listings at or above this price.

## `maxPrice` (type: `integer`):

Only listings at or below this price.

## `sortBy` (type: `string`):

Order of the keyword/category search (pasted URLs keep their own sort).

## `maxResults` (type: `integer`):

Stop after this many listings in total. Leboncoin shows at most 3,500 results (100 pages) per search - split big searches by location or price.

## `includeDetails` (type: `boolean`):

Search results already include the full description, photos, attributes and seller type. Turn this on to also open every ad page (slower, costs more) for the most complete and up-to-date data.

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

Leboncoin is protected by DataDome and blocks datacenter IPs. Keep the default: Apify RESIDENTIAL proxy in France.

## `maxConcurrency` (type: `integer`):

Parallel requests. Higher is faster but more likely to be blocked.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.leboncoin.fr/recherche?category=2&text=clio&locations=Lyon"
  ],
  "category": "",
  "sortBy": "newest",
  "maxResults": 50,
  "includeDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  },
  "maxConcurrency": 5
}
```

# Actor output Schema

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

All scraped listings (JSON; add ?format=csv or ?format=xlsx for other formats).

# 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 = {
    "searchUrls": [
        "https://www.leboncoin.fr/recherche?category=2&text=clio&locations=Lyon"
    ],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("worshipful_knife/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 = {
    "searchUrls": ["https://www.leboncoin.fr/recherche?category=2&text=clio&locations=Lyon"],
    "maxResults": 50,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("worshipful_knife/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 '{
  "searchUrls": [
    "https://www.leboncoin.fr/recherche?category=2&text=clio&locations=Lyon"
  ],
  "maxResults": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call worshipful_knife/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,worshipful_knife/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/OYVRVFbmTKq8ymtm0/builds/IGWP38NkDDpHOFX2t/openapi.json
