# Leboncoin Scraper — Any Search & Category URL (`mostafa-ennadi/leboncoin-general-scraper`) Actor

Paste a Leboncoin search or category URL and export structured listings for market research, price monitoring, seller research, inventory tracking, and classifieds datasets.

- **URL**: https://apify.com/mostafa-ennadi/leboncoin-general-scraper.md
- **Developed by:** [mostafa ennadi](https://apify.com/mostafa-ennadi) (community)
- **Categories:** Lead generation, Automation, E-commerce
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 annonces

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?

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 & Category URL

Scrape structured **Leboncoin France listings from almost any search or category URL**. Configure the filters you want directly on Leboncoin, paste the resulting URL, choose a result limit, and run the Actor.

Use it for classifieds market research, price monitoring, seller research, inventory tracking, lead research, category discovery, and recurring data workflows. Results are saved to an Apify dataset and can be exported as **JSON, CSV, Excel, XML, HTML, RSS, or JSONL**.

### Quick start

1. Open Leboncoin and configure the search or category filters you need.
2. Copy the resulting `leboncoin.fr` URL.
3. Paste it into `searchUrl`, choose `max_items` or `max_pages`, and run the Actor.

Example input:

```json
{
  "searchUrl": "https://www.leboncoin.fr/recherche?text=velo",
  "max_items": 100
}
```

Example normalized output:

```json
{
  "list_id": "2812345678",
  "url": "https://www.leboncoin.fr/ad/example/2812345678",
  "subject": "Example listing",
  "price": 120,
  "has_phone": false,
  "phonenumber": "",
  "first_publication_date": "2026-09-12T10:00:00Z",
  "category_id": "0",
  "owner_type": "private",
  "owner_name": "",
  "location_city_label": "Paris"
}
```

### Why use this Leboncoin scraper?

- **URL-first setup:** reuse Leboncoin's own filters instead of rebuilding a large category-specific form.
- **Broad category coverage:** useful for jobs, electronics, home and garden, fashion, leisure, professional equipment, vehicles, real estate, and other supported classifieds searches.
- **Clean structured output:** normalized listing, price, seller, location, publication, and phone-related fields in the default dataset.
- **Easy exports and integrations:** use Apify datasets with spreadsheets, databases, CRMs, monitoring pipelines, webhooks, or other automation tools.
- **Simple for one-off and recurring runs:** validate a small result set first, then scale the result limit when the URL produces the data you need.

#### Repeated runs and deduplication

Each run writes to a separate default Apify dataset and this wrapper does not keep a persistent cross-run deduplication history. If you schedule the same search repeatedly, the same listing may therefore appear in multiple run datasets. Use `list_id` as the stable merge/dedup key in your database, spreadsheet, or automation workflow.

### Input

| Field | Type | Description |
| --- | --- | --- |
| `searchUrl` | string | **Required.** Leboncoin search or category URL containing your filters. |
| `max_pages` | integer | Optional maximum number of result pages to process. |
| `max_items` | integer | Maximum listings to return. Default `1000`, maximum `20000`. |

Only `leboncoin.fr` and its subdomains are accepted. External hosts, unsupported URL schemes, and URLs containing credentials are rejected before a scrape starts.

### Dataset fields

The default dataset exposes normalized listing, category, seller, location, image-count, attribute, publication/update, price, URL, and phone-related fields when the underlying result provides them.

Exact field availability can vary by category and listing. This general Actor does **not** promise universal phone extraction across every Leboncoin category.

### Common use cases

- Monitor new listings for a saved Leboncoin search.
- Compare asking prices across categories, locations, or market segments.
- Build classifieds datasets for research and analysis.
- Research private and professional sellers.
- Feed listing data into spreadsheets, databases, CRMs, dashboards, or monitoring pipelines.
- Cover Leboncoin categories that do not need a dedicated category-specific input form.

### Cars and real estate

For dedicated no-code filter forms in the two largest verticals, use the specialized Actors:

- [Leboncoin Cars Scraper — Vehicle Listings, Sellers & Phone Leads](https://apify.com/mostafa-ennadi/leboncoin-cars-phone-leads-scraper)
- [Leboncoin Real Estate Scraper — Listings, Sellers & Phone Leads](https://apify.com/mostafa-ennadi/leboncoin-immobilier-phone-leads-scraper)

Use this General Actor when you already have the exact Leboncoin search/category URL or need broader category coverage.

### Pricing

The Apify Store currently displays this Actor **from $1.00 per 1,000 annonces**. Start with a small `max_items` value to validate your search URL and output before scaling up.

### Tips for better results

Keep the filters you care about inside the pasted Leboncoin URL. A focused search URL usually produces a cleaner dataset than a very broad category URL. For cars or real estate, the dedicated Actors above can be more convenient when you prefer structured filter controls instead of building the search on Leboncoin first.

### FAQ

#### Can I use any Leboncoin category?

The Actor is designed for broad URL-based coverage across supported Leboncoin search and category URLs. Because categories can expose different fields and website behavior can change, validate a small run for your specific URL first.

#### Does it extract phone numbers?

Phone-related fields are included in the normalized output when the underlying result exposes them. Availability varies, so universal phone extraction is not promised for every category or listing.

#### Can I export to CSV or Excel?

Yes. Results are stored in the default Apify dataset, which supports JSON, CSV, Excel and other export formats.

#### How do I report a problem?

Use the Actor's **Issues** tab and include a sanitized example Leboncoin URL plus the behavior you expected. Do not include private credentials or sensitive data.

### Responsible use

Website behavior and available fields can change. Use scraped data in accordance with applicable laws, platform terms, and your own compliance requirements.

# Actor input Schema

## `searchUrl` (type: `string`):

Required. Paste a leboncoin.fr search or category URL containing the filters you want to scrape.

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

Optional maximum number of result pages to process.

## `max_items` (type: `integer`):

Maximum number of listings to return. Default: 1,000. Maximum: 20,000.

## Actor input object example

```json
{
  "searchUrl": "https://www.leboncoin.fr/recherche?text=velo",
  "max_pages": 1,
  "max_items": 20
}
```

# Actor output Schema

## `dataset` (type: `string`):

Scraped Leboncoin listings saved to the default dataset.

# 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 = {
    "max_pages": 1,
    "max_items": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("mostafa-ennadi/leboncoin-general-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 = {
    "max_pages": 1,
    "max_items": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("mostafa-ennadi/leboncoin-general-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 '{
  "max_pages": 1,
  "max_items": 20
}' |
apify call mostafa-ennadi/leboncoin-general-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mostafa-ennadi/leboncoin-general-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/olrvSWWhycYI9DG1e/builds/RxQXpXqvC0GuG7Qns/openapi.json
