# 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:** 91 total users, 17 monthly users, 98.8% runs succeeded, 3 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.89 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

A simple tool to extract Leboncoin listings and turn the French marketplace into structured, usable data.

Stop scrolling and copy-pasting. Collect thousands of listings automatically, filter by your exact criteria, and export to JSON or CSV for analysis.

### 🎯 Use cases

This tool can be used for: real-estate analysis, price monitoring, deal hunting, competitive watch, lead generation, Market research, etc.

---

### 🚀 Quick start

1. Go to Leboncoin.fr and perform a search
2. Copy the search URL **from the search results page** (the URL should start with `https://www.leboncoin.fr/recherche?...`)
3. Paste it in the input (or provide multiple URLs) and run
4. Fetch your data in minutes

No technical knowledge required.

---

#### Example Input

```json
{
  "max_age_days": 0,
  "max_pages": 0,
  "proxyConfiguration": {
    "useApifyProxy": false,
    "proxyUrls": [
      "http://LOGIN:PASSWORD@HOST:PORT"
    ]
  },
  "urls_list": [
    "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
  ],
  "limit_per_page": 35,
  "delay_between_pages": 0
}
````

***

#### Example Output

```json
{
  "id": 3083651141,
  "first_publication_date": "2025-10-29 23:25:53",
  "index_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...",
  "brand": "leboncoin",
  "ad_type": "offer",
  "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3083651141",
  "price": 329500,
  "images": [...],
  "attributes": [
    {
      "key": "real_estate_type",
      "value": "2",
      "value_label": "Appartement"
    },
    {
      "key": "square",
      "value": "28",
      "value_label": "28 m²"
    },
    {
      "key": "rooms",
      "value": "2",
      "value_label": "2"
    },
    {
      "key": "bedrooms",
      "value": "1",
      "value_label": "1 ch."
    },
    {
      "key": "energy_rate",
      "value": "f",
      "value_label": "F"
    }
  ],
  "location": {
    "country_id": "FR",
    "region_id": "12",
    "region_name": "Ile-de-France",
    "department_id": "75",
    "department_name": "Paris",
    "city": "Paris",
    "zipcode": "75011",
    "lat": 48.85763,
    "lng": 2.38005
  },
  "has_phone": true,
  "scraped_at": "2025-10-29 22:29:25",
  "search_category": "IMMOBILIER_VENTES_IMMOBILIERES",
  "search_location": "Paris",
  "search_url": "https://www.leboncoin.fr/recherche?category=9&locations=Paris&price=250000-400000&rooms=2-4&real_estate_type=2"
}
```

***

### ✨ Features

- Advanced filters: price, surface, rooms, DPE, mileage, year, fuel, geolocation, keywords, etc.
- Formats: JSON or CSV
- Performance: 100–200 ads/min, no page limit (set `max_pages = 0`)

***

### ⁉️FAQ

- Cost: $39/month — unlimited extraction
- Legal: public data only. Respect Terms of Service and GDPR
- Blocking: FR residential proxies recommended for high volume
- Freshness: data is collected at runtime
- Automation: integrates with Apify API and workflows

***

### 🚀 Ready?

Open the "Input" tab → paste your URL(s) → Run → Get your data in "Output"

### 🆘 Issues

If you have any questions or encounter any issues, please kindly post them in the "Issues" tab — I will be happy to help and respond as soon as possible! 😊

# 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("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapifier/leboncoin-universal-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Leboncoin Universal Scraper",
        "description": "⚡ 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!",
        "version": "0.0",
        "x-build-id": "JhRV5foGvPGpx8N8l"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapifier~leboncoin-universal-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapifier-leboncoin-universal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapifier~leboncoin-universal-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapifier-leboncoin-universal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapifier~leboncoin-universal-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapifier-leboncoin-universal-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls_list"
                ],
                "properties": {
                    "urls_list": {
                        "title": "Search URLs *",
                        "type": "array",
                        "description": "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.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "max_pages": {
                        "title": "Max pages",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape. Set 0 to scrape all available pages (practical limit of 99999 pages). Recommended: 10-20 to start.",
                        "default": 10
                    },
                    "limit_per_page": {
                        "title": "Ads per page",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Number of ads to scrape per page (Leboncoin typically displays 35 ads/page)",
                        "default": 35
                    },
                    "delay_between_pages": {
                        "title": "Delay between pages (seconds)",
                        "minimum": 0,
                        "maximum": 5,
                        "type": "number",
                        "description": "Wait time between each page (0 = maximum speed recommended)",
                        "default": 0
                    },
                    "max_age_days": {
                        "title": "Max ad age (days)",
                        "minimum": 0,
                        "maximum": 365,
                        "type": "integer",
                        "description": "Ignore ads older than X days (0 = disabled)",
                        "default": 0
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Use proxies to avoid blocking (recommended for high volume)"
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
