# Leboncoin Listings Scraper (`piotrv1001/leboncoin-listings-scraper`) Actor

Leboncoin Listings Scraper scrapes listings from leboncoin.fr search results, capturing titles, prices, images, location, seller info, category attributes, and optional full details — ideal for price tracking, market research, and competitive analysis of France's largest classifieds marketplace.

- **URL**: https://apify.com/piotrv1001/leboncoin-listings-scraper.md
- **Developed by:** [FalconScrape](https://apify.com/piotrv1001) (community)
- **Categories:** E-commerce, Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 product listings

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/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 Listings Scraper

Extract product listings from leboncoin.fr at scale. The **Leboncoin Listings Scraper** lets you scrape structured listing data from France's largest classifieds marketplace — titles, prices, locations, images, seller info, attributes, and more.

### ✨ Features

- 🔍 **Keyword & Category Search**: Search by free-text queries, category IDs, price ranges, location, or seller type.
- 🔗 **Direct URL Mode**: Paste any leboncoin search URL and scrape it directly.
- 📋 **Rich Listing Data**: Extracts title, price, original price, condition, images (4 resolutions), all category-specific attributes, full location, and seller details.
- 📝 **Optional Full Descriptions**: Fetch the complete listing description from the detail page when needed.
- ⚡ **Fast & Cost-Effective**: Uses HTML parsing (`__NEXT_DATA__` extraction) — no browser needed, 10× cheaper than Playwright-based scrapers.
- 🔄 **Proxy-Ready**: Built-in Apify residential proxy support to bypass DataDome anti-bot protection.

### 🛠️ How It Works

1. **Configure your search** – Enter keywords, category IDs, filters, or paste a leboncoin search URL.
2. **Run the scraper** – The actor fetches search result pages and extracts all listing data from the embedded JSON payload.
3. **Get structured results** – Each listing is normalized and saved to the dataset with consistent field names.

> **Note**: Leboncoin is protected by DataDome anti-bot. Residential proxies are required for any run beyond a few pages. The default proxy configuration uses Apify's residential proxy pool.

### 📊 Sample Output Data

```json
{
    "listId": 3162295955,
    "title": "Vélo électrique",
    "url": "https://www.leboncoin.fr/ad/velos/3162295955",
    "status": "active",
    "categoryId": "27",
    "categoryName": "Vélos",
    "adType": "offer",
    "price": 350,
    "priceCents": 35000,
    "originalPrice": null,
    "buyerFee": 0,
    "description": "Cause déménagement vends vélo électrique marque Gitane xs, batterie à remplacer...",
    "firstPublicationDate": "2026-03-15 10:22:41",
    "lastIndexDate": "2026-03-28 08:14:55",
    "images": [
        {
            "thumbnailUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/ab/12/.../rule=ad-thumb",
            "smallUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/ab/12/.../rule=ad-small",
            "imageUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/ab/12/.../rule=ad-image",
            "largeUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/ab/12/.../rule=ad-large"
        }
    ],
    "imageCount": 3,
    "condition": "Bon état",
    "attributes": {
        "bike_type": "Vélo de ville/Hybride",
        "bike_practice": "Ville"
    },
    "location": {
        "city": "Orléans",
        "zipcode": "45000",
        "department": "Loiret",
        "region": "Centre-Val de Loire",
        "latitude": 47.90183,
        "longitude": 1.90307,
        "country": "FR"
    },
    "seller": {
        "storeId": "72901445",
        "userId": "b2e4a1f8-...",
        "name": "Marie45",
        "type": "private",
        "ratingScore": null,
        "ratingCount": null,
        "profilePictureUrl": null
    },
    "shippable": false,
    "shippingTypes": [],
    "isBoosted": false,
    "hasOptions": false,
    "hasPhone": false,
    "scrapedAt": "2026-03-28T14:05:33.000Z"
}
````

### ⚙️ Input

| Field | Type | Default | Description |
|---|---|---|---|
| `searchQueries` | `string[]` | `["iPhone 16"]` | Free-text keywords to search. Each query runs as a separate search. |
| `startUrls` | `RequestSource[]` | `[]` | Leboncoin search URLs to scrape directly. Takes precedence over all filters. |
| `categoryIds` | `number[]` | `[]` | Category IDs to filter by (e.g. `17` = Phones, `2` = Vehicles). |
| `locations` | `string[]` | `[]` | Location filters in `City_zipcode` format (e.g. `Paris_75000`). |
| `priceMin` | `integer` | — | Minimum price in euros. |
| `priceMax` | `integer` | — | Maximum price in euros. |
| `ownerType` | `"pro" \| "private"` | — | Filter by seller type. |
| `shippableOnly` | `boolean` | `false` | Only return listings that offer shipping. |
| `sort` | `"time" \| "price"` | `"time"` | Sort order: newest first or by price. |
| `includeDetails` | `boolean` | `false` | Fetch the full description from each listing's detail page. Slower; charged at the `item-details` rate. |
| `maxItems` | `integer` | `50` | Maximum number of listings to return. `0` = unlimited. |
| `maxPages` | `integer` | `100` | Max result pages per search query (leboncoin hard cap: 100 pages = 3,500 results). |
| `proxyConfiguration` | `object` | Apify residential | Proxy settings. Residential proxies are required — DataDome blocks datacenter IPs after a few requests. |

#### Category IDs (common)

| ID | Category (French) |
|---|---|
| 2 | Véhicules |
| 9 | Ventes immobilières |
| 10 | Locations |
| 15 | Informatique |
| 16 | Image & Son |
| 17 | Téléphones & Objets connectés |
| 18 | Consoles & Jeux vidéo |
| 23 | Vélos |
| 27 | Vêtements |
| 29 | Ameublement |
| 30 | Électroménager |
| 35 | Emploi |

### 💰 Pricing

This actor uses **pay-per-event** billing — you are charged per result, not per compute time.

| Event | Price | When charged |
|---|---|---|
| `product-listing` | **$1.00 per 1,000 results** | Each listing scraped from search results (no detail page) |
| `item-details` | **$4.00 per 1,000 results** | Each listing scraped with full description (`includeDetails: true`) |

The higher rate for `item-details` reflects the additional request required to fetch each listing's detail page.

# Actor input Schema

## `searchQueries` (type: `array`):

Free-text keywords to search for (e.g. 'iPhone 16', 'vélo électrique'). Multiple queries will run as separate searches.

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

Leboncoin search page URLs to scrape directly. Takes precedence over search queries and filters.

## `categoryIds` (type: `array`):

Leboncoin category IDs to filter by (e.g. 17 = Téléphones, 15 = Informatique, 2 = Véhicules). See actor description for full list.

## `locations` (type: `array`):

Location filters in the format 'City\_zipcode' (e.g. 'Paris\_75000', 'Lyon\_69000').

## `priceMin` (type: `integer`):

Minimum price filter in euros.

## `priceMax` (type: `integer`):

Maximum price filter in euros.

## `ownerType` (type: `string`):

Filter by seller type.

## `shippableOnly` (type: `boolean`):

Only return listings that offer shipping.

## `sort` (type: `string`):

Sort search results by time (newest first) or price.

## `includeDetails` (type: `boolean`):

Fetch the full listing description by visiting each detail page. Slower and uses more proxy bandwidth. Charged at the 'item-details' rate instead of 'product-listing'.

## `maxItems` (type: `integer`):

Maximum number of listings to scrape (0 = unlimited).

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

Maximum number of result pages to scrape per search query (leboncoin caps at 100 pages = 3,500 results).

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

Proxy settings. Residential proxies are strongly recommended — DataDome blocks datacenter IPs after 2-3 requests.

## Actor input object example

```json
{
  "searchQueries": [
    "iPhone 16"
  ],
  "startUrls": [],
  "categoryIds": [],
  "locations": [],
  "shippableOnly": false,
  "sort": "time",
  "includeDetails": false,
  "maxItems": 50,
  "maxPages": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `listings` (type: `string`):

No description

# 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 = {
    "searchQueries": [
        "iPhone 16"
    ],
    "maxItems": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("piotrv1001/leboncoin-listings-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 = {
    "searchQueries": ["iPhone 16"],
    "maxItems": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("piotrv1001/leboncoin-listings-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 '{
  "searchQueries": [
    "iPhone 16"
  ],
  "maxItems": 50
}' |
apify call piotrv1001/leboncoin-listings-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Leboncoin Listings Scraper",
        "description": "Leboncoin Listings Scraper scrapes listings from leboncoin.fr search results, capturing titles, prices, images, location, seller info, category attributes, and optional full details — ideal for price tracking, market research, and competitive analysis of France's largest classifieds marketplace.",
        "version": "0.0",
        "x-build-id": "kod9WVoXfrD3QmOde"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/piotrv1001~leboncoin-listings-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-piotrv1001-leboncoin-listings-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/piotrv1001~leboncoin-listings-scraper/runs": {
            "post": {
                "operationId": "runs-sync-piotrv1001-leboncoin-listings-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/piotrv1001~leboncoin-listings-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-piotrv1001-leboncoin-listings-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",
                "properties": {
                    "searchQueries": {
                        "title": "Search Queries",
                        "type": "array",
                        "description": "Free-text keywords to search for (e.g. 'iPhone 16', 'vélo électrique'). Multiple queries will run as separate searches.",
                        "default": [
                            "iPhone 16"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Leboncoin search page URLs to scrape directly. Takes precedence over search queries and filters.",
                        "default": [],
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "categoryIds": {
                        "title": "Category IDs",
                        "type": "array",
                        "description": "Leboncoin category IDs to filter by (e.g. 17 = Téléphones, 15 = Informatique, 2 = Véhicules). See actor description for full list.",
                        "default": []
                    },
                    "locations": {
                        "title": "Locations",
                        "type": "array",
                        "description": "Location filters in the format 'City_zipcode' (e.g. 'Paris_75000', 'Lyon_69000').",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "priceMin": {
                        "title": "Min Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Minimum price filter in euros."
                    },
                    "priceMax": {
                        "title": "Max Price (€)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum price filter in euros."
                    },
                    "ownerType": {
                        "title": "Seller Type",
                        "enum": [
                            "pro",
                            "private"
                        ],
                        "type": "string",
                        "description": "Filter by seller type."
                    },
                    "shippableOnly": {
                        "title": "Shippable Only",
                        "type": "boolean",
                        "description": "Only return listings that offer shipping.",
                        "default": false
                    },
                    "sort": {
                        "title": "Sort Order",
                        "enum": [
                            "time",
                            "price"
                        ],
                        "type": "string",
                        "description": "Sort search results by time (newest first) or price.",
                        "default": "time"
                    },
                    "includeDetails": {
                        "title": "Include Details",
                        "type": "boolean",
                        "description": "Fetch the full listing description by visiting each detail page. Slower and uses more proxy bandwidth. Charged at the 'item-details' rate instead of 'product-listing'.",
                        "default": false
                    },
                    "maxItems": {
                        "title": "Max Items",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of listings to scrape (0 = unlimited).",
                        "default": 50
                    },
                    "maxPages": {
                        "title": "Max Pages per Search",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of result pages to scrape per search query (leboncoin caps at 100 pages = 3,500 results).",
                        "default": 100
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. Residential proxies are strongly recommended — DataDome blocks datacenter IPs after 2-3 requests.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
