# Leboncoin Scraper — French Real Estate, Cars & SIREN Leads (`foxlabs/leboncoin-scraper`) Actor

Scrape Leboncoin.fr listings across real estate, vehicles, equipment, and services in France. Extracts prices, m²/DPE/mileage specs, GPS coordinates, photos, and enriches Pro sellers via official French SIREN registry directors.

- **URL**: https://apify.com/foxlabs/leboncoin-scraper.md
- **Developed by:** [Berkan Kaplan](https://apify.com/foxlabs) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 leboncoin classified ads

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

<p align="center">
  <img src="https://img.shields.io/badge/Pay--Per--Event-%242.00_%2F_1K_Listings-00C853?style=for-the-badge" alt="Pay-Per-Event" />&nbsp;
  <img src="https://img.shields.io/badge/63_Columns-Real_Estate_%C2%B7_Cars_%C2%B7_SIREN_Leads-F97316?style=for-the-badge" alt="63 Columns" />&nbsp;
  <img src="https://img.shields.io/badge/AI_Agent_Ready-MCP_%26_x402-7C4DFF?style=for-the-badge" alt="MCP & x402 Ready" />&nbsp;
  <img src="https://img.shields.io/badge/Dual_Runtime-Batch_%2B_Standby_API-FF6D00?style=for-the-badge" alt="Batch + Standby API" />
</p>

## Leboncoin Scraper — French Real Estate, Cars & SIREN Leads 🚀

**foXLabs European B2B, Real Estate & Registry Series:** [France Company Data (INSEE/RNE)](https://apify.com/foxlabs/france-company-data) · [Europe Company Officers](https://apify.com/foxlabs/europe-company-officers) · [AutoScout24 Scraper](https://apify.com/foxlabs/autoscout24-scraper) · [B2B Company Finder](https://apify.com/foxlabs/b2b-company-finder) · [Airbnb Scraper](https://apify.com/foxlabs/airbnb-scraper)

Extract structured **French classified listings across real estate (`ventes immobilières`, `locations`, `bureaux & commerces`), vehicles (`voitures`, `utilitaires`), and services from Leboncoin.fr — complete with EUR prices, `pricePerSqmEur`, m²/rooms/DPE/GES energy ratings, mileage/year specs, GPS coordinates, high-res photos, and automatic `$0` official French INSEE/RNE `SIREN` company & director (`dirigeants`) enrichment** for professional sellers.

Built for French real estate investors & pige immobilière agencies (`particuliers` FSBO leads), automotive traders, French B2B sales teams prospecting SMB/artisan `pro` advertisers, and AI property/market agents.

### 🔍 What is the Leboncoin.fr Scraper + SIREN Leads — and when should you use it?

Leboncoin.fr is France's undisputed #1 marketplace for residential & commercial real estate, used cars, commercial vans, and local business services, hosting over 65 million active listings. Competing scrapers either break on Leboncoin's DataDome protection, ask users to risk their own Leboncoin email/password/2FA credentials, or dump raw unnormalized attribute arrays without resolving who actually owns a professional seller account.

This Actor delivers a **63-column French marketplace + official registry dataset** in a `256 MB` HTTP container:

- **Zero-Login DataDome Bypass (`listing`)** — extracts ~35 listings per search page including `listId`, `title`, `descriptionText`, `priceEur`, `oldPriceEur`, `pricePerSqmEur`, `city`, `postalCode`, `departmentId`, `regionName`, exact `latitude`/`longitude`, and `imageUrls[]`.
- **Normalized Real Estate & Vehicle Columns** — flattens `realEstateType`, `surfaceSqm`, `rooms`, `bedrooms`, `energyRate` (DPE `A–G`), `gesRate`, `furnished`, `vehicleBrand`, `vehicleModel`, `regYear`, `mileageKm`, `fuelType`, `gearbox`, and `horsepowerDin`, plus full `attributesMap` for every category.
- **Built-in Official French SIREN Company & Director Enrichment (`enrichProSirene: true` default ON, `$0` surcharge!)** — whenever a `pro` seller carries a 9-digit `sellerSiren`, the Actor queries France's official open INSEE/RNE API to append `companyLegalName`, `companyNafCode`, `companyEmployeeBand`, `companyHeadquartersCity`, and `companyDirectors[]` (`dirigeants` full names & roles!).

**Use it when you need:** French FSBO (`sellerType: "private"`) pige immobilière lead alerts; B2B prospecting of French artisans, dealers, and agencies advertising on Leboncoin (`sellerType: "pro"` + `companyDirectors[]`); or French rental yield (`pricePerSqmEur`) analysis.

**Use something else when:** you want to scrape phone numbers hidden behind logged-in interactive SMS/account verification walls (Leboncoin masks direct phone digits behind authenticated actions; for `pro` sellers we enrich legal company & director identities via official SIREN records instead, without ever asking for user credentials).

### 🤖 Use with AI agents (MCP, Claude, Cursor & x402)

**Already connected to the Apify MCP server?** Ask your AI assistant to call `foxlabs/leboncoin-scraper`.

- **Hosted MCP URL (zero install):** `https://mcp.apify.com?tools=foxlabs/leboncoin-scraper`
- **Local stdio config (Claude Desktop, Cursor, Cline, Windsurf):**

```json
{
  "mcpServers": {
    "leboncoin-scraper": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "foxlabs/leboncoin-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
```

**Autonomous agentic payments supported.** Billed at **$0.0020 per `listing`** (`$2.00 / 1,000`, including automatic `$0` French SIREN company & director enrichment!) or **$0.0065 per `listing-detail`** (`$6.50 / 1,000`) when individual `/ad/` pages are requested (`$0` start fee, `status` rows `$0.00`). Compatible with **x402 (USDC on Base)**, **Skyfire**, and standard Apify API tokens.

Copy-paste prompt for Claude, ChatGPT, Cursor, or any MCP-enabled agent:

```text
Use the Apify Actor `foxlabs/leboncoin-scraper` to extract structured records into JSON.
Start with: {"searchQueries":["utilitaire"],"locations":["Paris"],"maxAdsPerSearch":25}
```

Machine-readable Actor summary and schema: `https://apify.com/foxlabs/leboncoin-scraper.md`.

### 📋 Overview

| Property | Details |
|---|---|
| **Actor Slug** | `foxlabs/leboncoin-scraper` |
| **Authentication required** | None — 100% keyless & cookieless |
| **Container footprint** | Lightweight `256 MB` Node.js 22 HTTP runtime (`undici` + `AbortController` deadlines) |
| **Structured columns** | **63+ fields** (strict null-safety: unknown numbers are `null`, never fake `0`) |
| **Deduplication & restart safety** | Deterministic `rowKey` + startup `readAlreadyDelivered()` dataset scan |
| **Execution modes** | Asynchronous **Batch** + Real-Time **Standby HTTP** (`GET /`, `POST /scrape`, `.actor/openapi.json`) |
| **Run telemetry** | Full request/retry/filter breakdown saved to `SOURCE_REPORT` in Key-Value Store |

### ✨ Key Features

- ⚡ **Pure HTTP SSR / JSON Extraction (`256 MB` RAM)** — Avoids slow, expensive headless browsers by parsing embedded state payloads directly over managed proxies with automatic session rotation.
- 🛡️ **Pre-Billing Qualification Filters & Anti-Bleed Circuit Breakers** — Evaluates price, rating, role, stock, or seller filters *before* dataset emission and *before* optional detail requests so unmatched items cost **$0.00**.
- 🔁 **Zero Duplicate Charges Across Queries & Restarts** — Tracks every emitted `rowKey` across multi-query sweeps and container migrations.
- 🔌 **Dual Batch + Standby HTTP Runtime** — Call via standard `Actor.call` datasets or hit `POST /scrape` synchronously from LangChain, CrewAI, Clay, Make, or n8n.

### 🎬 Quick Start (API & Standby HTTP)

**1. Synchronous Batch API call (returns JSON array directly):**

```bash
curl -X POST "https://api.apify.com/v2/acts/foxlabs~leboncoin-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["appartement"],"locations":["Lyon"],"category":"ventes_immobilieres","sellerType":"private","maxAdsPerSearch":25}'
```

**2. Real-time Standby HTTP endpoint (`POST /scrape`):**

```bash
curl -X POST "https://foxlabs--leboncoin-scraper.apify.actor/scrape?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchQueries":["utilitaire"],"locations":["Paris"],"sellerType":"pro","enrichProSirene":true,"maxAdsPerSearch":15}'
```

### 🚀 Getting Started (3 steps)

1. **Enter your search targets** — Use the prefilled search input in Apify Console, paste custom filtered URLs, or supply direct item/listing URLs.
2. **Choose speed vs. deep enrichment** — Keep enrichment toggles `false` for maximum speed and lowest cost per 1,000 records, or toggle deep enrichment `true` when full detail attributes are needed.
3. **Run & export** — Click **Start** and download clean **JSON, CSV, Excel, or Parquet** from the Dataset tab (or stream directly into n8n, Make, Clay, BigQuery, or Snowflake).

### 📥 Input & Filters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | `array` | *(prefill: `["utilitaire"]`)* | Keywords to search on Leboncoin.fr (e.g. \['appartement', 'utilitaire', 'fonds de commerce']). |
| `locations` | `array` | *(prefill: `["Paris"]`)* | Optional city or postal code names paired with searchQueries (e.g. \['Paris', 'Lyon', '75011']). Leave empty for all of France. |
| `searchUrls` | `array` | — | Paste any filtered https://www.leboncoin.fr/recherche?... or category URL. |
| `adUrls` | `array` | — | Direct Leboncoin listing URLs (https://www.leboncoin.fr/ad/<category>/<id>) for full ad extraction ('listing-detail'). |
| `category` | `string` | `"all"` | Optional main Leboncoin category filter. |
| `sellerType` | `string` | `"all"` | Filter between Private individuals ('private' — FSBO / owner leads) and Professional businesses ('pro' — carries SIREN). |
| `sortBy` | `string` | `"relevance"` | Listing sort order on Leboncoin. |
| `minPriceEur` | `number` | — | Optional minimum price in EUR. |
| `maxPriceEur` | `number` | — | Optional maximum price in EUR. |
| `enrichProSirene` | `boolean` | `true` | Automatically resolves professional seller SIREN numbers against France's official open INSEE/RNE registry at $0 extra cost (extracts legal company name, NAF activity code, HQ city, and company directors). |
| `includeAdDetails` | `boolean` | `false` | When true, visits each individual /ad/ page when full body text is needed ('listing-detail' event). Note: search pages already include prices, GPS, attributes, photos, and seller SIREN! |
| `maxAdsPerSearch` | `integer` | `25` | Maximum unique ads extracted per search query or URL (~35 ads per page). |
| `maxTotalAds` | `integer` | `100` | Hard ceiling on total billable ad records across the entire run. |
| `proxyConfiguration` | `object` | `{"useApifyProxy":true}` | Apify Proxy configuration. Automatically handles DataDome bypass out of the box. |

### 📤 Output Schema & Real Sample Record

#### Sample Live-Extracted Record

```json
{
  "rowType": "listing",
  "rowKey": "leboncoin:ad:3280093571",
  "listId": 3280093571,
  "title": "Transport et remorquage de véhicules – Service fiable et professionnel",
  "descriptionText": null,
  "adUrl": "https://www.leboncoin.fr/ad/autres_services/3280093571",
  "status": "active",
  "adType": "offer",
  "categoryId": "34",
  "categoryName": "Autres services",
  "priceEur": 30,
  "oldPriceEur": null,
  "pricePerSqmEur": null,
  "currency": "EUR",
  "hasPhone": true,
  "isBoosted": true,
  "isUrgent": true,
  "isShippable": false,
  "publishedAt": "2026-10-01T12:11:31.000Z",
  "indexedAt": "2026-11-19T11:59:16.000Z",
  "expiresAt": "2026-11-30T11:11:31.000Z",
  "regionId": "12",
  "regionName": "Ile-de-France",
  "departmentId": "75",
  "departmentName": "Paris",
  "city": "Paris",
  "postalCode": "75013",
  "latitude": 48.83173,
  "longitude": 2.36832,
  "realEstateType": null,
  "surfaceSqm": null,
  "rooms": null,
  "bedrooms": null,
  "energyRate": null,
  "gesRate": null,
  "furnished": null,
  "vehicleBrand": null,
  "vehicleModel": null,
  "regYear": null,
  "mileageKm": null,
  "fuelType": null,
  "gearbox": null,
  "horsepowerDin": null,
  "attributesMap": {
    "activity_sector": "6",
    "country_isocode3166": "FR",
    "shippable": "false",
    "is_import": "false"
  },
  "imageCount": 2,
  "primaryImageUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/0d/57/b3/0d57b37f958e46e11c9d79897a8dfff951ddab8a.jpg?rule=ad-large",
  "imageUrls": [
    "https://img.leboncoin.fr/api/v1/lbcpb1/images/0d/57/b3/0d57b37f958e46e11c9d79897a8dfff951ddab8a.jpg?rule=ad-large",
    "https://img.leboncoin.fr/api/v1/lbcpb1/images/53/f8/f2/53f8f2d84b101ecd9f656e826b087ac66aafb7bf.jpg?rule=ad-large"
  ],
  "sellerType": "pro",
  "sellerName": "TH DEPANNAGE 24/7",
  "sellerUserId": "a6337bf6-d619-4d67-9c0a-225326d387af",
  "sellerStoreId": "90311146",
  "sellerSiren": "789030210",
  "companyLegalName": "TAREK HASSANI (TH DEPANNAGE 24/7)",
  "companyNafCode": "52.21Z",
  "companyEmployeeBand": "NN",
  "companyHeadquartersCity": "VIGNEUX-SUR-SEINE",
  "companyDirectors": [
    {
      "name": "TAREK HASSANI",
      "role": "Dirigeant",
      "type": "person"
    }
  ],
  "companyDirectorsText": "TAREK HASSANI (Dirigeant)",
  "sireneEnriched": true,
  "detailsEnriched": false,
  "searchSource": "utilitaire (Paris)",
  "searchPage": 1,
  "scrapedAt": "2026-11-19T21:27:30.422Z"
}
```

#### Field Reference (63 Core Columns)

| Field | Type | Live Sample Value |
|---|---|---|
| `rowType` | `string` | `"listing"` |
| `rowKey` | `string` | `"leboncoin:ad:3280093571"` |
| `listId` | `number` | `3280093571` |
| `title` | `string` | `"Transport et remorquage de véhicules – Service fiable ` |
| `descriptionText` | `string \| number \| null` | `null` |
| `adUrl` | `string` | `"https://www.leboncoin.fr/ad/autres_services/3280093571` |
| `status` | `string` | `"active"` |
| `adType` | `string` | `"offer"` |
| `categoryId` | `string` | `"34"` |
| `categoryName` | `string` | `"Autres services"` |
| `priceEur` | `number` | `30` |
| `oldPriceEur` | `string \| number \| null` | `null` |
| `pricePerSqmEur` | `string \| number \| null` | `null` |
| `currency` | `string` | `"EUR"` |
| `hasPhone` | `boolean` | `true` |
| `isBoosted` | `boolean` | `true` |
| `isUrgent` | `boolean` | `true` |
| `isShippable` | `boolean` | `false` |
| `publishedAt` | `string` | `"2026-10-01T12:11:31.000Z"` |
| `indexedAt` | `string` | `"2026-11-19T11:59:16.000Z"` |
| `expiresAt` | `string` | `"2026-11-30T11:11:31.000Z"` |
| `regionId` | `string` | `"12"` |
| `regionName` | `string` | `"Ile-de-France"` |
| `departmentId` | `string` | `"75"` |
| `departmentName` | `string` | `"Paris"` |
| `city` | `string` | `"Paris"` |
| `postalCode` | `string` | `"75013"` |
| `latitude` | `number` | `48.83173` |
| `longitude` | `number` | `2.36832` |
| `realEstateType` | `string \| number \| null` | `null` |
| `surfaceSqm` | `string \| number \| null` | `null` |
| `rooms` | `string \| number \| null` | `null` |
| `bedrooms` | `string \| number \| null` | `null` |
| `energyRate` | `string \| number \| null` | `null` |
| `gesRate` | `string \| number \| null` | `null` |
| `furnished` | `string \| number \| null` | `null` |
| `vehicleBrand` | `string \| number \| null` | `null` |
| `vehicleModel` | `string \| number \| null` | `null` |
| `regYear` | `string \| number \| null` | `null` |
| `mileageKm` | `string \| number \| null` | `null` |
| `fuelType` | `string \| number \| null` | `null` |
| `gearbox` | `string \| number \| null` | `null` |
| `horsepowerDin` | `string \| number \| null` | `null` |
| `attributesMap` | `object` | `{"activity_sector":"6","country_isocode3166":"FR","ship` |
| `imageCount` | `number` | `2` |
| `primaryImageUrl` | `string` | `"https://img.leboncoin.fr/api/v1/lbcpb1/images/0d/57/b3` |
| `imageUrls` | `array` | `["https://img.leboncoin.fr/api/v1/lbcpb1/images/0d/57/b` |
| `sellerType` | `string` | `"pro"` |
| `sellerName` | `string` | `"TH DEPANNAGE 24/7"` |
| `sellerUserId` | `string` | `"a6337bf6-d619-4d67-9c0a-225326d387af"` |
| `sellerStoreId` | `string` | `"90311146"` |
| `sellerSiren` | `string` | `"789030210"` |
| `companyLegalName` | `string` | `"TAREK HASSANI (TH DEPANNAGE 24/7)"` |
| `companyNafCode` | `string` | `"52.21Z"` |
| `companyEmployeeBand` | `string` | `"NN"` |
| `companyHeadquartersCity` | `string` | `"VIGNEUX-SUR-SEINE"` |
| `companyDirectors` | `array` | `[{"name":"TAREK HASSANI","role":"Dirigeant","type":"per` |
| `companyDirectorsText` | `string` | `"TAREK HASSANI (Dirigeant)"` |
| `sireneEnriched` | `boolean` | `true` |
| `detailsEnriched` | `boolean` | `false` |
| `searchSource` | `string` | `"utilitaire (Paris)"` |
| `searchPage` | `number` | `1` |
| `scrapedAt` | `string` | `"2026-11-19T21:27:30.422Z"` |

### 🧪 Data Quality — Measured

- **100% Deterministic Uniqueness (`N3`):** Every billable record carries a canonical `rowKey` verified across multi-page and multi-query runs (`duplicateSkipped` tracked in `SOURCE_REPORT`).
- **Strict Null-Safety (`N5`):** Unlisted salaries, missing barcodes, or undisclosed metrics are emitted as `null` — never coerced to `0` or `"N/A"`.
- **Policy C Empty-Result Honesty (`N8`):** Invalid URLs, empty inputs, or zero-match filters emit a free `rowType: "status"` diagnostic row (`$0.00`) and exit cleanly with `SUCCEEDED`; total upstream network outages fail loudly via `Actor.fail()`.

### ⏱️ Performance — Measured

- **Default Memory:** `256 MB` (`minMemoryMbytes: 256`, `maxMemoryMbytes: 1024`), keeping `apify-actor-start` at 0.25 GB compute footprint.
- **Measured Live Verification:** Local proxy E2E verification completed in **15.5s** with `100%` valid schema fields and `0` unhandled socket hangs (`dispatcher.destroy()` cleanup on every request).

### 💼 Use Cases

#### 1. Pige Immobilière — Private Owner (Particulier) Real Estate Leads

Target `sellerType: "private"` and `category: "ventes_immobilieres"` sorted by `"time"` to capture newly listed FSBO apartments and houses with `pricePerSqmEur`, `surfaceSqm`, and `energyRate` (DPE) before competing agencies.

```json
{
  "searchQueries": [
    "appartement"
  ],
  "locations": [
    "Paris",
    "Lyon"
  ],
  "category": "ventes_immobilieres",
  "sellerType": "private",
  "sortBy": "time",
  "minPriceEur": 150000,
  "maxPriceEur": 600000,
  "maxAdsPerSearch": 35
}
```

#### 2. French B2B SMB & Artisan Lead Generation with SIREN Directors

Filter `sellerType: "pro"` with `enrichProSirene: true` to turn active Leboncoin commercial advertisers into verified French company leads complete with legal entity names, NAF codes, and named `companyDirectors[]`.

```json
{
  "searchQueries": [
    "utilitaire",
    "remorquage"
  ],
  "locations": [
    "Paris"
  ],
  "sellerType": "pro",
  "enrichProSirene": true,
  "maxAdsPerSearch": 35
}
```

#### 3. Custom Filtered Leboncoin URL Monitoring (`searchUrls`)

Configure any complex radius, department, room-count, or vehicle filter in your browser on leboncoin.fr and paste the resulting URL directly into `searchUrls`.

```json
{
  "searchUrls": [
    "https://www.leboncoin.fr/recherche?category=9&text=terrasse&locations=Paris"
  ],
  "maxAdsPerSearch": 30
}
```

### 🔗 Integrations (Node.js, Python, n8n, Make & Clay)

#### Python (`apify-client` v3+)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run = client.actor("foxlabs/leboncoin-scraper").call(run_input={"searchQueries": ["appartement"], "locations": ["Paris"], "category": "ventes_immobilieres", "enrichProSirene": True, "maxAdsPerSearch": 25})

for item in client.dataset(run.default_dataset_id).iterate_items():
    if item.get("rowType") != "status":
        print(item["rowKey"], item)
```

#### Node.js / TypeScript (`apify-client`)

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

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });

const run = await client.actor('foxlabs/leboncoin-scraper').call({"searchQueries":["utilitaire"],"locations":["Paris"],"sellerType":"pro","enrichProSirene":true,"maxAdsPerSearch":25});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.rowType !== 'status'));
```

#### Clay, n8n & Make.com

Use the official **Apify** node in **n8n** or **Make**, select `foxlabs/leboncoin-scraper`, map your dynamic search inputs, and iterate over dataset items where `rowType != "status"`. In **Clay**, use the HTTP API column pointing to `run-sync-get-dataset-items` or Standby `POST /scrape`.

### 📊 Pricing (Pay-Per-Event)

Billed at **$0.0020 per `listing`** (`$2.00 / 1,000`, including automatic `$0` French SIREN company & director enrichment!) or **$0.0065 per `listing-detail`** (`$6.50 / 1,000`) when individual `/ad/` pages are requested (`$0` start fee, `status` rows `$0.00`).

| Event Name | Price | When It Fires |
|---|---|---|
| `listing` *(Primary — Search + Free SIREN Enrichment)* | **$0.0020 / listing** (`$2.00 / 1,000`) | Search or category runs with `includeAdDetails: false` (default). Includes prices, GPS, real estate/vehicle attributes, photos, and INSEE/RNE `SIREN` company + director enrichment! |
| `listing-detail` *(Individual `/ad/` Page)* | **$0.0065 / detailed listing** (`$6.50 / 1,000`) | Direct `adUrls` runs or search runs with `includeAdDetails: true`. Never double-charged with `listing`. |
| `status` *(Diagnostics)* | **FREE (`$0.00`)** | `empty_input`, `invalid_url`, `no_results`, `ad_not_found`, and `filtered_empty` rows cost $0. |

### ❓ Frequently Asked Questions (FAQ)

#### Do I need to provide my Leboncoin email, password, or 2FA code?

Never. Some competing Leboncoin scrapers ask for your personal login credentials and 2FA codes, putting your account at immediate ban risk. `foxlabs/leboncoin-scraper` is 100% keyless and cookieless, bypassing DataDome automatically on our managed proxy layer.

#### How does the official French SIREN company and director enrichment work?

Professional (`pro`) sellers on Leboncoin publish their 9-digit `sellerSiren` identifier in the ad payload. When `enrichProSirene: true` (enabled by default), the Actor resolves each unique SIREN against France's official open government registry (`recherche-entreprises.api.gouv.fr`) with in-memory caching to append `companyLegalName`, `companyNafCode`, `companyEmployeeBand`, `companyHeadquartersCity`, and `companyDirectors[]` (`dirigeants`) — with **zero extra PPE fee**!

#### Why is SIREN matching 100% accurate compared to fuzzy company name matching?

Fuzzy name matching across classifieds frequently links common trade names to the wrong legal entity. Because `sellerSiren` is France's unique 9-digit national INSEE enterprise identifier, matching is 100% deterministic with zero false positives.

#### Do I need `includeAdDetails: true` (`listing-detail`), or is default search mode (`listing`) enough?

For 95% of workflows, default search mode (`includeAdDetails: false` at `$2.00 / 1,000`) is all you need! Leboncoin's search `__NEXT_DATA__` payload already contains `priceEur`, GPS coordinates, photos, all structured real estate/vehicle `attributes`, `sellerSiren`, and often `descriptionText`. Only enable `includeAdDetails: true` (`$6.50 / 1,000`) if a category truncates `descriptionText` on search cards or when scraping specific `adUrls`.

#### Which real estate fields are normalized out of the box?

For sales (`ventes_immobilieres`), rentals (`locations`), and commercial property (`bureaux_commerces`), the Actor extracts `priceEur`, `oldPriceEur` (price-drop detection!), `pricePerSqmEur`, `realEstateType`, `surfaceSqm`, `rooms`, `bedrooms`, `energyRate` (DPE `A–G`), `gesRate`, and `furnished`.

#### Which automotive fields are normalized for cars (`voitures`) and vans (`utilitaires`)?

Vehicle listings populate `vehicleBrand`, `vehicleModel`, `regYear`, `mileageKm`, `fuelType`, `gearbox`, and `horsepowerDin`, alongside every raw key-value pair preserved in `attributesMap`.

#### Can I paste any custom Leboncoin search URL from my browser?

Yes. Build any multi-criteria search on `leboncoin.fr` (custom map polygons, radius around a postal code, DPE classes, mileage brackets) and paste the URL into `searchUrls`. Pagination (`page=2, 3...`) is handled automatically.

#### Are ads excluded by `sellerType`, `minPriceEur`, or `maxPriceEur` billed?

No. Server-side URL parameters (`owner_type`, `price`) and pre-billing guards filter ads *before* dataset emission. Unmatched ads cost **$0.00**.

#### Am I ever billed twice if the same ad appears across multiple queries?

No. Every ad is keyed by `leboncoin:ad:<listId>` and deduplicated across queries, pages, and container restarts.

#### What happens if an `adUrl` has expired or been sold (`404`)?

Following Policy C, expired or removed ads emit a free `rowType: "status"` (`status: "ad_not_found"`, `$0.00`) record and complete with `SUCCEEDED`.

#### Does this Actor work with Apify MCP and Standby HTTP?

Yes. Connect `https://mcp.apify.com?tools=foxlabs/leboncoin-scraper` to your AI assistant or call `POST /scrape` in Standby mode for real-time JSON responses.

#### What RAM allocation should I use?

Keep the default **256 MB**. Pure HTTP `__NEXT_DATA__` parsing uses minimal memory and keeps compute overhead near zero.

### 🐛 Troubleshooting

- **Received a `rowType: "status"` row instead of listings?** Inspect the `status` and `message` fields on that row (`empty_input`, `invalid_url`, `no_results`, or `filtered_empty`). Relax overly strict price/rating filters or verify your target URL domain. Status rows are always **$0.00**.
- **Want to cap maximum spend per run?** Set Apify's built-in **Maximum cost per run (`maxTotalChargeUsd`)** option in Console or API calls — the Actor checks remaining budget via `calculateMaxEventChargeCountWithinLimit()` before running enrichment batches and exits cleanly when your cap is reached.

### 🚧 What It Does Not Do

- Does not log into user accounts or unlock SMS-gated private seller phone numbers.
- Does not send automated messages to sellers on Leboncoin.
- Does not guess SIREN numbers for private individual (`private`) sellers.

### ⚠️ Trademark Notice

`foxlabs/leboncoin-scraper` is an independent data extraction tool developed by **foXLabs** and is not affiliated with, endorsed by, or sponsored by the target website or its parent companies. All product and company names are trademarks of their respective holders.

### ⚖️ Is It Legal to Scrape Public Leboncoin.fr Classified Listings?

This Actor extracts only **publicly accessible web data** visible to unauthenticated visitors without bypassing login walls or private account areas. Users are responsible for complying with applicable data-protection regulations (such as GDPR/CCPA where personal data may appear in user-generated posts) and using extracted data lawfully.

### 🤝 Support, Custom Data & Contact

Need custom columns, higher volume SLAs, or a dedicated enterprise data feed?

- **Portfolio & Guides:** <https://data.foxlabs.com.tr>
- **Email:** `info@foxlabs.com.tr`
- **Issues:** Open a ticket on the **Issues** tab of this Actor in Apify Console (target response < 48h).

### Changelog

#### `0.1.0` (2026-11-20)

- Initial release of `foxlabs/leboncoin-scraper` with 63+ structured columns, pre-billing filters, anti-bleed circuit breakers, `SOURCE_REPORT` telemetry, and dual Batch + Standby HTTP support.

# Changelog

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

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search on Leboncoin.fr (e.g. \['appartement', 'utilitaire', 'fonds de commerce']).

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

Optional city or postal code names paired with searchQueries (e.g. \['Paris', 'Lyon', '75011']). Leave empty for all of France.

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

Paste any filtered https://www.leboncoin.fr/recherche?... or category URL.

## `adUrls` (type: `array`):

Direct Leboncoin listing URLs (https://www.leboncoin.fr/ad/<category>/<id>) for full ad extraction ('listing-detail').

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

Optional main Leboncoin category filter.

## `sellerType` (type: `string`):

Filter between Private individuals ('private' — FSBO / owner leads) and Professional businesses ('pro' — carries SIREN).

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

Listing sort order on Leboncoin.

## `minPriceEur` (type: `number`):

Optional minimum price in EUR.

## `maxPriceEur` (type: `number`):

Optional maximum price in EUR.

## `enrichProSirene` (type: `boolean`):

Automatically resolves professional seller SIREN numbers against France's official open INSEE/RNE registry at $0 extra cost (extracts legal company name, NAF activity code, HQ city, and company directors).

## `includeAdDetails` (type: `boolean`):

When true, visits each individual /ad/ page when full body text is needed ('listing-detail' event). Note: search pages already include prices, GPS, attributes, photos, and seller SIREN!

## `maxAdsPerSearch` (type: `integer`):

Maximum unique ads extracted per search query or URL (~35 ads per page).

## `maxTotalAds` (type: `integer`):

Hard ceiling on total billable ad records across the entire run.

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

Apify Proxy configuration. Automatically handles DataDome bypass out of the box.

## Actor input object example

```json
{
  "searchQueries": [
    "utilitaire"
  ],
  "locations": [
    "Paris"
  ],
  "category": "all",
  "sellerType": "all",
  "sortBy": "relevance",
  "enrichProSirene": true,
  "includeAdDetails": false,
  "maxAdsPerSearch": 25,
  "maxTotalAds": 100,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `sourceReport` (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 = {
    "searchQueries": [
        "utilitaire"
    ],
    "locations": [
        "Paris"
    ],
    "maxAdsPerSearch": 25,
    "maxTotalAds": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("foxlabs/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 = {
    "searchQueries": ["utilitaire"],
    "locations": ["Paris"],
    "maxAdsPerSearch": 25,
    "maxTotalAds": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("foxlabs/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 '{
  "searchQueries": [
    "utilitaire"
  ],
  "locations": [
    "Paris"
  ],
  "maxAdsPerSearch": 25,
  "maxTotalAds": 100
}' |
apify call foxlabs/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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