# Leboncoin Scraper — Listings, Prices, Sellers & SIREN (`haketa/leboncoin-scraper`) Actor

Scrape Leboncoin.fr listings by keyword or URL: price, location (city, ZIP, region, GPS), category, attributes, photos and seller type — private vs professional with store name and SIREN for B2B lead generation. Cars, real estate, electronics and more. Export to JSON, CSV, Excel.

- **URL**: https://apify.com/haketa/leboncoin-scraper.md
- **Developed by:** [Haketa](https://apify.com/haketa) (community)
- **Categories:** E-commerce, Lead generation, Real estate
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.75 / 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 — Listings, Prices, Sellers, SIREN & Geocoding

[![Apify Actor](https://img.shields.io/badge/Apify-Actor-orange?logo=apify)](https://apify.com/haketa/leboncoin-scraper)
[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://apify.com/haketa/leboncoin-scraper)
[![Data Format](https://img.shields.io/badge/Data-JSON%20%7C%20CSV%20%7C%20Excel-blue)](https://apify.com/haketa/leboncoin-scraper)

**Extract classifieds listings from [Leboncoin.fr](https://www.leboncoin.fr) — France's #1 marketplace — at scale, with no login, no cookies, and no coding required.** This **Leboncoin scraper** lets you **scrape Leboncoin** by search keyword or by pasting full category/search URLs, returning structured, clean records: **prices, geographic locations (city, postal code, department, region, precise GPS coordinates), seller types (private individuals vs. registered professionals), store names, SIREN numbers, categories, product attributes, and high-resolution photo galleries.**

Export everything to **JSON, CSV, Excel, XML, or API**.

> Built for **B2B lead generation teams, automotive traders, real-estate analysts, e-commerce arbitrage resellers, and competitive price researchers** tracking the French domestic consumer and business market.

***

### ⚡ At a glance

| Feature | Description |
|---|---|
| **Data Source** | [Leboncoin.fr](https://www.leboncoin.fr) — France's undisputed #1 classifieds and resale platform |
| **Search Modes** | Keyword search (`searchTerms`), direct filtered category URLs (`startUrls`), seller type filters (`sellerType`), and price bands |
| **Output Formats** | JSON, CSV, Excel (XLSX), XML, HTML table |
| **Key Data Fields** | Title, price (EUR), city, ZIP/postal code, department, GPS coordinates (`lat`/`lng`), seller type (`pro`/`private`), seller name, SIREN number, category, structured attributes, image galleries |
| **Speed & Scale** | HTTP-native Next.js SSR extraction with French residential proxy rotation; extracts 35 listings per page, scaling to 1,000+ items |
| **B2B Intelligence** | Extracts official French company registration numbers (**SIREN**) and store IDs for verified B2B merchant prospecting |

***

### 🔎 Why scrape Leboncoin?

**Leboncoin.fr** is the central digital hub for commerce in France, hosting tens of millions of active listings spanning used vehicles, real estate rentals and purchases, consumer electronics, industrial equipment, home furnishings, and professional services. Both private individuals and commercial entities transact through Leboncoin, making it the single richest real-time mirror of the French consumer economy.

Because Leboncoin deploys strict **DataDome anti-bot protection** and does not provide an open public API, manual data collection is impractical. This **Leboncoin scraper** automates extraction using automated residential proxy rotation across France, returning clean, de-duplicated rows ready for your database, CRM, or pricing model.

**Common use cases for Leboncoin scraping:**

- 🎯 **B2B Lead Generation:** Extract directories of professional merchants and contractors, complete with business name, **SIREN** registry ID, department, and telephone availability.
- 🚗 **Used Automotive Intelligence:** Track vehicle depreciation, price bands, mileage, fuel types, and gearbox specifications across French automotive dealerships.
- 🏠 **Real Estate Market Monitoring:** Analyze property listings by price per square meter, room counts, postal codes, and regional GPS coordinates.
- 📱 **Electronics & Arbitrage Resale:** Monitor second-hand prices for smartphones, gaming consoles, computing hardware, and luxury goods to spot undervalued deals.
- 📊 **Competitive Retail Intelligence:** Track inventory depth, promotional pricing, and category assortment across French small-and-medium businesses.

***

### ✨ Key scraper capabilities

- 🔎 **Free-Text Keyword Search:** Search multiple queries (`iphone`, `renault clio`, `canapé`, `appartement paris`) across all marketplace rubrics simultaneously.
- 🔗 **Direct URL Support:** Paste complex Leboncoin search URLs with custom on-site filters (radius, price limits, brand filters, specific postcodes) directly into `startUrls`.
- 🔁 **Unlocked Deep Pagination (1,000+ items):** Automatically walks sequential result pages (`page=1`, `page=2`, …). Setting `maxPagesPerSearch: 0` enables continuous pagination bounded only by your requested `maxItems`.
- 🏢 **Professional Seller Enrichment:** Differentiates private sellers from verified companies, capturing French **SIREN** registry numbers and registered store identities.
- 📍 **Granular Geographic Data:** Extracts city name, postal code, French department, region, and exact latitude/longitude coordinates on every listing.
- 🖼️ **Full Photo Galleries:** Collects primary thumbnail URLs along with complete arrays of high-resolution images.
- 📝 **Optional Full Description Fetch:** Toggle `fetchDetails: true` to visit individual listing pages and extract complete ad body descriptions.
- 🛡️ **Built-in DataDome Resilience:** Employs browser-grade TLS fingerprints and French residential proxy rotation to ensure smooth runs without challenge interruptions.

***

### 📥 Input parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `searchTerms` | Array | `["iphone"]` | Keywords to search (e.g. `["iphone", "renault clio", "macbook"]`). |
| `startUrls` | Array | `[]` | Optional direct Leboncoin search or category URLs. Preserves all native website filters. |
| `sellerType` | String | `""` | Filter by seller type: `""` (any seller), `"private"` (private sellers), or `"pro"` (registered professionals). |
| `priceMin` | Integer | `null` | Minimum price filter in Euros (€). |
| `priceMax` | Integer | `null` | Maximum price filter in Euros (€). |
| `maxItems` | Integer | `0` | Overall limit on listings to collect across all searches. `0` = unlimited. |
| `maxPagesPerSearch` | Integer | `0` | Pages to crawl per term/URL (~35 listings/page). `0` = auto/unlimited (governed by `maxItems`). |
| `fetchDetails` | Boolean | `false` | When true, fetches each listing's full body description text. |
| `proxyConfiguration` | Object | Residential FR | French Residential proxy is pre-configured and required for reliable access. |

#### Example input — B2B contractor lead generation

```json
{
  "searchTerms": ["pompe à chaleur", "climatisation"],
  "sellerType": "pro",
  "maxItems": 500,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "FR"
  }
}
```

#### Example input — filtered automotive search URL

```json
{
  "startUrls": [
    "https://www.leboncoin.fr/recherche?category=2&text=clio&price=5000-12000"
  ],
  "maxItems": 350,
  "maxPagesPerSearch": 0
}
```

***

### 📊 Extracted fields

Every scraped listing yields structured fields across 5 core categories:

#### 🏷️ Ad identity & taxonomy

| Field | Type | Coverage | Description |
|---|---|---|---|
| `id` | String | 🟢 High | Unique numeric Leboncoin listing identifier (de-duplication key) |
| `url` | String | 🟢 High | Direct canonical link to the live listing |
| `title` | String | 🟢 High | Subject / title of the advertisement |
| `price` | Number | 🟢 High | Price in Euros (€) |
| `currency` | String | 🟢 High | Currency code (always `EUR`) |
| `category` | String | 🟢 High | Primary category name (e.g. *Voitures*, *Immobilier*, *Téléphones*) |
| `categoryId` | Number | 🟢 High | Numeric internal Leboncoin category code |
| `adType` | String | 🟢 High | Listing classification (`offer` or `demand`) |

#### 🏢 Seller intelligence & B2B data

| Field | Type | Coverage | Description |
|---|---|---|---|
| `sellerType` | String | 🟢 High | Merchant type (`pro` for registered business, `private` for individual) |
| `sellerName` | String | 🟢 High | Display name of the seller or professional shop |
| `sellerSiren` | String | 🟡 Conditional | Official 9-digit French company identification number (SIREN) |
| `storeId` | String | 🟡 Conditional | Internal professional store identifier |
| `userId` | String | 🟢 High | Unique seller user profile ID |
| `hasPhone` | Boolean | 🟢 High | Whether the seller has a published contact telephone number |

#### 📍 Location & coordinates

| Field | Type | Coverage | Description |
|---|---|---|---|
| `city` | String | 🟢 High | City name (often includes postal arrondissement, e.g. *Paris 75011*) |
| `zipcode` | String | 🟢 High | 5-digit French postal code |
| `department` | String | 🟡 Conditional | French department name (e.g. *Paris*, *Bouches-du-Rhône*) |
| `region` | String | 🟢 High | Administrative region (e.g. *Île-de-France*, *Provence-Alpes-Côte d'Azur*) |
| `lat` | Number | 🟢 High | Exact geographic latitude coordinate |
| `lng` | Number | 🟢 High | Exact geographic longitude coordinate |

#### 🧩 Attributes, description & status

| Field | Type | Coverage | Description |
|---|---|---|---|
| `description` | String | 🟡 Conditional | Full ad description text (populated when `fetchDetails: true`) |
| `attributes` | Object | 🟢 High | Dynamic dictionary of category attributes (brand, model, mileage, fuel, m², etc.) |
| `publishedDate` | String | 🟢 High | Timestamp when the ad was first published |
| `isBoosted` | Boolean | 🟢 High | Whether the seller purchased promoted placement |

#### 🖼️ Photos & media

| Field | Type | Coverage | Description |
|---|---|---|---|
| `imageUrl` | String | 🟢 High | Primary thumbnail photo URL |
| `images` | Array | 🟢 High | Array of all available high-resolution photo URLs |
| `nbImages` | Number | 🟢 High | Total image count in listing gallery |
| `scrapedAt` | String | 🟢 High | ISO 8601 execution timestamp |

***

### 💻 Sample output record

```json
{
  "id": "3128057396",
  "url": "https://www.leboncoin.fr/ad/telephones_objets_connectes/3128057396",
  "title": "IPhone 12 - Non reconditionné Original 100%",
  "description": null,
  "price": 100,
  "currency": "EUR",
  "category": "Téléphones & Objets connectés",
  "categoryId": 17,
  "adType": "offer",
  "sellerType": "pro",
  "sellerName": "FUTURX",
  "sellerSiren": "983689290",
  "storeId": "81199770",
  "userId": "be2ed4b7-2448-409b-8747-953cb5ea1a25",
  "hasPhone": true,
  "city": "Paris 75011 Popincourt",
  "zipcode": "75011",
  "department": "Paris",
  "region": "Ile-de-France",
  "lat": 48.859,
  "lng": 2.378,
  "publishedDate": "2026-09-15 12:06:25",
  "isBoosted": false,
  "imageUrl": "https://img.leboncoin.fr/api/v1/lbcpb1/images/16/0f/f0/160ff00b123.jpg?rule=ad-thumb",
  "images": [
    "https://img.leboncoin.fr/api/v1/lbcpb1/images/16/0f/f0/160ff00b123.jpg?rule=ad-image",
    "https://img.leboncoin.fr/api/v1/lbcpb1/images/8b/5c/ca/8b5cca28456.jpg?rule=ad-image"
  ],
  "nbImages": 2,
  "attributes": {
    "condition": "Très bon état",
    "phone_brand": "Apple",
    "phone_model": "iPhone 12",
    "phone_color": "Blanc",
    "phone_memory": "64 Go",
    "stock_quantity": "1"
  },
  "searchTerm": "iphone",
  "scrapedAt": "2026-11-10T13:00:00.000Z"
}
```

***

### 🔁 Deep pagination & scale

Leboncoin displays approximately **35 listings per page**.

- **Unlocked 1,000+ Deep Pagination:** Setting `maxPagesPerSearch: 0` removes depth caps. The scraper continues requesting consecutive pages until your `maxItems` target is reached or listings are exhausted.
- **De-Duplication by ID:** Output datasets are automatically de-duplicated in-memory using each listing's unique `id`, so overlapping searches never produce duplicate items.
- **Per-Page Residential IP Rotation:** To ensure reliable delivery against DataDome defenses, each request uses a fresh French residential proxy session.

***

### ⚙️ How to integrate via API

Trigger runs and consume French marketplace data directly in Python or Node.js:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
    "searchTerms": ["renault megane"],
    "sellerType": "pro",
    "maxItems": 150,
    "maxPagesPerSearch": 0
}
run = client.actor("haketa/leboncoin-scraper").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} - {item['price']} € | Seller: {item['sellerName']} (SIREN: {item.get('sellerSiren')})")
```

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('haketa/leboncoin-scraper').call({
    searchTerms: ['appartement marseille'],
    maxItems: 200,
    maxPagesPerSearch: 0,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Successfully scraped ${items.length} listings from Leboncoin.`);
```

***

### 💡 Practical scraping tips

- **Precise Search Targeting:** Filter by specific model generations (e.g. `clio 4 phase 2`) or exact neighborhood names for higher relevance.
- **SIREN Registry Lookup:** Use the extracted 9-digit `sellerSiren` to cross-reference French official company registries (INPI / Société.com) for company revenue, employee counts, and corporate leadership.
- **Fast List Scraping:** Leave `fetchDetails: false` unless you specifically require long-form description paragraphs. List-mode extraction is 5× faster and consumes significantly less bandwidth.

***

### ❓ Frequently Asked Questions

**Do I need a Leboncoin account or cookie session?**
No. The scraper interacts with public storefront data and requires no user authentication, cookies, or merchant credentials.

**Why is Residential (FR) proxy required?**
Leboncoin utilizes strict DataDome bot defenses that immediately block generic datacenter IPs. The scraper includes pre-configured French residential proxy routing out of the box.

**Can I filter exclusively for professional merchants?**
Yes. Set `sellerType: "pro"`. The scraper will ignore private peer-to-peer sellers, returning only registered companies with store profiles and SIREN numbers.

**How do I extract listings from a specific city or region?**
Set up your location radius on Leboncoin.fr, copy the resulting search URL, and paste it into `startUrls`.

**Can I filter real estate by square meters or room count?**
Yes. You can configure your search with surface area (`m²`) and room count directly on Leboncoin.fr, then copy that search URL into `startUrls`. All filtered properties will match your criteria.

**Which automotive attributes are extracted for car listings?**
Automotive listings return structured fields inside `attributes`: brand (`vehicle_brand`), model (`vehicle_model`), registration year (`regdate`), mileage (`mileage`), fuel type (`fuel`), and transmission gearbox (`gearbox`).

**Does this scraper support automated webhooks?**
Yes. Through the Apify platform, you can configure Webhook integrations that trigger immediately upon run completion, sending new listings to your endpoint, Zapier, Make, or custom API.

**How do I export listings into an SQL database like PostgreSQL?**
You can use the Apify API client or Python SDK to stream dataset rows directly into your database:

```python
import psycopg2
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
dataset_items = client.dataset("DATASET_ID").iterate_items()
## Insert into your database table
```

***

### 🔗 Related European classifieds scrapers

- [Marktplaats Scraper](https://apify.com/haketa/marktplaats-scraper) — The #1 classifieds marketplace in the Netherlands.
- [Kleinanzeigen Scraper](https://apify.com/haketa/kleinanzeigen-scraper) — Germany's premier classifieds marketplace.
- [AutoScout24 Scraper](https://apify.com/haketa/autoscout24-scraper) — Pan-European used and new vehicle marketplace.
- [OfferUp Scraper](https://apify.com/haketa/offerup-scraper) — US local classifieds and marketplace listings.

***

### 🗂️ Leboncoin category code reference

When using Start URLs or filtering output data, you can reference Leboncoin's primary numeric category codes:

| Category Code | French Category Name | English Equivalent | Common Attributes Extracted |
|---|---|---|---|
| `2` | **Voitures** | Cars & Vehicles | Brand, model, year, mileage, fuel, gearbox, doors |
| `9` | **Ventes immobilières** | Real Estate (Sales) | Property type, surface (m²), rooms, energy class |
| `10` | **Locations** | Real Estate (Rentals) | Furnished/unfurnished, surface (m²), rooms, charges |
| `15` | **Informatique** | Computers & Laptops | Device type, brand, memory, storage, processor |
| `17` | **Téléphones & Objets connectés** | Smartphones & Tech | Brand, model, color, internal memory, condition |
| `19` | **Ameublement** | Furniture & Home | Material, dimensions, style, condition |
| `22` | **Bricolage** | Tools & DIY | Tool type, brand, power source |
| `71` | **Vêtements** | Fashion & Apparel | Clothing type, brand, size, color, condition |

***

### 🏢 B2B lead generation workflow using SIREN

The French business registry assigns every commercial organization a unique 9-digit **SIREN** number. This scraper extracts the SIREN directly from verified merchant listings:

1. **Target Commercial Niches:** Search terms for commercial trades (`plomberie`, `rénovation`, `déménagement`, `garage auto`).
2. **Filter by Professional Sellers:** Set `sellerType: "pro"` in the input.
3. **Automate Pipeline Enrichment:** In your ETL pipeline, match extracted `sellerSiren` against open French government API directories (such as `recherche-entreprises.api.gouv.fr`) to enrich leads with official corporate names, NAF activity codes, registered capital, and executive contacts.

```python
import requests

def enrich_siren(siren):
    url = f"https://recherche-entreprises.api.gouv.fr/search?q={siren}"
    res = requests.get(url).json()
    results = res.get("results", [])
    if results:
        company = results[0]
        return {
            "legal_name": company.get("nom_complet"),
            "naf_code": company.get("activite_principale"),
            "address": company.get("siege", {}).get("adresse"),
            "city": company.get("siege", {}).get("commune")
        }
    return None
```

***

### 📋 Changelog

#### v1.2 — 2026-11

- **Unlocked 1,000+ Deep Pagination:** Updated `maxPagesPerSearch` default to `0` (auto/unlimited), enabling deep pagination runs up to 1,000+ listings governed by `maxItems`.
- **Enhanced Residential Proxy Rotation:** Optimized session cycling per page for maximum stability against DataDome challenges.
- **Improved Attribute Normalization:** Standardized automotive and real estate attribute dictionaries.
- **Fast Prefill Performance:** Fine-tuned connection pooling to complete standard prefill runs in under 60 seconds.

#### v1.1 — 2026-09

- Initial public release supporting keyword and Start URL extraction.
- Professional seller identification with automated SIREN French business ID extraction.
- Optional concurrent detail fetch mode for full listing body text.

# Changelog

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

# Actor input Schema

## `searchTerms` (type: `array`):

What to search for, e.g. 'iphone', 'renault clio', 'canapé'. Each term is searched separately. Leave empty if you use Start URLs.

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

Optional. Paste full Leboncoin search/category URLs to scrape them directly (cars, real estate, a specific location, etc.). When provided, Search Terms and filters below are ignored for these URLs.

## `sellerType` (type: `string`):

Filter by private sellers or professionals/businesses (great for B2B lead generation — pros include a SIREN).

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

Only listings at or above this price.

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

Only listings at or below this price.

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

Maximum number of listings to collect across all searches. 0 = unlimited.

## `maxPagesPerSearch` (type: `integer`):

How many result pages to scrape per search term / URL. Each page has about 35 listings. 0 = auto/unlimited (governed by Max Items).

## `fetchDetails` (type: `boolean`):

Visit each listing to also collect its full description text and complete attributes. This is slower and uses more resources — leave off for fast, low-cost list scraping.

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

Leboncoin requires Residential proxy (France) — datacenter IPs are blocked. The default setting works out of the box.

## Actor input object example

```json
{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "sellerType": "",
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "fetchDetails": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open to view and export all scraped listings (JSON, CSV, 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 = {
    "searchTerms": [
        "iphone"
    ],
    "startUrls": [],
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("haketa/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 = {
    "searchTerms": ["iphone"],
    "startUrls": [],
    "maxItems": 100,
    "maxPagesPerSearch": 0,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("haketa/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 '{
  "searchTerms": [
    "iphone"
  ],
  "startUrls": [],
  "maxItems": 100,
  "maxPagesPerSearch": 0,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call haketa/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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