# leboncoin Listings Scraper (`xtracto/leboncoin-listings`) Actor

Scrape classified ad listings from leboncoin.fr — France's #1 classifieds marketplace. Searches by keyword, category, and location. Returns full ad objects: title, price, seller info, images, geo, and category-specific attributes. Requires Apify FR Residential proxy (DataDome WAF).

- **URL**: https://apify.com/xtracto/leboncoin-listings.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Real estate, E-commerce, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 Listings Scraper

Extract classified ads from [leboncoin.fr](https://www.leboncoin.fr/) — France's largest peer-to-peer and business marketplace (~33 million monthly users) — including title, price, seller info, location, images, and category details.

### Why use this actor

- **No account or login required** — publicly listed ads are collected as-is.
- **Search by keyword, category, or location** — find iPhones nationwide, apartments in Paris, used cars in Lyon, and more.
- **Full ad detail in every record** — price, city, seller type, listing date, images, and category-specific attributes all included.
- **Stable JSON output** ready to load into spreadsheets, databases, or downstream pipelines.
- **Automatic retries** on transient failures so you don't need to babysit the run.
- **Runs entirely on Apify** — no need to manage browsers, proxies, or scrapers yourself.

### How it works

1. You provide search keywords (e.g. `"iphone 14"`), an optional category (e.g. Electronics), and optional location filters (e.g. `"Paris_75000"`).
2. The actor pages through the search results, collecting up to `maxResults` ads (or all results if you set it to `0`).
3. Each ad is saved as a structured JSON record in your dataset, ready to download as JSON, CSV, or Excel.
4. A summary record is added at the end showing total results available, how many were collected, and how many pages were fetched.

**Important:** leboncoin only serves results to visitors located in France. The actor must run with the **Residential proxy set to country France** (this is the default — no extra configuration needed).

You do not need to manage sessions, handle retries, or set up any infrastructure.

### Input

```json
{
  "searchQuery": "iphone",
  "category": "17",
  "locations": [],
  "priceMin": 0,
  "priceMax": 0,
  "sortBy": "time",
  "ownerType": "all",
  "maxResults": 200,
  "maxConcurrency": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "FR"
  }
}
```

| Field | Type | Default | Description |
|---|---|---|---|
| `searchQuery` | string | — | Free-text keywords to search, e.g. `"iphone 14"` or `"appartement 3 pièces"`. Leave empty to browse by category or location only. |
| `category` | string | `""` (all) | Pick a category from the dropdown to restrict the search (see the full list below). Leave on **All categories** to search everything. |
| `locations` | array | `[]` | Restrict to French **departments**. Each entry needs a ZIP code or department number — e.g. `["75000", "69001"]`, `["Paris_75000"]`, or `["75", "69"]`. The department is read from the ZIP (`75000` → dept 75). Entries without a number (bare city names) are ignored. Leave empty for all of France. |
| `priceMin` | integer | `0` | Minimum price in euros. `0` means no minimum. |
| `priceMax` | integer | `0` | Maximum price in euros. `0` means no maximum. |
| `sortBy` | string | `"time"` | Sort order: `"time"` (newest first) or `"price"`. |
| `ownerType` | string | `"all"` | Seller type: `"all"`, `"private"` (individual sellers), or `"pro"` (businesses). |
| `maxResults` | integer | `200` | Maximum number of ad records to return. Set to `0` to collect all available results. |
| `maxConcurrency` | integer | `1` | Number of parallel requests. Keep at 1–2 for best reliability. |
| `proxyConfiguration` | object | FR Residential | Proxy settings. Must use Apify Residential proxy with country `FR` — leboncoin only returns results to French IP addresses. |

#### Categories

Pick one from the **Category** dropdown. The number is leboncoin's own category ID (verified live, 2026-06-11). Leave on *All categories* to search across everything.

| ID | Category | | ID | Category |
|---|---|---|---|---|
| 2 | Voitures (cars) | | 42 | Montres & Bijoux (watches & jewellery) |
| 3 | Motos (motorbikes) | | 44 | Équipement moto (motorbike gear) |
| 4 | Caravaning | | 46 | Linge de maison (home linen) |
| 5 | Utilitaires (vans) | | 47 | Accessoires & Bagagerie (bags & luggage) |
| 6 | Équipement auto (car parts) | | 48 | Vins & Gastronomie (wine & food) |
| 9 | Ventes immobilières (property for sale) | | 50 | Équipement caravaning |
| 10 | Locations (property rentals) | | 51 | Équipement nautisme (boating gear) |
| 15 | Ordinateurs (computers) | | 52 | Jardin & Plantes (garden & plants) |
| 16 | Photo, audio & vidéo | | 53 | Chaussures (shoes) |
| 17 | Téléphones & Objets connectés (phones) | | 55 | Vélos (bicycles) |
| 19 | Ameublement (furniture) | | 57 | Matériel agricole (farm equipment) |
| 20 | Électroménager (home appliances) | | 59 | BTP - Chantier gros-oeuvre (construction) |
| 21 | Bricolage (DIY/tools) | | 61 | Équipements restaurants & hôtels |
| 22 | Vêtements (clothing) | | 62 | Fournitures de bureau (office supplies) |
| 23 | Équipement bébé (baby gear) | | 64 | Matériel médical (medical equipment) |
| 25 | DVD - Films | | 76 | Accessoires animaux (pet accessories) |
| 26 | CD - Musique | | 82 | Tablettes & Liseuses (tablets & e-readers) |
| 27 | Livres (books) | | 83 | Accessoires informatique (computer accessories) |
| 28 | Animaux (animals) | | 84 | Jeux vidéo (video games) |
| 29 | Sport & Plein air (sport & outdoor) | | 86 | Modélisme (model making) |
| 30 | Instruments de musique | | 97 | Services de jardinerie & bricolage |
| 32 | Équipements industriels | | 98 | Services évènementiels (event services) |
| 39 | Décoration | | 102 | Services aux animaux (pet services) |
| 40 | Collection (collectibles) | | 106 | Poids lourds (trucks) |
| 41 | Jeux & Jouets (games & toys) | | | |

### Output

Two types of records are saved per run.

#### Ad record (`recordType: "AD"`) — one per listing

```json
{
  "_input": "q=iphone|cat=17",
  "_source": "S1-finder-api",
  "_scrapedAt": "2026-06-10T12:25:59Z",
  "recordType": "AD",
  "list_id": 2900960027,
  "subject": "iPhone 14 128Go Minuit - Parfait état",
  "body": "Vends iPhone 14 en parfait état, débloqué tous opérateurs.",
  "price": [650],
  "category_id": "17",
  "category_name": "Téléphones & Objets connectés",
  "status": "active",
  "url": "https://www.leboncoin.fr/telephones/2900960027.htm",
  "first_publication_date": "2026-06-08T14:32:00+0200",
  "location": {
    "city_label": "Paris",
    "zipcode": "75001",
    "region_name": "Île-de-France",
    "lat": 48.86,
    "lng": 2.347
  },
  "owner": {
    "type": "private",
    "name": "Marie T.",
    "is_pro": false
  },
  "images": {
    "nb_images": 4,
    "urls": [
      "https://img.leboncoin.fr/api/v1/lbc-cs/v1/img/abc/def/1.jpg",
      "https://img.leboncoin.fr/api/v1/lbc-cs/v1/img/abc/def/2.jpg",
      "... 2 more"
    ]
  },
  "attributes": [
    {"key": "item_condition", "key_label": "État", "value_label": "Neuf"},
    {"key": "mobile_brand", "key_label": "Marque", "value_label": "Apple"}
  ],
  "_price_eur": 650,
  "_city": "Paris",
  "_zipcode": "75001",
  "_is_pro": false,
  "_category_slug": "telephones"
}
```

| Field | Type | Description |
|---|---|---|
| `list_id` | integer | Unique ad identifier on leboncoin. |
| `subject` | string | Ad title. |
| `body` | string | Full ad description text. |
| `price` | array | Price in euros as a single-element array, e.g. `[650]`. Free items have an empty array. |
| `category_id` | string | leboncoin category number. |
| `category_name` | string | Human-readable category name (in French). |
| `status` | string | Ad status, e.g. `"active"`. |
| `url` | string | Direct link to the ad on leboncoin. |
| `first_publication_date` | string | ISO 8601 date/time when the ad was first posted. |
| `location` | object | City, ZIP code, region, and GPS coordinates. |
| `owner` | object | Seller name, type (`"private"` or `"pro"`), and professional flag. |
| `images` | object | Image count and URLs. |
| `attributes` | array | Category-specific fields (e.g. condition, brand, mileage). Keys and labels are in French. |
| `_price_eur` | integer | Convenience field: first element of `price`, or `null` if free/not set. |
| `_city` | string | Convenience field: city name extracted from `location`. |
| `_zipcode` | string | Convenience field: ZIP code extracted from `location`. |
| `_is_pro` | boolean | Convenience field: `true` if the seller is a professional. |
| `_category_slug` | string | ASCII-safe category slug derived from `category_name`. |
| `_input` | string | Compact tag showing the search parameters used. |
| `_scrapedAt` | string | ISO 8601 UTC timestamp of when the record was collected. |

#### Search summary record (`recordType: "SEARCH_SNAPSHOT"`) — one per run

```json
{
  "recordType": "SEARCH_SNAPSHOT",
  "total_count": 378435,
  "ads_scraped": 200,
  "pages_fetched": 6,
  "search_params": {
    "keywords": "iphone",
    "category": "17",
    "locations": [],
    "price_min": 0,
    "price_max": 0,
    "owner_type": "all",
    "sort_by": "time"
  }
}
```

| Field | Type | Description |
|---|---|---|
| `total_count` | integer | Total matching ads available on leboncoin for the search. |
| `ads_scraped` | integer | Number of ad records collected in this run. |
| `pages_fetched` | integer | Number of result pages fetched. |
| `search_params` | object | Echo of the search parameters used. |

### Other Apify actors for classifieds and marketplaces

| Actor | Source | Region |
|---|---|---|
| [mobile.de Listings Scraper](https://apify.com/xtracto/mobilede-listings) | mobile.de | Germany |
| [Immobiliare Listings Scraper](https://apify.com/xtracto/immobiliare-listings) | immobiliare.it | Italy |
| [Idealista Listings Scraper](https://apify.com/xtracto/idealista-listings) | idealista.com | Spain |
| [Avito Listings Scraper](https://apify.com/xtracto/avito-listings) | avito.ru | Russia |
| [MercadoLibre Listings Scraper](https://apify.com/xtracto/mercadolibre-listings) | mercadolibre.com | Latin America |

# Actor input Schema

## `searchQuery` (type: `string`):

Free-text keyword(s) to search, e.g. 'iphone 14' or 'appartement 3 pièces'. Leave empty to browse by category/location only.

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

Optional category to restrict the search. Leave on 'All categories' to search everything (keyword search alone is reliable). The number in each option is leboncoin's own category ID. List verified live on 2026-06-11.

## `locations` (type: `array`):

Restrict to one or more French departments. Each entry must contain a ZIP code or a department number, e.g. \['75000', '69001'] or \['Paris_75000'] or just \['75','69']. The department is taken from the ZIP (75000 -> dept 75; 97400 -> dept 974). City names WITHOUT a ZIP are ignored (leboncoin filters by department here, not city radius). Leave empty for all of France.

## `priceMin` (type: `integer`):

Minimum listing price in euros. Set to 0 for no minimum.

## `priceMax` (type: `integer`):

Maximum listing price in euros. Set to 0 for no maximum.

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

Sort results by time (newest first) or price.

## `ownerType` (type: `string`):

Filter by seller type.

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

Maximum number of AD records to return. 0 = no limit (scrape all pages up to total_count).

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

Parallel requests per proxy session. Keep at 1–2 for best reliability. Maximum 4.

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

REQUIRED: Use Apify Residential proxy with country=FR. leboncoin only returns results to French IP addresses. Using non-French or datacenter proxies will return no results.

## Actor input object example

```json
{
  "searchQuery": "iphone",
  "category": "",
  "locations": [],
  "priceMin": 0,
  "priceMax": 0,
  "sortBy": "time",
  "ownerType": "all",
  "maxResults": 200,
  "maxConcurrency": 1,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# 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 = {
    "searchQuery": "iphone",
    "locations": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/leboncoin-listings").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 = {
    "searchQuery": "iphone",
    "locations": [],
}

# Run the Actor and wait for it to finish
run = client.actor("xtracto/leboncoin-listings").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 '{
  "searchQuery": "iphone",
  "locations": []
}' |
apify call xtracto/leboncoin-listings --silent --output-dataset

```

## MCP server setup

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

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/0SFU4KXgLhGw5wtjg/builds/dEjeZBoF2f5ONFQvz/openapi.json
