# Leboncoin Scraper: Pro Car Listings, No Login (`bibian/leboncoin-cars-scraper`) Actor

Extract professional car listings from Leboncoin, France's largest classifieds site: brand, model, year, mileage, price, fuel, gearbox, dealer name and location. Dealers only, never a private seller.

- **URL**: https://apify.com/bibian/leboncoin-cars-scraper.md
- **Developed by:** [Vivien MORVAN](https://apify.com/bibian) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 91.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.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 Scraper: Pro Car Listings, No Login

Extract professional car listings from [Leboncoin](https://www.leboncoin.fr), France's largest classifieds site, and get clean structured data: brand, model, year, mileage, price, fuel, gearbox, color, dealer name and location — dealers only, never a private seller.

### What you can do with it

- **Monitor dealer stock**: track what a market segment of professional sellers is listing, by brand, price or mileage.
- **Feed a car-buying alert**: run it daily with your filters and get only new listings.
- **Benchmark prices**: compare price, mileage and year across dealers for the same model.
- **Build a car marketplace aggregator**: Leboncoin has no public export for third parties; this Actor reads the same listings its own search page shows.

### Input

| Field | What it does |
|---|---|
| Keywords | Free text search, exactly as typed in Leboncoin's own search box, for example `break diesel`. Empty means every professional listing. |
| Brand | Car brand, for example `PEUGEOT`. Empty for all brands. |
| Minimum / maximum price | Keeps only listings in the price range (EUR). |
| Minimum / maximum registration year | Keeps only listings registered in that year range. |
| Maximum mileage | Keeps only listings with at most this many kilometers. |
| Maximum number of listings | The run stops once this many listings are saved (default 50). |

### Output

One record per listing. Three real results from a default run, side by side:

```json
[
  {
    "id": 3268524283,
    "title": "Renault Kangoo 1.5 dCi 90ch energy Zen FT Euro6",
    "price": 11990,
    "brand": "RENAULT",
    "model": "Kangoo",
    "year": "2017",
    "mileageKm": 121450,
    "fuel": "Diesel",
    "gearbox": "Manuelle",
    "city": "Saint-Nazaire",
    "department": "Loire-Atlantique",
    "dealerName": "Concession MG Motor Saint-Nazaire",
    "dealerSiren": "870800927"
  },
  {
    "id": 3289812257,
    "title": "Renault Twingo 3 1.0 Sce 70cv Life",
    "price": 8390,
    "brand": "RENAULT",
    "model": "Twingo",
    "year": "2017",
    "mileageKm": 54000,
    "fuel": "Essence",
    "gearbox": "Manuelle",
    "city": "Saint-Brandan",
    "department": "Côtes-d'Armor",
    "dealerName": "SOCIETE AUTOMOBILE QUINTINAISE",
    "dealerSiren": "305350829"
  },
  {
    "id": 3278183860,
    "title": "Audi A4 Avant 2.0 TDI 150 Business Line S-tronic",
    "price": 16979,
    "brand": "AUDI",
    "model": "A4",
    "year": "2018",
    "mileageKm": 129000,
    "fuel": "Diesel",
    "gearbox": "Automatique",
    "city": "Aucamville",
    "department": "Haute-Garonne",
    "dealerName": "WEECARS TOULOUSE NORD",
    "dealerSiren": "939768396"
  }
]
```

Each record also carries `url`, `color`, `zipcode`, `region`, `firstPublicationDate`, `imageUrl` and `imageCount` (trimmed above for readability). Export the dataset as JSON, CSV or Excel, or read it through the Apify API.

### Why this one

- **Dealers only, by construction.** The search itself is restricted to professional sellers; a listing is dropped again as a safety net if it is not. No private seller's name, phone or address is ever collected.
- **No login, no captcha-solving.** Leboncoin's anti-bot defenses are handled by proxying through residential IPs with a real browser fingerprint; nothing about the site's defenses is bypassed by a fake account or solved challenge.

### Good to know

- Leboncoin protects every request with DataDome: this Actor is slower and costs more per result than a simple HTML scraper, because every page needs a residential IP.
- `dealerName` and `dealerSiren` are the dealership's public trade name and French business registration number, required by law on professional listings — never an individual's data.
- The site returns at most a few thousand listings per search. To collect more, narrow the filters (brand, price, year) or run it regularly.
- No full description is included: Leboncoin's search results carry only structured specifications (brand, model, year, mileage, fuel, and more), not free-text ad copy.

### FAQ

**Does it collect private sellers' listings?**\
No. The search is restricted to professional sellers (`owner_type=pro`), checked a second time on every listing before it is saved.

**Why is it more expensive than most classifieds scrapers?**\
Leboncoin blocks plain requests and datacenter proxies outright; every page needs a residential IP, which costs more per request than a typical site.

**Can I filter by brand, price or mileage?**\
Yes, with the `brand`, `minPrice`/`maxPrice`, `minYear`/`maxYear` and `maxMileageKm` input fields.

# Actor input Schema

## `query` (type: `string`):

Free text search, exactly as typed in Leboncoin's own search box, for example "break diesel". Leave empty for every professional car listing.

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

Car brand, for example "PEUGEOT" or "RENAULT". Leave empty for all brands.

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

Keep only listings priced at least this amount.

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

Keep only listings priced at most this amount.

## `minYear` (type: `integer`):

Keep only listings registered this year or later.

## `maxYear` (type: `integer`):

Keep only listings registered this year or earlier.

## `maxMileageKm` (type: `integer`):

Keep only listings with at most this many kilometers.

## `maxItems` (type: `integer`):

The run stops once this many listings are saved.

## Actor input object example

```json
{
  "maxItems": 50
}
```

# Actor output Schema

## `listings` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("bibian/leboncoin-cars-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("bibian/leboncoin-cars-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 '{}' |
apify call bibian/leboncoin-cars-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bibian/leboncoin-cars-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/2ADhCRh1dlY0usalw/builds/0DvlCGmaMBIzCptKI/openapi.json
