# Leboncoin.fr ·Only $0.79💰· Any Category· Full Listings + GPS (`memo23/leboncoin-scraper`) Actor

\[Only $0.79💰] Turn any leboncoin.fr search into a clean dataset — real estate, cars, jobs, goods. One row per ad: price, full description, GPS coordinates, seller, all images, every category attribute, plus boost flags. Anti-bot handled — no proxy or captcha setup. JSON or CSV, billed per result.

- **URL**: https://apify.com/memo23/leboncoin-scraper.md
- **Developed by:** [Muhamed Didovic](https://apify.com/memo23) (community)
- **Categories:** AI, Agents, Jobs
- **Features:** Limited permissions
- **Stats:** 80 total users, 30 monthly users, 99.8% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.79 / 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.

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.fr Scraper

**Turn any leboncoin.fr search into a structured dataset — across every category.** Paste a search URL (real estate, cars, jobs, goods, services — anything) and get every matching ad as a clean row: title, price, full description, location with real GPS coordinates, seller type, all images, and **every category-specific attribute flattened inline** (rooms, surface, energy rating, mileage, brand, etc.). The site's anti-bot access is handled for you — no captcha keys, no proxy juggling. JSON or CSV out, billed per result.

#### How it works

![How Leboncoin Scraper works](https://raw.githubusercontent.com/muhamed-didovic/muhamed-didovic.github.io/main/assets/how-it-works-leboncoin.png)

#### ✨ Why use this scraper?

Tracking the French classifieds market? Building real-estate or used-car price datasets? Monitoring new listings in a city or category? leboncoin is France's largest marketplace — and this actor turns any of its searches into structured data without you touching its anti-bot.

- 🔗 **One input: a search URL.** Set your filters on leboncoin in the browser — category, location, price range, keyword, condition — then copy the URL. The actor translates every filter into the search API automatically.
- 🗂️ **Every category works.** Real estate, vehicles, jobs, holiday rentals, fashion, electronics, services — the same actor handles all of them. Category-specific fields come through as a flattened `attributes` object.
- 🛡️ **Anti-bot handled for you.** leboncoin is protected by an aggressive anti-bot layer; this actor clears it transparently and reuses the access token down the pages. You configure nothing — no captcha key, no special proxy setup.
- 📍 **Real GPS coordinates.** Each ad carries `location.lat` / `location.lng` plus city, zip, district, department and region — not just a place name.
- 🖼️ **All images + full description.** Every photo URL and the complete ad body, not a truncated preview.
- 📤 **Clean exports.** One row per ad, JSON + CSV exported automatically. The dataset row count equals the ad count exactly — no padding rows.
- 🏢 **Optional seller & agency enrichment.** Flip on `enrichSeller` to attach each seller's profile — member-since, total active listings, trust badges, typical response time — and for professional sellers their **SIREN/SIRET, business address, website and customer ratings**. Turns a listing feed into a B2B lead list.

#### 🎯 Use cases

| Team | What they build |
|------|-----------------|
| **Real-estate analysts** | Price-per-m² datasets by city/district, new-listing alerts, inventory tracking |
| **Used-car dealers / marketplaces** | Pricing comps by make/model/mileage, arbitrage spotting |
| **Recruiters** | Feeds of new job ads by region and sector |
| **Market researchers** | Supply, pricing and seller-type trends across any category in France |
| **Resellers / arbitrage** | Underpriced-listing discovery in electronics, fashion, collectibles |
| **Lead-gen / sales teams** | Agency & pro-seller contact lists — SIREN/SIRET, business address, website, ratings and **contact emails** — via `enrichSeller` + `enrichEmails` |
| **Data teams** | A clean, structured mirror of any leboncoin search for downstream pipelines |

#### 📥 Supported inputs

Pass one or more leboncoin **search URLs** in `startUrls`. The easiest workflow:

1. Open [leboncoin.fr](https://www.leboncoin.fr) and apply any filters you want (category, location, price, keyword…).
2. Copy the URL from your browser's address bar — it will look like `https://www.leboncoin.fr/recherche?category=9&locations=Rennes&price=...`.
3. Paste it into `startUrls`. Mix several different searches in one run.

| URL pattern | Behaviour |
|---|---|
| `https://www.leboncoin.fr/recherche?category=9&real_estate_type=2` | All apartment sales (real estate) |
| `https://www.leboncoin.fr/recherche?category=2&...` | Cars, with your filters (brand, price, mileage…) |
| `https://www.leboncoin.fr/recherche?text=macbook&...` | Keyword search across a category |
| `https://www.leboncoin.fr/recherche?category=9&locations=Paris_75000__...` | Any category restricted to a location |

Two more input types work alongside (or instead of) search URLs: **`adUrls`** — individual leboncoin ad URLs (`…/ad/<category>/<id>`), each scraped as a single listing — and **`sellerUserIds`** — each `user_id` expands to that seller's entire active inventory. Mix all three in one run. To restrict a search to professionals or private sellers, add `owner_type=pro` (or `private`) to the URL.

**Not supported:** hosts other than `leboncoin.fr`.

#### ⚙️ Input parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `startUrls` | array | `["https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"]` | leboncoin `/recherche?...` search URLs. Filters in the query string (category, location, price, keyword, `owner_type=pro`/`private`, …) are translated to the search API. Mix several searches freely. |
| `adUrls` | array | `[]` | Individual leboncoin ad URLs (`…/ad/<category>/<id>`). Each is scraped as a single listing. |
| `sellerUserIds` | array | `[]` | Seller `user_id` values. Each expands to that seller's entire active inventory (every ad they have online), paginated like a search. |
| `maxItems` | integer | `1000` | Hard cap on ads collected **per search URL / seller**. Big searches return hundreds of thousands of results — use this to control run size and cost. |
| `maxConcurrency` | integer | `3` | How many search URLs to process in parallel. Pages within one search are sequential (the access token is reused down the pages). |
| `strictComplete` | boolean | `false` | If a segment returns fewer ads than leboncoin reports exist (a deep-pagination wall), log the shortfall and mark the run **FAILED** — so you only accept a complete dataset. Split large searches by price/location to stay under the cap. |
| `enrichSeller` | boolean | `false` | Also fetch each seller's full profile into `sellerProfile` — member-since, total active listings, badges, response time; and for **professional** sellers their SIREN/SIRET, business address, website and ratings. One extra request per **unique** seller (cached per run), so runs take longer and cost a little more. |
| `enrichSellerPhone` | boolean | `true` | With `enrichSeller` on, also fetch each professional seller's public boutique **phone**. Routed through the unblocker so it doesn't slow the rest of the run, and included in the seller-enrichment price (no separate charge). Turn off to skip phone lookups. |
| `enrichConcurrency` | integer | `6` | How many sellers to enrich in parallel within a page (1–10). Higher is faster; the default stays within leboncoin's anti-bot tolerance. |
| `skipEnrichSellerIds` | array | `[]` | Seller `user_id` values (the `seller.userId` from a previous run) to **not** enrich again. Matching sellers skip the profile/phone/email lookup **and its charge**; the ad is still returned with an empty seller profile. Lets recurring sweeps pay only for new sellers. |
| `enrichEmails` | boolean | `false` | Premium add-on. For professional sellers, finds a contact email from their own website and adds `contactEmail`, `contactWebsite` and a detailed `emailEnrichment` object. Cached per seller; billed only when an email is actually found (never for misses). Keep `enrichSeller` on so the website is available. |
| `proxy` | object | Apify Residential, FR | leboncoin is geo-aware; French residential proxies are strongly recommended (the default). |

#### 📊 Output overview

Each scraped ad is **one dataset row** of `rowType: "ad"`. Common fields (title, price, location, seller, images, dates) are promoted to the top level; everything category-specific is flattened into the `attributes` object (with the untouched raw array kept in `attributesRaw`). The dataset row count equals the ad count exactly.

#### 📦 Output sample

One row per ad (description trimmed here for readability):

```json
{
  "rowType": "ad",
  "adId": "3201756535",
  "title": "Magnifique appartement cœur de ville",
  "description": "✨ Superbe appartement – Cœur de ville – 131,85 m² carrez ✨ Idéalement situé en plein cœur de Rennes…",
  "price": 568000,
  "priceCents": 56800000,
  "currency": "EUR",
  "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3201756535",
  "categoryId": "9",
  "categoryName": "Ventes immobilières",
  "adType": "offer",
  "status": "active",
  "firstPublishedAt": "2026-05-20 15:37:40",
  "indexedAt": "2026-06-10 15:37:40",
  "expiresAt": "2026-07-19 15:37:40",
  "seller": {
    "type": "private",
    "name": "Bihanlili22",
    "storeId": "28949902",
    "userId": "1e9e77c6-2d7e-4300-95b7-7655539a486a",
    "sector": null,
    "siren": null,
    "noSalesmen": null,
    "proRatesLink": null
  },
  "location": {
    "city": "Rennes",
    "zipcode": "35000",
    "district": "Centre",
    "department": "Ille-et-Vilaine",
    "region": "Bretagne",
    "country": "FR",
    "lat": 48.11487,
    "lng": -1.67941,
    "source": "city",
    "isShape": true,
    "cityLabel": "Rennes 35000"
  },
  "images": {
    "count": 11,
    "thumb": "https://img.leboncoin.fr/api/v1/lbcpb1/images/50/f5/44/...jpg?rule=ad-thumb",
    "urls": ["https://img.leboncoin.fr/.../...jpg?rule=ad-image", "..."]
  },
  "attributes": {
    "type_real_estate_sale": "Ancien",
    "real_estate_type": "Appartement",
    "square": "130 m²",
    "rooms": "6",
    "bedrooms": "4 ch.",
    "nb_bathrooms": "1",
    "energy_rate": "C",
    "ges": "D"
  },
  "attributesRaw": [ "...the full raw attribute array, untouched..." ],
  "hasPhone": true,
  "isBoosted": false,
  "options": { "has_option": true, "gallery": true, "highlight": true, "urgent": false, "sub_toplist": false },
  "favorites": null,
  "scrapedAt": "2026-06-10T13:39:17.254Z"
}
```

With **`enrichSeller`** enabled, each row additionally carries a `sellerProfile` (a professional seller shown here):

```json
{
  "sellerProfile": {
    "name": "Keymex Synergie",
    "accountType": "pro",
    "registeredAt": "2025-10-22",
    "totalAds": 219,
    "badges": ["Responsiveness2", "VerifiedPhoneNumber"],
    "replyInMinutes": 0,
    "presenceStatus": "OFFLINE",
    "pro": {
      "siren": "889022950",
      "siret": "88902295000022",
      "address": "Rue Jean Renoir",
      "zipcode": "60230",
      "city": "Chambly",
      "department": "Oise",
      "region": "Picardie",
      "website": "https://www.keymex.fr/agence-immobiliere/l-isle-adam/",
      "phone": "0651852063",
      "ratingValue": 4.5,
      "ratingCount": 190,
      "source": "boutique"
    }
  }
}
```

`sellerProfile.pro` is filled for **every** professional seller — from their boutique page where it exists (`source: "boutique"`, which also carries the public `phone`), or from leboncoin's public company block otherwise (`source: "public-info"`: company name, SIREN/SIRET, address).

#### 🗂 Key output fields

| Group | Fields |
|---|---|
| **Identifiers** | `rowType`, `adId`, `url`, `scrapedAt` |
| **Listing** | `title`, `description` (full text), `adType` (`offer` / `demand`), `status` |
| **Price** | `price` (number), `priceCents`, `currency` |
| **Category** | `categoryId`, `categoryName` |
| **Dates** | `firstPublishedAt`, `indexedAt`, `expiresAt` |
| **Seller** | `seller.{type` (`private` / `pro`)`, name, storeId, userId, sector, siren, noSalesmen, proRatesLink}` |
| **Location** | `location.{city, zipcode, district, department, region, country, lat, lng, source` (`address` = exact point the seller entered / `city` = city centroid)`, isShape, cityLabel}` |
| **Images** | `images.{count, thumb, urls[]}` |
| **Attributes** | `attributes` (flattened key→value for the category: rooms, square, energy_rate, mileage, brand, condition…), `attributesRaw` (the original array, with labels) |
| **Promotion** | `isBoosted` (seller paid for extra visibility), `options` (boost flags: `urgent`, `gallery`, `highlight`, `sub_toplist`…), `favorites` (popularity count, when leboncoin exposes it) |
| **Misc** | `hasPhone` (whether a phone number is offered on the ad) |
| **Seller profile** *(only with `enrichSeller`)* | `sellerProfile.{name, accountType, registeredAt, totalAds, badges, replyInMinutes, presenceStatus, feedbackScore}`, plus for professional sellers `sellerProfile.pro.{siren, siret, address, zipcode, city, department, region, website, phone, ratingValue, ratingCount, source}` — filled for **all** pros, from the boutique page (`source: "boutique"`, includes phone) or the public company block (`source: "public-info"`) |
| **Contact email** *(only with `enrichEmails`)* | `contactEmail`, `contactWebsite`, `emailEnrichment.{emails[], source, confidence}` — professional sellers only |

The exact keys inside `attributes` depend on the category — a real-estate ad carries `rooms` / `square` / `energy_rate`, a car ad carries `brand` / `mileage` / `fuel`, and so on. Whatever leboncoin shows on the ad, you get.

#### ❓ FAQ

**Do I need a captcha-solver or special proxy?**
No. The actor handles leboncoin's anti-bot access layer itself and ships with a sensible French-residential proxy default. You just paste a search URL.

**How do I scrape a specific category, city, or price range?**
Set the filters on leboncoin.fr in your browser, then copy the URL — every filter (category, `locations`, `price`, `text`, condition, etc.) is carried through to the search API. No need to learn the API yourself.

**Why is there a cap on very large searches?**
leboncoin itself caps how deep you can paginate a single search. For searches with hundreds of thousands of results, split by location or add filters to stay under the cap and get complete coverage of each slice. The run logs when a segment returns fewer ads than leboncoin reports exist; set `strictComplete` to have the run FAIL on such a shortfall, so you only accept complete datasets.

**Can I scrape private data or contact details?**
No. The actor reads only the public search results. It does not log in, does not reveal hidden phone numbers, and collects no private user data — `hasPhone` is simply leboncoin's public flag for whether a phone number is offered.

**What does `enrichSeller` add, and is it still public data?**
Yes — it reads each seller's **public** profile (the same page anyone sees on leboncoin): join date, number of active listings, trust badges and typical response time. For professional sellers it also captures the business details they publish — store name, SIREN/SIRET, address, website and customer ratings. Lookups are cached per seller, so an agency with hundreds of listings costs a single extra request. No login, no hidden contact details.

**One row per ad — no duplicates?**
Correct. Ads are de-duplicated by their `adId` within a run, so the dataset row count matches the unique ad count.

#### 💬 Support

- For issues or feature requests, please use the **Issues** tab on the actor's Apify Console page.
- Author's website: <https://muhamed-didovic.github.io/>
- Email: <muhamed.didovic@gmail.com>

#### 🛠 Additional services

- Custom output shape, extra fields, or one-off datasets: <muhamed.didovic@gmail.com>
- Need detail-page enrichment, scheduled monitoring, or another French marketplace scraped? Drop an email.
- For API access (no Apify fee, just a usage fee for the API): <muhamed.didovic@gmail.com>

#### 🔎 Explore more scrapers

If this Leboncoin Scraper was useful, see other scrapers and actors at [memo23's Apify profile](https://apify.com/memo23) — covering real estate, classifieds, job boards, social media, and more.

***

### 🤖 For AI Agents & LLM Apps

Compact reference for AI agents calling this actor via the [Apify MCP server](https://mcp.apify.com) or the Apify API (actor: `memo23/leboncoin-scraper`).

**Purpose:** Turn any leboncoin.fr search URL into structured ad rows across every category — title, price, full description, GPS location, seller, all images and flattened category-specific attributes; anti-bot access is handled, with optional seller/agency and contact-email enrichment.

**Minimal input:**

```json
{
  "startUrls": ["https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"],
  "maxItems": 30
}
```

**Output:** one row per ad (`rowType: "ad"`) — `adId`, `title`, `description`, `price`, `priceCents`, `currency`, `url`, `categoryId`, `categoryName`, `adType`, `status`, `firstPublishedAt`, `indexedAt`, `expiresAt`, `seller {type, name, storeId, userId, sector, siren, noSalesmen, proRatesLink}`, `location {city, zipcode, district, department, region, country, lat, lng, source, isShape, cityLabel}`, `images {count, thumb, urls[]}`, `attributes` (flattened category fields), `attributesRaw`, `hasPhone`, `isBoosted`, `options`, `favorites`, `scrapedAt`. With `enrichSeller`: `sellerProfile {name, accountType, registeredAt, totalAds, badges, replyInMinutes, presenceStatus, feedbackScore, pro{siren, siret, address, zipcode, city, department, region, website, phone, ratingValue, ratingCount, source}}`. With `enrichEmails`: `contactEmail`, `contactWebsite`, `emailEnrichment`.

**Behaviors an agent should know:**

- Three mixable input kinds: `startUrls` (leboncoin.fr `/recherche?...` search URLs; add `owner_type=pro`/`private` to filter by seller type), `adUrls` (single ad URLs), and `sellerUserIds` (each expands to a seller's entire inventory). Non-leboncoin hosts are unsupported.
- Always set `maxItems` (default 1000, per search/seller); searches can hold hundreds of thousands of ads and leboncoin caps deep pagination — split large searches by location/filter. `strictComplete` (default false) fails the run if a segment can't reach leboncoin's reported total.
- `maxConcurrency` (default 3, max 10) sets parallel search URLs; pages within one search are sequential.
- `enrichSeller` (default false) adds each seller's public profile plus, for all pros, SIREN/SIRET/address/website/ratings and a public `phone` for boutique sellers — sourced from the boutique page or the public company block (`sellerProfile.pro.source`). One cached lookup per unique seller. `enrichSellerPhone` (default true) toggles the boutique phone; `enrichConcurrency` (default 6, range 1–10) sets parallel seller lookups; `skipEnrichSellerIds` skips re-enriching (and re-charging) sellers whose `seller.userId` you already captured on a previous run.
- `enrichEmails` (default false) finds a pro seller's contact email from their website — keep `enrichSeller` on; billed only when an email is found, never for misses. `qualifyByPayment` (default false, needs `enrichEmails`) flags payment processors at no extra charge.
- Ads deduped by `adId`; public search data only. Pay-per-event billing — see the Pricing tab on the actor page.

***

### ⚠️ Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, or sponsored by leboncoin, Adevinta, or any of their subsidiaries or affiliates. All trademarks mentioned are the property of their respective owners.

The scraper accesses only publicly available search-result data on leboncoin.fr — no authenticated endpoints, no logged-in content, and no private user data. Users are responsible for ensuring their use complies with leboncoin.fr's Terms of Service, applicable data-protection law (GDPR, CCPA, etc.), and any contractual obligations of their own organisation.

***

### SEO Keywords

leboncoin scraper, scrape leboncoin, leboncoin api, leboncoin.fr scraper, Apify leboncoin, leboncoin data extraction, france classifieds scraper, leboncoin real estate scraper, leboncoin immobilier scraper, leboncoin cars scraper, leboncoin voiture scraper, leboncoin price data, french marketplace scraper, leboncoin listings api, leboncoin annonces scraper, scrape french classifieds, leboncoin monitoring, leboncoin alerts, leboncoin jobs scraper, leboncoin location scraper, adevinta scraper

# Actor input Schema

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

Full leboncoin.fr `/recherche?...` URLs. Filters in the query string (category, location, price range, keyword) are translated to the search API automatically. Mix several searches in one run.

## `adUrls` (type: `array`):

Individual leboncoin ad URLs (…/ad/<category>/<id>). Each is scraped as a single listing. Use alongside or instead of search URLs.

## `sellerUserIds` (type: `array`):

Seller `user_id` values. Each expands to that seller's entire active inventory (every ad they have online), paginated like a search.

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

Hard cap on the number of ads collected for each search URL. Some leboncoin searches return hundreds of thousands of results — use this to control your run size and cost. leboncoin caps deep pagination, so very large searches are best split by location or filter.

## `maxConcurrency` (type: `integer`):

How many search URLs to process in parallel. Pages within a single search are fetched sequentially (the access cookie is reused down the pages). Keep this low (1–3) for the most reliable results.

## `strictComplete` (type: `boolean`):

leboncoin caps how deep a single search can paginate. With this on, if any segment returns fewer ads than leboncoin reports exist, the discrepancy is logged and the run is marked FAILED — so you only accept a complete dataset. Split large searches by price or location to stay under the cap. Off by default (log-only).

## `enrichSeller` (type: `boolean`):

For each ad, also fetch the seller's profile — member since, total active listings, badges, response time — and, for professional sellers, their store details: SIREN/SIRET, business address, website and ratings. Results are cached per seller (a pro with many listings costs one lookup), but this still adds requests, so runs are slower and a bit pricier. Off by default.

## `enrichSellerPhone` (type: `boolean`):

When seller enrichment is on, also fetch the professional seller's public boutique phone number. It is fetched through the unblocker so it does not slow the rest of the run, and it is included in the seller enrichment price (no separate charge). On by default; turn off to skip phone lookups.

## `enrichConcurrency` (type: `integer`):

How many sellers to enrich in parallel within a page. Higher is faster; the default is tuned to stay within leboncoin's anti-bot tolerance. Range 1 to 10.

## `skipEnrichSellerIds` (type: `array`):

Seller user IDs (the `seller.userId` values from a previous run) that should NOT be enriched again. Matching sellers skip the profile, phone and email lookup and its charge; the ad is still returned, with the seller profile left empty. Use this on recurring sweeps so you only pay to enrich sellers you don't already have. Default none.

## `enrichEmails` (type: `boolean`):

Premium add-on. For professional sellers, finds a contact email from their own website (the site captured by the seller enrichment above). Adds `contactEmail` + `contactWebsite` columns plus a detailed `emailEnrichment` object. Cached per seller, and charged only when an email is actually found — never for misses. Leave the seller enrichment on so the website is available. Off by default.

## `qualifyByPayment` (type: `boolean`):

Requires "Enrich with contact emails". Scans each business's website — reusing the pages already fetched for email discovery, so no extra cost or time — for payment processors and e-commerce platforms (Stripe, Shopify, PayPal, Paddle, Lemon Squeezy, WooCommerce, Square, Chargebee and more). Adds takesPayments (is this a real paying business?), paymentProcessors (which stack), stripeLiveKey (the public key if exposed) and paymentConfidence. Turn raw contacts into monetization-qualified leads. No extra charge — included with each enriched company.

## `proxy` (type: `object`):

Leave empty — the actor already routes all traffic through its own built-in residential proxy at no extra cost to you. Only set this if you want to use your own proxies.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"
  ],
  "maxItems": 1000,
  "maxConcurrency": 3,
  "strictComplete": false,
  "enrichSeller": false,
  "enrichSellerPhone": true,
  "enrichConcurrency": 6,
  "enrichEmails": false,
  "qualifyByPayment": false
}
```

# 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 = {
    "startUrls": [
        "https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("memo23/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 = { "startUrls": ["https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"] }

# Run the Actor and wait for it to finish
run = client.actor("memo23/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 '{
  "startUrls": [
    "https://www.leboncoin.fr/recherche?category=9&real_estate_type=2"
  ]
}' |
apify call memo23/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,memo23/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/X0CLvyRjAOievM7oh/builds/WCK6L6BbHQRegZBKk/openapi.json
