# Leboncoin Scraper Unlimited (`hexadata/leboncoin-scraper-unlimited`) Actor

⚡ The only Leboncoin scraper with NO limits. Get 100% of search results. Real estate, vehicles, jobs, electronics. Structured data ready for market research, pricing analysis, lead generation. Just paste your URL and extract. Fast, reliable, anti-blocking proxy included.

- **URL**: https://apify.com/hexadata/leboncoin-scraper-unlimited.md
- **Developed by:** [HexaData Labs](https://apify.com/hexadata) (community)
- **Categories:** E-commerce, Real estate, Automation
- **Stats:** 22 total users, 1 monthly users, 100.0% runs succeeded, 5 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$34.00/month + usage

To use this Actor, you pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period.You also pay for the Apify platform usage, which gets cheaper the higher Apify subscription plan you have.

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

## 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

Extract **all listings** from Leboncoin.fr without any limits. Easily retrieve real estate, vehicles, rentals data and much more in just a few clicks.

> **Version 1.0.1** - Powered by HexaData Labs

### ✨ Features

- **No limits** - Retrieve all listings, even searches with thousands of results
- **Complete data** - Price, description, location, photos, attributes and more
- **Auto-pagination** - Automatically scrolls through all result pages
- **Anti-blocking** - Uses French residential proxies to avoid restrictions
- **Easy to use** - Copy-paste a URL and start scraping
- **Easy export** - Data available in JSON, CSV, Excel

### 🎯 Use Cases

- **Real estate market research** - Analyze prices by region, city or neighborhood
- **Competitive intelligence** - Monitor your competitors' listings
- **Property search** - Find your ideal house or apartment
- **Vehicle price analysis** - Compare used car prices
- **Data science** - Create datasets for your machine learning projects

### 📋 How to Use

#### Step 1: Get the Search URL

1. Go to [leboncoin.fr/recherche](https://www.leboncoin.fr/recherche)
2. Click on **"Filters"** (Filtres)
3. **Select a category** (Real Estate, Vehicles, Electronics, etc.)
4. **Choose a location** (region, department or city) for relevant results
5. Add other filters if needed (price, area, etc.)
6. **Copy the complete URL** from your browser's address bar

> ⚠️ **Important**: The URL must start with `https://www.leboncoin.fr/recherche?category=`
> 
> Valid example: `https://www.leboncoin.fr/recherche?category=9&locations=Paris`
> 
> ❌ URLs like `https://www.leboncoin.fr/` or `https://www.leboncoin.fr/ventes_immobilieres/` are not supported.

#### Step 2: Configure the Actor

Paste the URL in the **"Leboncoin URL"** field and start scraping!

#### Supported URL Examples

| Search Type | Example URL |
|-------------|-------------|
| Real estate sales | `https://www.leboncoin.fr/recherche?category=9&locations=Paris` |
| Rentals | `https://www.leboncoin.fr/recherche?category=10&locations=Lyon&price=500-1500` |
| Cars | `https://www.leboncoin.fr/recherche?category=2&brand=Renault` |
| Phones | `https://www.leboncoin.fr/recherche?category=17&text=iphone` |
| Any category | Simply copy the URL from your search! |


### ⚙️ Parameters

| Parameter | Description | Default |
|-----------|-------------|---------|
| **Leboncoin URL** | Search URL copied from browser | *(required)* |
| **Max pages** | Maximum number of pages to scrape (leave 100 to get everything) | 100 |
| **Delay between requests** | Pause in seconds between each request | 0.5 |
| **Proxy** | Use Apify proxies (recommended) | Enabled |

### 📤 Data Format

Each listing contains the following information:

```json
{
    "id": "2547896321",
    "titre": "3-room apartment 75m² - City center",
    "description": "Beautiful bright apartment...",
    "prix": 285000,
    "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/2547896321.htm",
    "date_publication": "2025-01-15T10:30:00",
    "categorie": {
        "id": "9",
        "nom": "Real estate sales"
    },
    "localisation": {
        "ville": "Bordeaux",
        "code_postal": "33000",
        "departement": "Gironde",
        "region": "Nouvelle-Aquitaine",
        "latitude": 44.8378,
        "longitude": -0.5792
    },
    "images": [
        "https://img.leboncoin.fr/api/v1/lbcpb1/images/..."
    ],
    "attributs": [
        {"cle": "rooms", "valeur": "3", "label": "3 rooms"},
        {"cle": "square", "valeur": "75", "label": "75 m²"}
    ]
}
````

### 📊 Data Export

After execution, download your data in the format of your choice:

- **JSON** - For development and API integration
- **CSV** - For Excel, Google Sheets, data analysis
- **XML** - Structured format for interoperability
- **Excel** - Native .xlsx format
- **HTML Table** - Ready-to-embed table for web pages
- **RSS** - Feed for news readers
- **JSONL** - JSON Lines, one record per line

### 💡 Tips

1. **Use filters on Leboncoin** - The more precise your search, the more relevant the data
2. **Proxy recommended** - Enable proxy to avoid blocking
3. **Large searches** - For searches with many results, scraping may take several minutes

### 🔒 Compliance

This scraper is intended for personal and research use. Respect Leboncoin's terms of service and applicable legislation regarding data scraping.

### 🆘 Support

Questions? Contact us via the Actor page or open an issue.

***

**Keywords**: leboncoin, scraper, real estate, listings, France, apartment, house, rental, sale, car, second-hand, data extraction, leboncoin API, leboncoin scraping, data extraction, web scraping, real estate France, French classifieds, classified ads

# Actor input Schema

## `url` (type: `string`):

Leboncoin search URL (copied from browser). Must start with https://www.leboncoin.fr/recherche?category=

## `maxPages` (type: `integer`):

Maximum number of pages to scrape (use 100 to get all results)

## `delayBetweenRequests` (type: `number`):

Pause between each request to avoid blocking

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

Residential proxy recommended to avoid blocking

## Actor input object example

```json
{
  "url": "https://www.leboncoin.fr/recherche?category=9&locations=r_12&price=min-90000&real_estate_type=2",
  "maxPages": 100,
  "delayBetweenRequests": 0.5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset containing all scraped listings

# 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 = {
    "url": "https://www.leboncoin.fr/recherche?category=9&locations=r_12&price=min-90000&real_estate_type=2",
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("hexadata/leboncoin-scraper-unlimited").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 = {
    "url": "https://www.leboncoin.fr/recherche?category=9&locations=r_12&price=min-90000&real_estate_type=2",
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("hexadata/leboncoin-scraper-unlimited").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 '{
  "url": "https://www.leboncoin.fr/recherche?category=9&locations=r_12&price=min-90000&real_estate_type=2",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call hexadata/leboncoin-scraper-unlimited --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hexadata/leboncoin-scraper-unlimited",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Leboncoin Scraper Unlimited",
        "description": "⚡ The only Leboncoin scraper with NO limits. Get 100% of search results. Real estate, vehicles, jobs, electronics. Structured data ready for market research, pricing analysis, lead generation. Just paste your URL and extract. Fast, reliable, anti-blocking proxy included.",
        "version": "0.0",
        "x-build-id": "Ah2DhAPOsfXeu5uIE"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/hexadata~leboncoin-scraper-unlimited/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-hexadata-leboncoin-scraper-unlimited",
                "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/hexadata~leboncoin-scraper-unlimited/runs": {
            "post": {
                "operationId": "runs-sync-hexadata-leboncoin-scraper-unlimited",
                "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/hexadata~leboncoin-scraper-unlimited/run-sync": {
            "post": {
                "operationId": "run-sync-hexadata-leboncoin-scraper-unlimited",
                "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": [
                    "url"
                ],
                "properties": {
                    "url": {
                        "title": "Leboncoin URL",
                        "type": "string",
                        "description": "Leboncoin search URL (copied from browser). Must start with https://www.leboncoin.fr/recherche?category="
                    },
                    "maxPages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of pages to scrape (use 100 to get all results)",
                        "default": 100
                    },
                    "delayBetweenRequests": {
                        "title": "Delay Between Requests (seconds)",
                        "minimum": 0.1,
                        "maximum": 5,
                        "type": "number",
                        "description": "Pause between each request to avoid blocking",
                        "default": 0.5
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Residential proxy recommended to avoid blocking"
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
