# Leboncoin Universal Scraper (`scrapifier/leboncoin-universal-scraper`) Actor

⚡ Extract unlimited Leboncoin listings in seconds! Just drop your search URL and instantly get rich, structured data — ready for market insights, real estate deals, pricing intel, or lead generation. Stop copying listings manually — automate it all and stay ahead!

- **URL**: https://apify.com/scrapifier/leboncoin-universal-scraper.md
- **Developed by:** [Scrapifier](https://apify.com/scrapifier) (community)
- **Categories:** Automation, Real estate, E-commerce
- **Stats:** 157 total users, 16 monthly users, 99.3% runs succeeded, 4 bookmarks
- **User rating**: 2.73 out of 5 stars

## Pricing

from $0.60 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Leboncoin Scraper

Scrape listings from Leboncoin by pasting any search URL and export them as JSON, CSV or Excel, or pull them straight from the API.

⚡ For every ad you get the **title, price and full description**, the category, the **typed attributes** (surface, rooms, DPE energy rating, mileage, fuel, year and so on), the **image URLs**, publication and last-update dates, status, whether a phone number is attached, and the **full geolocation** (city, zip code, department, region, latitude, longitude). Works with **any Leboncoin category and any filter** of the site, applied **server-side** by Leboncoin from your URL. **No login, no cookies**, several searches per run, deduplication by ad id. You **pay per listing**.

[![Apify Actor](https://apify.com/actor-badge?actor=scrapifier/leboncoin-universal-scraper)](https://apify.com/scrapifier/leboncoin-universal-scraper)

### 🎯 Why scrape Leboncoin listings?

- **Real estate deal sourcing**: pull every apartment or house for sale in a city and price band, with surface, rooms and DPE, and spot underpriced ads the day they appear.
- **Price monitoring**: track asking prices for a car model, a phone or a piece of furniture across departments, week after week, from the same saved URLs.
- **Lead generation**: collect ads from private sellers or professionals (the `owner_type` filter of the URL) with their location and whether a phone number is attached.
- **Market research**: measure supply per region or category over time, from the number of ads a search returns to the distribution of attributes.
- **Research and data science**: build datasets of French classified ads with geolocation for pricing models, NLP or urban studies.

### 📊 What data does Leboncoin Scraper extract?

| Field | Description |
|---|---|
| `id` | Unique Leboncoin listing id |
| `url` | Direct link to the ad |
| `subject` | Listing title |
| `body` | Full description text |
| `price` | Price in euros |
| `category_id`, `category_name` | Leboncoin category id and name (for example `9`, `Ventes immobilières`) |
| `ad_type` | `offer` or `demand` |
| `brand` | Source brand (`leboncoin`) |
| `status` | Listing status (for example `active`) |
| `first_publication_date` | First publication date (`YYYY-MM-DD HH:MM:SS`) |
| `index_date` | Last update date |
| `expiration_date` | Expiration date, when Leboncoin provides it |
| `images[]` | Image URLs |
| `attributes[]` | Category-specific attributes, one object per attribute with `key`, `key_label`, `value`, `value_label`, plus `values` and `values_label` for multi-value attributes and a `generic` flag. Typical keys: `square`, `rooms`, `bedrooms`, `energy_rate`, `mileage`, fuel, year |
| `location.*` | `city`, `city_label`, `zipcode`, `department_id`, `department_name`, `region_id`, `region_name`, `country_id`, `lat`, `lng`, `source`, `provider`, `is_shape` |
| `has_phone` | Whether the seller published a phone number |
| `scraped_at` | Extraction timestamp |
| `search_url`, `search_category`, `search_location` | The search URL this ad came from, and the category and first location parsed from it |

The dataset's **Overview** view shows the key columns (id, title, price, category, city, zip code, last update, URL).

### 🚀 How to scrape Leboncoin listings

1. Run a search on [leboncoin.fr](https://www.leboncoin.fr) with the filters you want: category, location and radius, price range, surface, rooms, mileage, private or professional sellers, sort order.
2. Copy the URL of the results page. Its path must contain `/recherche`. Category landing pages (`/cl/...`) are not supported.
3. Paste it into **Search URLs** (`urls_list`). Add as many URLs as you want, they are processed one after the other in the same run.
4. Set **Max pages** (`max_pages`). The default `10` is a good first run; `0` collects every page the search returns. Optionally set **Max ad age** to keep only recently updated ads.
5. Keep or adjust the **Proxy configuration**, prefilled with Apify residential proxies in France, the recommended setting for large or frequent runs.
6. Click **Start**, then open the **Storage** tab to preview the listings and export them as JSON, CSV, Excel or XML, or read them from the dataset API.

The same run can be started from the Apify API, the Python or JavaScript client, or put on a schedule to refresh a search every day.

### 📥 Input parameters

| Field | Key | Type | Default | Description |
|---|---|---|---|---|
| Search URLs | `urls_list` | array of strings | `["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"]` | One or more Leboncoin search URLs. The path must contain `/recherche`; `/cl/...` category URLs are not supported. Required. |
| Max pages | `max_pages` | integer | `10` | Pages to scrape per URL. `0` = all available pages (practical cap of 99,999). Recommended `10` to `20` to start. |
| Ads per page | `limit_per_page` | integer | `35` | Ads requested per page, `1` to `100`. Leboncoin typically displays 35 ads per page. |
| Delay between pages (seconds) | `delay_between_pages` | number | `0` | Pause between two pages, `0` to `5` seconds. `0` = maximum speed. |
| Max ad age (days) | `max_age_days` | integer | `0` | Ignore ads older than this many days, up to `365`. `0` = disabled. |
| Proxy configuration | `proxyConfiguration` | object | Apify residential, country `FR` | Proxy settings used for every request. Recommended for high volume. Leave the object out to run without proxy. |

Example input:

```json
{
  "urls_list": [
    "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
  ],
  "max_pages": 10,
  "limit_per_page": 35,
  "delay_between_pages": 0,
  "max_age_days": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "FR"
  }
}
```

Every parameter in the URL is honoured: `text`, `category`, `locations`, `owner_type` (`private` or `pro`), `ad_type` (`offer` or `demand`), `shippable`, `sort` and `order` (`sort=time&order=desc` gives newest first, `sort=price&order=asc` cheapest first), and any range filter written as `min-max` such as `rooms=2-4`. The age filter uses `index_date` (last update) when present, otherwise `first_publication_date`.

### 📤 Output example

Each listing is one dataset item, exportable as JSON, CSV, Excel or via the API.

```json
{
  "id": 3083651141,
  "first_publication_date": "2025-10-29 23:25:53",
  "status": "active",
  "category_id": "9",
  "category_name": "Ventes immobilières",
  "subject": "Appartement 2 pièces 28 m²",
  "body": "2 pièces, complètement rénové, Paris 11ème...",
  "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3083651141",
  "price": 329500,
  "images": ["https://img.leboncoin.fr/api/v1/..."],
  "attributes": [
    { "key": "square", "value": "28", "value_label": "28 m²" },
    { "key": "rooms", "value": "2", "value_label": "2" },
    { "key": "energy_rate", "value": "f", "value_label": "F" }
  ],
  "location": {
    "city": "Paris",
    "zipcode": "75011",
    "department_name": "Paris",
    "region_name": "Ile-de-France",
    "lat": 48.85763,
    "lng": 2.38005
  },
  "has_phone": true,
  "scraped_at": "2025-10-29 22:29:25",
  "search_url": "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
}
```

The run's OUTPUT record also holds the run statistics (`total_ads`, `unique_ads`, `duplicates`, `pages_processed`, `errors`), the effective configuration and `total_ads_available`, the number of ads Leboncoin reported for the search.

### 💡 Ready-to-run examples

**Validate a search: Paris apartments for sale, 2 to 4 rooms, 250k to 400k euros, first 10 pages**

```json
{ "urls_list": ["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"], "max_pages": 10 }
```

**Collect every listing of the search, through French residential proxies**

```json
{ "urls_list": ["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"], "max_pages": 0, "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" } }
```

**Fewer requests for the same volume: 100 ads per page, 20 pages**

```json
{ "urls_list": ["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"], "max_pages": 20, "limit_per_page": 100 }
```

### 💰 Pricing: how much does it cost to scrape Leboncoin?

From **$0.89 per 1,000 listings** on the free plan, with automatic volume discounts down to **$0.60 per 1,000** on higher Apify plans. You pay only for the results you receive, there is no subscription and no start fee. New Apify accounts get free monthly platform credits to try it.

Cost is driven by the number of listings returned: `max_pages` caps each URL (35 ads per page by default) and `max_age_days` drops ads that were not updated recently. The tighter the filters in your Leboncoin URL, the fewer listings you pay for. Residential proxy traffic is billed separately by Apify at your plan's rate.

### ⚙️ Performance, proxies and limits

- **Proxies**: the input is prefilled with Apify residential proxies in France, recommended for high volume. The Actor also runs without proxy if you remove the `proxyConfiguration` object. When a request is blocked, the run logs it and stops that URL.
- **Leboncoin's 100-page cap**: Leboncoin serves at most 100 pages per search. When your URL has a `price` range wider than 50,000 euros, the Actor splits it into 50,000-euro sub-ranges and scrapes each one as a separate search, so large searches are not cut at 100 pages.
- **Pagination**: pages are fetched one after the other per URL and the URL stops as soon as a page comes back empty. `max_pages` set to `0` means every page (practical cap of 99,999).
- **Age filter**: with `max_age_days` set, ads older than the threshold are skipped and the current URL stops after 5 consecutive old ads, which works best when the URL sorts by date (`sort=time&order=desc`).
- **Deduplication**: ads are deduplicated by `id` across all URLs and sub-ranges of a run; duplicates are counted in the OUTPUT statistics.
- **Locations**: URLs copied from Leboncoin include the coordinates and radius of each location. A plain `City_zip` location is geocoded through the French address API (api-adresse.data.gouv.fr, with an OpenStreetMap fallback).
- **Batches**: listings are pushed to the dataset every 10 pages, so a long run shows results while it is still going.
- **Run defaults**: 1,024 MB of memory and a 60-minute timeout, adjustable in the run options.

### 🔌 Integrations and API

Run Leboncoin Scraper from the [Apify API](https://docs.apify.com/api/v2), the [Python](https://docs.apify.com/api/client/python) or [JavaScript](https://docs.apify.com/api/client/js) client, or on a [schedule](https://docs.apify.com/platform/schedules). Connect it to Make, Zapier, n8n, Google Sheets, Slack or any webhook through [Apify integrations](https://apify.com/integrations). Every run's dataset is available as JSON, CSV, Excel or XML from the dataset API.

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapifier~leboncoin-universal-scraper/run-sync-get-dataset-items?token=%3CYOUR_TOKEN%3E" \
  -H "Content-Type: application/json" \
  -d '{ "urls_list": ["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"], "max_pages": 10 }'
```

### ❓ FAQ

**Is it legal to scrape Leboncoin?**

The Actor only reads listings that Leboncoin shows to any visitor without logging in. Ads can contain personal data (seller location, descriptions, whether a phone number exists), so process them in line with GDPR and other privacy laws, respect Leboncoin's terms of use, and stay responsible for how you use the data. This is not legal advice.

**Do I need a Leboncoin account, login or cookies?**

No. There is nothing to log in to and no cookie to paste. The only optional setting is the proxy configuration.

**Which Leboncoin URLs are supported?**

Search results pages whose path contains `/recherche`, with any combination of filters. Category landing pages such as `/cl/...` are not supported: apply a filter or a search text and copy the resulting `/recherche?...` URL.

**Can I export Leboncoin listings to Excel or Google Sheets?**

Yes. Every run's dataset downloads as CSV, XLSX, JSON or XML from the Storage tab, and the Google Sheets integration can append new listings to a sheet automatically.

**How many listings can I scrape?**

Set `max_pages` to `0` to collect every page the search returns. Leboncoin itself serves at most 100 pages per search, so for very large searches narrow the URL filters or rely on the automatic splitting of wide `price` ranges into 50,000-euro sub-ranges.

**Do I need a proxy, and what if a run is blocked?**

For a few pages, the Actor usually works without proxy. For large or frequent runs, keep the prefilled French residential proxies. If a run logs a block, retry with residential proxies enabled and a `delay_between_pages` above `0`.

**Can I get only recent ads?**

Yes. Set `max_age_days` (up to `365`) and sort the search by date in the URL (`sort=time&order=desc`). The Actor compares the last-update date of each ad and stops the URL after 5 consecutive old ads.

**Does it work for cars, jobs, furniture or only real estate?**

Every Leboncoin category. The category and its filters are read from the URL, and the `attributes` array carries the category-specific fields (surface and DPE for real estate, mileage, fuel and year for vehicles). For filter-based inputs without URLs, see the real estate and vehicles siblings below.

### 🔗 Related scrapers

- [Leboncoin Real Estate Scraper](https://apify.com/scrapifier/leboncoin-universal-scraper-real-estate): real estate listings by filters (location, price, surface, rooms), no URL needed.
- [Leboncoin Vehicles Scraper](https://apify.com/scrapifier/leboncoin-universal-scraper-vehicles): cars, motorbikes and vans by filters (brand, model, mileage, fuel, year).
- [SeLoger Scraper](https://apify.com/scrapifier/seloger-universal-scraper): real estate listings from SeLoger.
- [PAP Scraper](https://apify.com/scrapifier/pap-universal-scraper): private-seller real estate from pap.fr.
- [Bien'ici Scraper](https://apify.com/scrapifier/bien-ici-universal-scraper): real estate listings from Bien'ici.
- [Vinted Scraper](https://apify.com/scrapifier/vinted-universal-scraper): second-hand fashion listings, any Vinted country.

### 🇫🇷 En français

Ce scraper Leboncoin extrait les annonces de n'importe quelle URL de recherche Leboncoin (`/recherche?...`), quelle que soit la catégorie : immobilier, véhicules, emploi, électronique, maison. Collez une ou plusieurs URLs de recherche avec vos filtres (localisation, prix, surface, pièces, kilométrage, vendeur particulier ou professionnel, tri) et l'Actor collecte toutes les annonces qu'elles renvoient, page après page, sans compte ni cookies. Pour chaque annonce vous obtenez le titre, le prix, la description complète, la catégorie, les attributs typés (surface, pièces, DPE, kilométrage, carburant, année), les images, la présence d'un numéro de téléphone et la géolocalisation complète (ville, code postal, département, région, latitude, longitude). Le paramètre `max_pages` limite le nombre de pages (`0` pour tout récupérer) et `max_age_days` ne garde que les annonces mises à jour récemment. Les données s'exportent en CSV, Excel, JSON ou XML, ou se récupèrent via l'API Apify pour alimenter Google Sheets, un CRM ou un tableau de suivi des prix. Le paiement se fait au résultat : à partir de 0,89 $ pour 1 000 annonces, sans abonnement.

### 💬 Support

Questions, bugs or a feature request? Open an issue in the **Issues** tab of this Actor, I answer quickly. If Leboncoin Scraper saves you time, a rating on the Store helps others find it.

# Actor input Schema

## `urls_list` (type: `array`):

Enter one or more Leboncoin search URLs (must contain /recherche in the path). Category URLs (e.g. /cl/...) are not supported. This field is required.

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

Maximum number of pages to scrape. Set 0 to scrape all available pages (practical limit of 99999 pages). Recommended: 10-20 to start.

## `limit_per_page` (type: `integer`):

Number of ads to scrape per page (Leboncoin typically displays 35 ads/page)

## `delay_between_pages` (type: `number`):

Wait time between each page (0 = maximum speed recommended)

## `max_age_days` (type: `integer`):

Ignore ads older than X days (0 = disabled)

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

Use proxies to avoid blocking (recommended for high volume)

## Actor input object example

```json
{
  "urls_list": [
    "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
  ],
  "max_pages": 10,
  "limit_per_page": 35,
  "delay_between_pages": 0,
  "max_age_days": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

All Leboncoin listings extracted by this run.

# 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 = {
    "urls_list": [
        "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
    ],
    "max_pages": 10,
    "limit_per_page": 35,
    "delay_between_pages": 0,
    "max_age_days": 0,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapifier/leboncoin-universal-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 = {
    "urls_list": ["https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"],
    "max_pages": 10,
    "limit_per_page": 35,
    "delay_between_pages": 0,
    "max_age_days": 0,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapifier/leboncoin-universal-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 '{
  "urls_list": [
    "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
  ],
  "max_pages": 10,
  "limit_per_page": 35,
  "delay_between_pages": 0,
  "max_age_days": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call scrapifier/leboncoin-universal-scraper --silent --output-dataset

```

## MCP server setup

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