# Leboncoin Scraper - Scrape Listings & Prices (`logiover/leboncoin-scraper`) Actor

Leboncoin scraper & unofficial API alternative: export annonces, prices, sellers and GPS to CSV/JSON without login. Bulk Leboncoin data export.

- **URL**: https://apify.com/logiover/leboncoin-scraper.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** E-commerce, Business, Marketing
- **Features:** Limited permissions
- **Stats:** 42 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Leboncoin Scraper — French Classifieds Ads, Prices & Sellers Data (No API)

![Apify Actor](https://img.shields.io/badge/Apify-Actor-00A67E?logo=apify\&logoColor=white) ![No API key](https://img.shields.io/badge/No%20API%20key-required-2ea44f) ![Pay per result](https://img.shields.io/badge/Pricing-Pay%20per%20result-1C7ED6) ![Marketplace](https://img.shields.io/badge/Category-Marketplace-8B5CF6) ![Export](https://img.shields.io/badge/Export-JSON%20%7C%20CSV%20%7C%20Excel-F59E0B)

***

Scrape classified ads (annonces) from **Leboncoin.fr**, France's #1 second-hand marketplace with tens of millions of live listings — cars, phones, real estate, furniture, jobs, electronics and more. Point it at any keyword like `voiture`, `iphone 15` or `appartement paris` and get **title, price in euros, category, brand, full item attributes, city + zipcode + GPS coordinates, seller (pro/private) details and image galleries** in clean structured JSON, straight from the site's `__NEXT_DATA__` payload. **Fast, no browser, no API key, no login, no cookies.**

> ### 🏆 Why this Leboncoin scraper?
>
> **30+ fields per ad** · **hundreds to thousands of ads per run** · direct HTTP + JSON (no browser) · French residential-proxy ready · export to JSON / CSV / Excel. The unofficial **Leboncoin API alternative** for price research, reselling & arbitrage, real-estate/auto monitoring and lead generation.

***

### ✨ What this Actor does / Key features

- 🔎 **Keyword search at scale** — pass one or many keywords (`voiture`, `iphone`, `appartement paris`); each query is paginated independently until your limit or the results run out.
- 🗂️ **Category & location filters** — narrow to a Leboncoin category ID (e.g. `2` = Voitures, `9` = Immobilier) and a region/department/city location value to target exactly the annonces you want.
- 💶 **Full pricing data** — price in euros plus `priceCents` and `currency`, so you can benchmark second-hand prices precisely across categories and regions.
- 🧩 **Structured item attributes** — key/value/label pairs for the fields that matter per category (year, mileage, surface, size, brand, condition…), ready to pivot in a spreadsheet.
- 📍 **Exact location & GPS** — region, department, city and **zipcode** plus **latitude/longitude**, so you can map listings or filter by precise area across France.
- 🧑‍💼 **Seller / lead data** — seller id, store id, name, a **private-vs-pro flag** and activity sector, perfect for building lists of professional sellers.
- 🖼️ **Image galleries** — image count, thumbnail and the full list of image URLs for every ad.
- 🔀 **Flexible sorting** — most recent, price low-to-high, or price high-to-low.
- ⚡ **Direct HTTP + JSON extraction** — parses Leboncoin's embedded `__NEXT_DATA__` payload (35 ads per page); no headless browser, no DOM walking, no GraphQL token.
- 🛡️ **Proxy support** — Apify Proxy integration; **Residential + country=FR** is pre-set and required to pass DataDome IP filtering.

### 🚀 Quick start (3 steps)

1. **Configure** — add one or more keywords in **Search queries** (e.g. `voiture`, `iphone`). Optionally set a category ID, a location value and a sort order. Leave the proxy on its default (Residential · FR).
2. **Run** — click **Start**. The Actor paginates each search and streams de-duplicated ads into your dataset.
3. **Get your data** — open the **Output** tab and export to **JSON, CSV, Excel or HTML**, or pull it via the Apify API and webhooks.

### 📥 Input

Give the Actor at least one `searchText` keyword. Everything else is optional.

#### Example — used cars & iPhones, newest first

```json
{
  "searchText": ["voiture", "iphone"],
  "sortBy": "time",
  "maxItemsPerSearch": 350,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" }
}
```

#### Example — Paris apartments in the Immobilier category (real-estate research)

```json
{
  "searchText": ["appartement paris"],
  "category": "9",
  "location": "Paris__48.8566_2.3522_10000",
  "sortBy": "price-asc",
  "maxItemsPerSearch": 500,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" }
}
```

#### Example — bulk multi-keyword pull with a global cap

```json
{
  "searchText": ["canapé", "table", "chaise"],
  "sortBy": "time",
  "maxItemsPerSearch": 0,
  "maxResults": 2000
}
```

| Field | Type | Description |
|-------|------|-------------|
| `searchText` | array | One or more keywords to search on Leboncoin. Each query is paginated independently. **Required.** |
| `category` | string | Restrict results to a Leboncoin category ID (the `category` URL param). E.g. `2` = Voitures, `9` = Immobilier. Empty = all categories. |
| `location` | string | Leboncoin `locations` URL value to restrict by region/department/city, e.g. `Paris__48.85_2.34_10000` or a region slug. Empty = all of France. |
| `sortBy` | string | Result ordering: `time` (most recent), `price-asc` (cheapest first) or `price-desc` (most expensive first). Default is Leboncoin relevance. |
| `maxItemsPerSearch` | integer | Cap on ads collected per query (paginated, 35 per page). `0` = until results run out (Leboncoin caps at ~100 pages). |
| `maxResults` | integer | Global cap on ads saved across all queries. `0` = unlimited. |
| `proxyConfiguration` | object | Apify Proxy settings. **Residential + country=FR is required** (DataDome IP filtering) and pre-set by default. |

> **Finding a category ID or location value:** open leboncoin.fr, apply the category/location filters you want, and copy the `category=` and `locations=` values from the resulting URL. `2` = Voitures, `9` = Immobilier, `10` = Ventes immobilières, and so on.

### 📤 Output

One flat row per ad — **30+ fields**, exportable to JSON, CSV, Excel or HTML. Here is a trimmed sample record:

```json
{
  "title": "Peugeot 208 1.2 PureTech - faible kilométrage",
  "description": "Véhicule non-fumeur, entretien à jour, carnet suivi…",
  "price": 12490,
  "priceCents": 1249000,
  "currency": "EUR",
  "categoryId": "2",
  "categoryName": "Voitures",
  "brand": "Peugeot",
  "adType": "offer",
  "status": "active",
  "hasPhone": true,
  "firstPublicationDate": "2026-05-30 13:05:25",
  "expirationDate": "2026-07-29 13:05:25",
  "imageCount": 8,
  "thumbnail": "https://img.leboncoin.fr/api/v1/.../thumb.jpg",
  "images": ["https://img.leboncoin.fr/api/v1/.../1.jpg", "https://img.leboncoin.fr/api/v1/.../2.jpg"],
  "attributes": [
    { "key": "regdate", "value": "2019", "label": "2019" },
    { "key": "mileage", "value": "48000", "label": "48 000 km" }
  ],
  "location": {
    "region": "Île-de-France",
    "department": "75",
    "city": "Paris",
    "zipcode": "75011",
    "lat": 48.8619,
    "lng": 2.3784
  },
  "seller": {
    "id": "a1b2c3d4",
    "storeId": "998877",
    "name": "Garage Centre Auto",
    "type": "pro",
    "isPro": true,
    "sector": "Automobile"
  },
  "url": "https://www.leboncoin.fr/ad/voitures/3121812923",
  "searchQuery": "voiture",
  "scrapedAt": "2026-07-06T10:00:00.000Z"
}
```

<details>
<summary><b>📋 Full field reference (click to expand)</b></summary>

| Field | Description |
|-------|-------------|
| `title` | Ad title |
| `description` | Full ad body text |
| `price` | Price in euros |
| `priceCents` | Price in cents (integer) |
| `currency` | Price currency (EUR) |
| `categoryId` | Leboncoin category ID of the item |
| `categoryName` | Leboncoin category name of the item |
| `brand` | Item brand when present |
| `adType` | Ad type: offer vs. demand |
| `status` | Ad status: active / expired |
| `hasPhone` | Whether the seller exposed a phone number (the number itself is not collected) |
| `firstPublicationDate` | When the ad was first posted |
| `expirationDate` | When the ad expires |
| `imageCount` | Number of images on the ad |
| `thumbnail` | Thumbnail image URL |
| `images` | List of all image URLs |
| `attributes` | Structured key/value/label pairs (year, mileage, surface, size…) |
| `location.region` | Region |
| `location.department` | Department number |
| `location.city` | City |
| `location.zipcode` | Zipcode |
| `location.lat` / `location.lng` | GPS latitude / longitude |
| `seller.id` | Seller ID |
| `seller.storeId` | Store ID (pro shops) |
| `seller.name` | Seller name |
| `seller.type` | Seller type (pro / private) |
| `seller.isPro` | Private-vs-pro flag |
| `seller.sector` | Seller activity sector |
| `url` | Direct listing URL |
| `searchQuery` | The query that produced this row |
| `scrapedAt` | Scrape timestamp (ISO 8601) |

</details>

### 💡 Use cases

- **Reselling & arbitrage** — track second-hand prices and spot underpriced ads across categories and regions.
- **Price & market analysis** — benchmark used prices for cars, phones, furniture or real estate over time using `price`, `attributes` and `firstPublicationDate`.
- **Lead generation** — build lists of professional (pro) sellers filtered by category and location via the `seller.isPro` flag and `seller.sector`.
- **Real estate & auto research** — monitor new `appartement`, `maison` or `voiture` listings in a target area with `location` filtering and `sortBy: time`.
- **Geo-mapping** — plot listings on a map using `location.lat` / `location.lng` and cluster by `zipcode`.
- **Datasets & ML** — assemble labelled French marketplace data for pricing and trend models.

### 👥 Who uses it

Resellers & arbitrage traders · pricing & market analysts · real-estate & automotive researchers · lead-gen agencies building pro-seller lists · data scientists & ML teams · e-commerce and retail intelligence teams.

### 💰 Pricing

This Actor runs on a simple **pay-per-result** model — you pay for the ads you extract, with no separate Apify platform fees to calculate. Try it on the **free tier** first, then scale up. See the **Pricing** tab on this page for the current rate.

### ❓ Frequently Asked Questions

**Is it legal to scrape Leboncoin?**
The Actor only collects publicly available listing data. You are responsible for using the data in compliance with Leboncoin's Terms and applicable laws, including bulk-access and personal-data (GDPR) limits.

**Does Leboncoin have a public API?**
Leboncoin has no official public API for bulk listings, so this Actor reads the site's own embedded `__NEXT_DATA__` JSON instead — giving you structured annonce data without any API key.

**Do I need an API key or a login?**
No. There is no Leboncoin account, login, cookies or API key required — only an Apify account.

**Why does it require a France residential proxy?**
Leboncoin uses DataDome IP-reputation filtering. A clean French residential IP passes, while datacenter or non-FR IPs get blocked. The proxy is pre-set to `RESIDENTIAL` + country `FR` — just leave the default.

**How much data can I get / how many ads per search?**
Hundreds to thousands. Each page holds 35 ads and Leboncoin allows up to ~100 pages per query, so a broad search yields up to ~3,500 ads. Add more keywords to scale wider in one run; broad categories such as cars or real estate expose well over a million results to walk through.

**Can I filter by category, location or price?**
Yes. Pass a Leboncoin `category` ID and/or a `location` value, and choose a `sortBy` order (most recent, price low-to-high, or price high-to-low) to target exactly the annonces you need.

#### Is this a Leboncoin API alternative?

Yes. Leboncoin has no official public API for bulk listings, so this Actor works as an unofficial Leboncoin API alternative — it reads the public search pages and returns structured annonce data you can query on demand.

#### Can I scrape Leboncoin without an API or login?

Yes. The scraper reads only public Leboncoin search pages over a French residential proxy — no account, no cookies and no developer key — so you can scrape Leboncoin without an API or login.

#### How do I export Leboncoin annonces to CSV or JSON?

Run a keyword search, then download the dataset as CSV, JSON, Excel or HTML from the Storage / Dataset tab, or pull it programmatically through the Apify API and webhooks. It is a one-click Leboncoin data export with no login or API key.

#### How do I get GPS coordinates and location from Leboncoin ads?

Each ad returns region, department, city, zipcode and GPS latitude/longitude, so you can map listings or filter annonces by exact area across France.

#### How do I build a list of professional sellers on Leboncoin?

Every record includes a private-vs-pro seller flag (`seller.isPro`) and activity sector (`seller.sector`), so you can filter to professional (pro) sellers by category and location for lead generation.

### 🔗 More marketplace & e-commerce scrapers by logiover

Building a cross-marketplace or classifieds dataset? Pair Leboncoin with the rest of the suite:

| Marketplace | Actor |
|---|---|
| 🇫🇷 France | [Leboncoin Scraper](https://apify.com/logiover/leboncoin-scraper) (this Actor) |
| 🇳🇱 Netherlands | [Marktplaats Scraper](https://apify.com/logiover/marktplaats-nl-scraper) |
| 🇸🇪 Sweden | [Blocket Scraper](https://apify.com/logiover/blocket-se-scraper) |
| 🇩🇰 Denmark | [DBA.dk Scraper](https://apify.com/logiover/dba-dk-scraper) |
| 🇳🇴 Norway | [Finn.no Scraper](https://apify.com/logiover/finn-no-scraper) |
| 🇷🇺 Russia | [Avito Scraper](https://apify.com/logiover/avito-ru-scraper) |
| 🇺🇸 USA | [Craigslist Scraper](https://apify.com/logiover/craigslist-scraper) |
| 🇯🇵 Japan | [Mercari Japan Scraper](https://apify.com/logiover/mercari-japan-scraper) |
| 🌍 Reviews | [Trustpilot Reviews Scraper](https://apify.com/logiover/trustpilot-reviews-scraper) |
| ✈️ Travel | [Airbnb Scraper](https://apify.com/logiover/airbnb-scraper) · [Booking Hotels Prices Scraper](https://apify.com/logiover/booking-hotels-prices-scraper) |

👉 Browse all **[logiover scrapers on Apify Store](https://apify.com/logiover)** — 180+ actors across real estate, jobs, crypto, social media & B2B data.

### ⏰ Scheduling & integration

Schedule this Actor on Apify to track French marketplace prices daily or weekly. Export results to JSON, CSV or Excel, sync to Google Sheets, or push to your database, BI tools and webhooks through the Apify API. Connect it to **Make, n8n or Zapier** to build automated pricing and lead-gen pipelines.

### 🤖 AI Agents, MCP & RAG Integration

**Leboncoin Scraper** works natively as an on-demand data tool for AI assistants and autonomous workflows.

Connect this Actor directly to **Apify AI**, **Claude Desktop**, **Cursor**, **VS Code**, **Windsurf**, **LangChain**, or **LlamaIndex** via the official **Apify MCP Server** — no custom wrapper code needed:

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=logiover/leboncoin-scraper"
    }
  }
}
```

- **Schema-typed inputs & outputs:** Clean JSON records with explicit `.actor/input_schema.json` and `.actor/output_schema.json` definitions so LLM agents infer parameters and parse fields accurately without HTML noise.
- **Bounded & predictable runs:** Built-in volume caps and pay-per-result budget guards prevent runaway agent tool loops.
- **RAG & automation ready:** Stream run datasets straight into vector stores, n8n, Make, Zapier, or webhook pipelines.

### 💬 Support, Issues & Reviews

- **Bug reports & target-site changes:** Hit an unexpected empty result or selector change? [Open a ticket in the Issues tab](https://apify.com/logiover/leboncoin-scraper/issues) with your **Run ID** or sample input — we actively monitor issues and ship fixes fast.
- **Feature & field requests:** Need an additional data attribute or filter? [Request it in the Issues tab](https://apify.com/logiover/leboncoin-scraper/issues).
- **Enjoying this Actor?** If it saved you engineering time, please consider leaving an honest [review on Apify Store](https://apify.com/logiover/leboncoin-scraper/reviews) or bookmarking [logiover/leboncoin-scraper](https://apify.com/logiover/leboncoin-scraper) — organic developer feedback helps others discover reliable tools and keeps maintenance prioritized.

### ⚖️ Legal

This Actor extracts only publicly available data and is intended for legitimate research, analytics and lead-generation use. You are responsible for complying with Leboncoin's Terms of service, GDPR and any applicable local laws, including bulk-access and personal-data limits.

***

This Actor is an independent tool. It is not affiliated with, endorsed by, or sponsored by Leboncoin; Leboncoin and all other trademarks mentioned here are the property of their respective owners.

### Leboncoin scraping — frequently asked questions

#### Do I need a Leboncoin API key, account or login?

No. This Actor reads publicly available pages and feeds, so there is nothing to register for and no credentials to manage.

#### How do I export Leboncoin data to CSV, Excel, JSON or Google Sheets?

Open the **Storage** tab after a run and pick the format you want — CSV, Excel, JSON, XML or an HTML table. For Google Sheets, Airtable or a database, use the dataset URL or the Apify API so the sheet refreshes itself on every run.

#### Can I schedule this Leboncoin scraper to run daily or hourly?

Yes. Use the **Schedules** tab and pick a cadence. Daily is enough for most tracking work; pick hourly only if the rows you care about really do change that fast.

#### How many rows can I get, and what does it cost?

See the volume section above for a measured figure. Billing is per result, so you pay for the rows you actually receive and a run that finds nothing costs nothing.

#### Is scraping Leboncoin legal?

This Actor collects only information that Leboncoin publishes publicly. It does not log in, does not defeat access controls and does not touch private data. You remain responsible for how you use the output, including under GDPR and similar rules where personal data is involved.

#### What happens if Leboncoin blocks the run or changes its layout?

A refused exit IP is swapped for a fresh one within a quarter of a second and retried, and rate limiting is waited out rather than fought. If nothing gets through, the run **fails with the reason** instead of reporting success with zero rows — so an empty result always means "no matches", never "the source would not answer".

#### Can I use this with an AI agent, LangChain or an MCP client?

Yes. The Actor is callable over the Apify API and through Apify's MCP server, so an agent can run it and read the dataset back as a tool call.

### 📝 Changelog

#### 2026-11-14

- Verified live production health run (2026-11-14): extracted **35** structured records in **18.4s** with valid schema output.
- Hardened internal proxy stall fallback and pay-per-event dataset instance budget protection.

#### 2026-11-11

- Added reliable terminal run status telemetry and structured Apify AI / MCP Server (`mcp.apify.com`) tool configuration.
- Added direct Issues & Reviews support links and refreshed live maintenance verification.

#### 2026-11-01

- Monthly health check (2026-11-01): a live run on the current build completed successfully and returned data. Input options, output fields and pricing are unchanged.
- README refreshed: 1 link to retired Actors removed; independence disclaimer added.

#### 2026-10-15

- Every request now has a hard time limit, so a proxy connection that stalls can no longer hold up the run or push it past its timeout.
- A run that reaches its maximum cost per run now stops cleanly with its results saved and a status message, instead of ending as aborted.
- A proxy group your account cannot use no longer stops the run at start-up; it falls back to the default Apify Proxy.
- Runs with a short timeout (API and AI-agent calls) now finish inside it with what they collected, instead of being cut off.
- Memory is managed within the run's own limit, which removes a rare out-of-memory crash on large pages.
- The prefilled example for `maxResults` is now 285 (was 100).
- The default used when the field is left out for `maxResults` is now 4,140 (was 100).

#### 2026-09-23

- Fleet-wide quality audit. Verified end to end against live data and re-checked the input schema, the output columns and the run configuration.
- Output verified on a live run: 100 row(s) across 24 columns, 88.8% of cells populated.
- Run reliability reviewed: 98.6% of public runs succeeded in the last 30 days.
- Input schema, output schema and pricing configuration reviewed.
- Noted that 2 column(s) came back empty in this sample (`description`, `searchQuery`); these are under review.

#### 2026-09-01

- Fleet-wide health check. Verified against this Actor's real run history: 30-day success rate, output row counts, per-field fill rates, and peak memory against the configured memory limit.
- Reviewed for the failure patterns that have cost this fleet runs — unguarded proxy setup, retry loops that can outlast the run's own time budget, and full-page HTML parsing that can exhaust a small container.
- No change to input, output fields or scraping logic.

#### 2026-08-11

- Maintenance release: refreshed the build and dependencies.
- Re-verified live execution, non-empty structured output and dataset field/type integrity.
- Reviewed reliability (retries, pagination) and output quality as part of a full-fleet QA pass.

#### 2026-08-01

- Completed the August 2026 full health check: verified empty/programmatic default, Console UI default, and two source-informed alternative inputs on Apify.
- Confirmed successful live execution, non-empty structured output, dataset-field/type integrity, and logical sample quality within the 5-minute quality window.

#### 2026-07-06

- ✨ README overhaul: richer output sample, ready-to-run example scenarios, marketplace/classifieds cross-promo links, expanded FAQ and clearer quick-start.

#### 2026-07-01

- Maintenance pass: re-verified end-to-end on live data and confirmed successful runs within the 5-minute quality window on the default input.
- Sharpened Store metadata (SEO title & description) and expanded the FAQ with high-intent, long-tail questions for easier discovery in Google and Apify Store search.
- Added ready-to-run example tasks that cover common real-world use cases.

#### 2026-06-15

- Reliability pass: re-verified end-to-end on live data with real-world inputs. Routine maintenance build.

#### 2026-06-07

- Docs: added coverage for Leboncoin API alternative, exporting annonces to CSV/JSON, and scraping without an API or login.

#### 2026-06-05

- Reliability fix: results are no longer dropped by strict output validation - runs complete cleanly at high volume.
- Stability & performance hardening; fresh rebuild.

#### 2026-06-04

- Verified live & refreshed build - reliability/maintenance pass.

***

\*Maintained: last verified 2026-11-14 — checked end-to-end against live run history (reliability, output fields and types, and time/memory budgets).

# Changelog

This Actor's version history is a separate document: https://apify.com/logiover/leboncoin-scraper/changelog.md

# Actor input Schema

## `searchText` (type: `array`):

One or more keywords to search on Leboncoin. Examples: 'voiture', 'iphone 15', 'appartement paris'. Each query is paginated independently. Leave empty to browse the most recent listings across all of France (optionally narrowed by the Category / Location filters below).

## `category` (type: `string`):

Restrict results to a Leboncoin category. Leave empty to search every category.

## `location` (type: `string`):

Leboncoin `locations` URL value to restrict by region/department/city, e.g. 'Paris__48.85_2.34_10000' or a region slug. Leave empty for all of France.

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

Result ordering: 'Most recent', 'Price: low to high' or 'Price: high to low'. Leave on 'Most recent' — it is also the best order for an empty-keyword browse.

## `maxItemsPerSearch` (type: `integer`):

Cap on ads collected per query (paginated, 35 per page). 0 = until results run out (Leboncoin caps at ~100 pages).

## `maxResults` (type: `integer`):

Global cap on ads saved across all queries. Keeps browse runs fast & cheap — raise it to pull more. 0 = unlimited.

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

Leboncoin requires Apify Residential proxies in France (DataDome IP filtering). Leave the default (Apify Proxy · RESIDENTIAL · country FR).

## Actor input object example

```json
{
  "searchText": [
    "voiture",
    "iphone"
  ],
  "category": "",
  "sortBy": "time",
  "maxItemsPerSearch": 0,
  "maxResults": 285,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

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

All records extracted by this run. Open the Dataset tab to browse, filter, and export as CSV, JSON, or Excel.

# 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 = {
    "searchText": [],
    "maxResults": 285,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/leboncoin-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "searchText": [],
    "maxResults": 285,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/leboncoin-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchText": [],
  "maxResults": 285,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call logiover/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,logiover/leboncoin-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qLIgKhAihJR1llVVl/builds/QnNJD66JQdzO5TOSl/openapi.json
