# Leboncoin Search Scraper (ads, prices, locations) (`tamnt67/leboncoin-scraper`) Actor

Scrape leboncoin.fr search results: classified ads with title, price, category, city, department, region, coordinates, seller type (pro or private), attributes, images, dates and URL. Search by keyword or paste any Leboncoin search URL with filters. No login.

- **URL**: https://apify.com/tamnt67/leboncoin-scraper.md
- **Developed by:** [Tam Ng.](https://apify.com/tamnt67) (community)
- **Categories:** E-commerce
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.50 / 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?

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 Search Scraper (ads, prices, locations)

Extract classified ads from **leboncoin.fr**, France's largest marketplace for second-hand goods, cars, real estate, jobs and services. Enter keywords or paste any Leboncoin search URL with your filters and get every ad with title, price, category, city, department, region, coordinates, seller type (pro or private), seller name, structured attributes, images, dates and URL.

Use it for price research, lead generation from pro sellers, real estate and car market monitoring, flipping, or feeding ads into your own tools.

### What you get for each ad

| Field | Example |
|-------|---------|
| `adId` | 3298025136 |
| `title` / `description` | Appartement 2 pièces 47 m² / ... |
| `price` / `currency` | 160500 / EUR |
| `category` / `categoryId` / `adType` / `status` | Ventes immobilières / 9 / offer / active |
| `city` / `zipcode` / `district` / `department` / `region` | Rezé / 44400 / Ragon - La Malnoue / Loire-Atlantique / Pays de la Loire |
| `latitude` / `longitude` | 47.158012 / -1.5534474 |
| `sellerType` / `sellerName` / `sellerStoreId` / `sellerSiren` | pro / ERA SEVRE NANTAISE / 35421342 / 838147619 |
| `hasPhone` / `isBoosted` / `brand` | true / true / null |
| `attributes` | { "Type de bien": "Appartement", "Surface habitable": "47 m²", ... } |
| `publishedAt` / `indexedAt` | 2026-10-30 09:32:17 / 2026-11-04 17:35:06 |
| `image` / `images` / `imageCount` / `url` | thumbnail, all images, count, ad URL |
| `page` / `query` / `scrapedAt` | 1 / keyword "vélo électrique" / ISO timestamp |

Download as JSON, CSV, Excel or XML, or read through the API.

### How to use

1. Enter **keywords**, or paste **Leboncoin search URLs** such as `https://www.leboncoin.fr/recherche?category=2&text=golf+7&locations=Lyon`. Filters you set on the website (category, location, price, condition, seller type) stay in the URL and are respected.
2. Choose a **sort order**: relevance, newest, price.
3. Set **max ads per keyword or URL**. Leboncoin returns 35 ads per page and up to 100 pages.
4. Run. Results appear in the dataset as pages are scraped.

#### Example input

```json
{
  "startUrls": [{ "url": "https://www.leboncoin.fr/recherche?category=9&locations=Nantes__47.21_-1.55_10000&real_estate_type=1" }],
  "sortBy": "time",
  "maxItemsPerQuery": 350
}
```

### Pricing

You pay per ad record. Platform usage and residential proxy traffic are included in the price. Set a maximum total charge per run in the run options for a hard cap.

### Tips

- **Newest first** plus a scheduled hourly run is the fastest way to catch new ads before everyone else.
- Build your search on leboncoin.fr with all filters, then paste the URL here to scrape exactly that view.
- Keep the default **residential proxy in France**. Leboncoin blocks datacenter and foreign IPs.

### Limitations

- Search listing data only. Ad detail pages (full description, phone number, all photos in full size) are not scraped.
- Leboncoin can change its site at any time. If the Actor stops returning data, report an issue and it will be fixed quickly.

### Integrations

Works with every Apify integration: API, webhooks, Zapier, Make, Google Sheets, Slack, n8n, LangChain and the Apify MCP server.

# Actor input Schema

## `keywords` (type: `array`):

Search terms in French, e.g. "vélo électrique". Each keyword is searched across all of France and all categories.

## `startUrls` (type: `array`):

Optional. Paste Leboncoin search URLs such as https://www.leboncoin.fr/recherche?category=9\&locations=Paris or a category page. Filters (category, location, price, sort) in the URL are kept.

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

Order of results.

## `maxItemsPerQuery` (type: `integer`):

Leboncoin returns 35 ads per page and up to 100 pages per search.

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

Keep the default: Apify residential proxy located in France. Leboncoin blocks datacenter and foreign IPs.

## Actor input object example

```json
{
  "keywords": [
    "vélo électrique"
  ],
  "startUrls": [],
  "sortBy": "relevance",
  "maxItemsPerQuery": 105,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

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

Dataset with one record per classified ad: title, price, category, location, coordinates, seller, attributes, images, dates, URL.

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

The same dataset exported as CSV.

# 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 = {
    "keywords": [
        "vélo électrique"
    ],
    "maxItemsPerQuery": 105,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tamnt67/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 = {
    "keywords": ["vélo électrique"],
    "maxItemsPerQuery": 105,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("tamnt67/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 '{
  "keywords": [
    "vélo électrique"
  ],
  "maxItemsPerQuery": 105,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call tamnt67/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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