# Leboncoin Scraper – any search URL, full ad details (`amitaviv/leboncoin-scraper`) Actor

Scrape leboncoin.fr listings from any search URL: real estate, cars, jobs, everything. Full descriptions, seller info, GPS, DPE, images. $1 per 1,000 ads, no proxy setup.

- **URL**: https://apify.com/amitaviv/leboncoin-scraper.md
- **Developed by:** [Amit Aviv](https://apify.com/amitaviv) (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 $0.80 / 1,000 ad scrapeds

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 — any search URL → clean ads with full details

Extract listings from **leboncoin.fr**, France's largest classifieds site, from any search URL you paste in. Works for every category: real estate (ventes immobilières, locations), cars and motorcycles (voitures, motos), jobs, electronics, furniture, holiday rentals, everything else. Also scrapes individual ad URLs.

No proxy configuration, no cookies, no login. Pay only for the ads you get.

### What you get

For every ad, one clean JSON record with:

- **Core**: id, url, title, full description, price (EUR), price per m², category, ad type, status, published / updated / expiration dates
- **Location**: city, zipcode, district, department, region, GPS latitude/longitude, plus a flag telling you whether the point is exact or approximate
- **Seller**: private or professional, seller name, store id, SIREN (for professionals), whether a phone number is on the ad
- **Category-specific shortcuts** already typed as numbers: square meters, rooms, bedrooms, property type, energy rating (DPE) and GES for real estate; brand, model, mileage, year, fuel, gearbox for vehicles
- **Every attribute** leboncoin exposes for that ad, both as machine keys (`attributes`) and with French labels (`attributeLabels`) — building year, floor, elevator, heating, notary fee estimate, condition, and so on
- **Images**: all full-size image URLs and image count
- **Listing options**: urgent, boosted / highlighted

### How to use it

1. Go to [leboncoin.fr](https://www.leboncoin.fr), search with whatever filters you want — category, location, price range, surface, brand, keywords, sort order.
2. Copy the URL of the results page (it looks like `https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=min-300000`).
3. Paste one or more of those URLs into **Leboncoin search URLs**, set **Max ads per search URL**, and run.

Turn on **Fetch full ad details** if you need the complete description text and every attribute for each ad. Search results already contain the full record for most ads; details mode guarantees it for all of them and takes a little longer.

To scrape specific ads, paste their URLs (`https://www.leboncoin.fr/ad/ventes_immobilieres/3257586890`) into **Individual ad URLs**.

### Example output

```json
{
  "id": 3153655213,
  "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3153655213",
  "title": "Appartement 1 pièce 15 m²",
  "description": "Studio lumineux au dernier étage...",
  "price": 175000,
  "currency": "EUR",
  "pricePerSquareMeter": 11667,
  "category": "Ventes immobilières",
  "publishedAt": "2026-08-15T14:53:25",
  "updatedAt": "2026-09-05T11:23:31",
  "city": "Paris",
  "zipcode": "75017",
  "district": "La Fourche",
  "department": "Paris",
  "region": "Ile-de-France",
  "latitude": 48.887012,
  "longitude": 2.3254478,
  "locationIsApproximate": true,
  "ownerType": "pro",
  "ownerName": "VENUS",
  "ownerSiren": "845212117",
  "hasPhone": true,
  "squareMeters": 15,
  "rooms": 1,
  "realEstateType": "Appartement",
  "energyRate": "e",
  "ges": "b",
  "imageUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/26/d0/97/26d0977...jpg",
  "imageCount": 5,
  "attributes": { "building_year": "1910", "floor_number": 0, "elevator": "2", "heating_type": "individual", "..." : "..." },
  "attributeLabels": { "elevator": { "label": "Ascenseur", "valueLabel": "Non" }, "...": {} }
}
```

A car ad fills `brand`, `model`, `mileage`, `year`, `fuel`, `gearbox` instead of the real-estate fields.

### Pricing

Pay per result: **$1.00 per 1,000 ads** on the Free and Bronze plans, cheaper on higher plans. Full details cost nothing extra. There are no platform usage charges on top — the price per ad is all you pay.

A run collecting 500 ads costs $0.50. Leboncoin caps any single search at 100 pages (3,500 ads); split broad searches by location, price band, or category to go beyond that.

### Use cases

- **Real estate**: monitor new listings for a city or department, track price per m² over time, find private sellers (`ownerType: "private"`) before agencies do
- **Automotive**: watch prices for a model, year and mileage band; compare dealer vs. private pricing
- **Market research and pricing**: build price indexes for second-hand goods
- **Lead generation**: professional sellers with SIREN and store id, filtered by category and area
- **Alerts and automations**: schedule the actor and push new ads to Slack, email, Google Sheets, Airtable, or your own webhook with Apify integrations

### Integrations and API

Use this actor from the Apify Console, via the [Apify API](https://docs.apify.com/api/v2), from the Apify CLI, or as a tool for AI agents through the Apify MCP server. Schedule runs, and connect the output to Zapier, Make, n8n, Google Sheets, Slack, or any webhook.

Example with the Apify API:

```bash
curl -X POST "https://api.apify.com/v2/acts/amitaviv~leboncoin-scraper/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchUrls":["https://www.leboncoin.fr/recherche?category=2&brand=Peugeot&locations=Lyon"],"maxItemsPerSearch":200}'
```

### Notes and limitations

- Phone numbers are not extracted; leboncoin only shows them to logged-in users on the site, and this actor does not log in.
- Leboncoin returns at most 35 ads per page and 100 pages per search. Narrow the search to get complete coverage of a large market.
- Dates are given in Europe/Paris local time as shown on the site.
- Ads that disappear from leboncoin between listing and detail fetch are returned with the search-result data only.

### Legality and fair use

This actor extracts publicly available listing data only. You are responsible for using the data in compliance with leboncoin's terms of service, GDPR, and applicable law. Do not use it to contact individuals without a lawful basis.

### Support

If a search URL does not return what you expect, or leboncoin changes its site, open an issue on the actor's **Issues** tab and include the search URL. Site changes are usually fixed within a day.

# Actor input Schema

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

Paste one or more leboncoin.fr search result URLs (any category, any filters, any sort). Example: https://www.leboncoin.fr/recherche?category=9\&locations=Paris\&price=min-300000

## `maxItemsPerSearch` (type: `integer`):

Stop after this many ads for each search URL. Leboncoin caps searches at 100 pages × 35 ads = 3,500.

## `fetchDetails` (type: `boolean`):

Also open each ad to get the full description text and all attributes (slower; same price per ad). If off, you get the description and attributes as shown in search results, which are already complete for most categories.

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

Scrape specific ads by URL, e.g. https://www.leboncoin.fr/ad/ventes\_immobilieres/3257586890

## `includeRaw` (type: `boolean`):

Attach the untouched raw JSON from leboncoin under the `raw` field.

## Actor input object example

```json
{
  "searchUrls": [
    "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=min-300000"
  ],
  "maxItemsPerSearch": 100,
  "fetchDetails": false,
  "adUrls": [],
  "includeRaw": false
}
```

# Actor output Schema

## `ads` (type: `string`):

All scraped ads as JSON, one object per ad.

## `adsCsv` (type: `string`):

All scraped ads as a CSV file.

## `adsExcel` (type: `string`):

All scraped ads as an Excel file.

# 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=9&locations=Paris&price=min-300000"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("amitaviv/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=9&locations=Paris&price=min-300000"] }

# Run the Actor and wait for it to finish
run = client.actor("amitaviv/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=9&locations=Paris&price=min-300000"
  ]
}' |
apify call amitaviv/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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