# Leboncoin Scraper (`silentflow/leboncoin-scraper`) Actor

Scrape Leboncoin classified ads by keyword, category and location. Extract prices, descriptions, seller info, phone numbers and GPS coordinates from France's largest marketplace. Covers real estate, cars, jobs, electronics, fashion and more. Export 28+ data fields per listing in JSON or CSV format.

- **URL**: https://apify.com/silentflow/leboncoin-scraper.md
- **Developed by:** [SilentFlow](https://apify.com/silentflow) (community)
- **Categories:** Real estate, E-commerce, Lead generation
- **Stats:** 52 total users, 2 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

$19.99/month + usage

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

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Leboncoin Scraper

🇬🇧 English | [🇫🇷 Francais](#-version-francaise)

**Turn Leboncoin into a structured database.** Extract prices, descriptions, seller phone numbers, GPS coordinates and category attributes from France's largest classified ads marketplace.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/Vcm0urr8x9cUCuOCG/records/how-it-works-v1.png)

### ✨ Why use this scraper?

Spending hours copying listings from Leboncoin tabs? Need seller phone numbers but can only see "click to reveal"? Want structured data from 28 million listings but stuck with manual browsing?

- 📊 **28M+ listings across 11 categories.** Real estate, vehicles, jobs, fashion, electronics, leisure. One scraper covers the entire marketplace.
- 📱 **Get seller phone numbers automatically.** Browse mode reveals contact details that are hidden behind clicks on the website. No manual work needed.
- 👤 **Separate professional from private sellers.** Filter by seller type to focus on dealers or individuals. Compare pricing strategies between the two.
- 🔗 **Paste any Leboncoin URL and go.** Set your filters on leboncoin.fr, copy the URL, paste it here. All your filters are applied automatically.

### 🎯 Use cases

| Team | What they build |
|------|----------------|
| **Real estate agencies** | Price comparison dashboards across French cities and regions, tracking rental and sale trends weekly |
| **Car dealers** | Used vehicle inventory monitoring with mileage, year, and dealer vs private price gaps |
| **Market researchers** | Consumer trend reports across 11 categories, from electronics to fashion, with regional breakdowns |
| **Recruiters** | Job market analysis by region, salary ranges, and company type for talent acquisition strategy |
| **Investors** | Underpriced property alerts by comparing listing prices to neighborhood averages |
| **E-commerce sellers** | Competitor price tracking on electronics, furniture, and fashion to adjust pricing in real time |

### 📥 Input parameters

#### Search

You have two options to define your search. **Option 1 is recommended**: paste a Leboncoin URL with all your filters already applied.

| Parameter | Type | Description |
|-----------|------|-------------|
| `searchUrl` | string | **(Recommended)** Paste a Leboncoin search URL from your browser. All filters from the URL (keywords, category, location, price range, sorting) are used automatically. |
| `text` | string | Keywords to search for (e.g. "appartement", "voiture", "iphone"). Ignored when a Search URL is provided. |
| `category` | select | Leboncoin category: All Categories, Real Estate (All), Property Sales, Rentals, Roommates, Cars, Motorcycles, All Vehicles, Jobs, Fashion, Leisure. |
| `ownerType` | select | Seller type filter: All sellers, Private sellers only, Professional sellers only. |

#### Options

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `maxItems` | integer | 100 | Maximum number of ads to return. |
| `browseMode` | boolean | false | Visit each ad page for full details: description, phone number, seller info, GPS coordinates, and all category attributes. |

### 📊 Output data

Download your results as Excel, CSV, JSON, HTML or XML.

**Search mode** returns listing summaries:

```json
{
    "id": 3058213755,
    "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3058213755",
    "title": "Bel appartement 3 pieces 75m2",
    "price": 285000,
    "city": "Paris",
    "zipcode": "75011",
    "department": "Paris",
    "region": "Ile-de-France",
    "categoryId": "9",
    "categoryName": "Ventes immobilieres",
    "firstPublicationDate": "2025-01-15T10:30:00Z",
    "images": ["https://img.leboncoin.fr/api/v1/lbcpb1/images/..."],
    "adType": "offer",
    "hasPhone": true,
    "scrapedAt": "2026-04-09T15:30:00Z"
}
```

**Browse mode** (`browseMode: true`) adds full details for each listing:

```json
{
    "id": 3058213755,
    "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3058213755",
    "title": "Bel appartement 3 pieces 75m2",
    "price": 285000,
    "city": "Paris",
    "zipcode": "75011",
    "department": "Paris",
    "region": "Ile-de-France",
    "categoryId": "9",
    "categoryName": "Ventes immobilieres",
    "firstPublicationDate": "2025-01-15T10:30:00Z",
    "images": ["https://img.leboncoin.fr/api/v1/lbcpb1/images/..."],
    "adType": "offer",
    "hasPhone": true,
    "description": "Superbe appartement lumineux de 75m2 avec balcon, situe au 3eme etage avec ascenseur. 3 pieces dont 2 chambres, cuisine equipee, parking en sous-sol.",
    "status": "active",
    "latitude": 48.85122,
    "longitude": 2.33289,
    "phone": "+33612345678",
    "ownerId": "abc-123-def-456",
    "ownerName": "Agence Duval Immobilier",
    "ownerType": "pro",
    "favorites": 42,
    "attributes": [
        {
            "key": "square",
            "keyLabel": "Surface",
            "value": "75",
            "valueLabel": "75 m2"
        },
        {
            "key": "rooms",
            "keyLabel": "Pieces",
            "value": "3",
            "valueLabel": "3"
        },
        {
            "key": "energy_rate",
            "keyLabel": "Classe energie",
            "value": "c",
            "valueLabel": "C"
        }
    ],
    "scrapedAt": "2026-04-09T15:30:00Z"
}
```

### 🗂️ Data fields

#### Basic

| Field | Type | Description |
|-------|------|-------------|
| `id` | integer | Unique Leboncoin listing ID |
| `url` | string | Direct link to the listing |
| `title` | string | Listing title |
| `price` | integer | Price in euros |
| `categoryId` | string | Leboncoin category ID |
| `categoryName` | string | Category name in French |
| `adType` | string | Listing type (offer, request) |
| `firstPublicationDate` | string | First publication date (ISO 8601) |
| `images` | array | List of image URLs |
| `hasPhone` | boolean | Whether a phone number is available |

#### Location

| Field | Type | Description |
|-------|------|-------------|
| `city` | string | City name |
| `zipcode` | string | Postal code |
| `department` | string | French department |
| `region` | string | French region |
| `latitude` | float | GPS latitude (browse mode) |
| `longitude` | float | GPS longitude (browse mode) |

#### Seller

| Field | Type | Description |
|-------|------|-------------|
| `ownerId` | string | Seller unique ID (browse mode) |
| `ownerName` | string | Seller display name (browse mode) |
| `ownerType` | string | Seller type: private or pro (browse mode) |
| `phone` | string | Seller phone number (browse mode) |

#### Content (browse mode)

| Field | Type | Description |
|-------|------|-------------|
| `description` | string | Full listing description text |
| `status` | string | Listing status (active, expired) |
| `favorites` | integer | Number of users who saved this listing |
| `attributes` | array | Category-specific attributes (surface, rooms, energy class, mileage, etc.) |

#### Meta

| Field | Type | Description |
|-------|------|-------------|
| `scrapedAt` | string | Extraction timestamp (ISO 8601) |

### 🚀 Examples

#### Search apartments in Paris using a URL

The easiest way: go to leboncoin.fr, set your filters, copy the URL.

```json
{
    "searchUrl": "https://www.leboncoin.fr/recherche?category=10&text=appartement&locations=Paris&price=500-1500",
    "maxItems": 50
}
```

#### Find used cars from professional dealers

Use manual search fields to filter by category and seller type.

```json
{
    "text": "voiture",
    "category": "2",
    "ownerType": "pro",
    "maxItems": 100
}
```

#### Get full details with phone numbers

Enable browse mode to collect descriptions, GPS coordinates, phone numbers, and all category attributes.

```json
{
    "searchUrl": "https://www.leboncoin.fr/recherche?category=9&text=maison&price=200000-500000",
    "maxItems": 30,
    "browseMode": true
}
```

#### Browse job listings from private employers

Combine text search with category and seller type filters.

```json
{
    "text": "developpeur",
    "category": "71",
    "ownerType": "private",
    "maxItems": 50
}
```

### 💻 Integrations

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("silentflow/leboncoin-scraper").call(run_input={
    "searchUrl": "https://www.leboncoin.fr/recherche?category=9&text=appartement&locations=Paris",
    "maxItems": 50,
    "browseMode": True,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} - {item['price']}€ - {item.get('phone', 'N/A')}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('silentflow/leboncoin-scraper').call({
    searchUrl: 'https://www.leboncoin.fr/recherche?category=9&text=appartement&locations=Paris',
    maxItems: 50,
    browseMode: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
    console.log(`${item.title} - ${item.price}€ - ${item.phone || 'N/A'}`);
});
```

### 📈 Performance & limits

| Metric | Value |
|--------|-------|
| Listings per search page | Up to 35 |
| Data fields (search mode) | 15 |
| Data fields (browse mode) | 28+ |
| Categories supported | 11 |
| Maximum results per run | 10,000 |
| Output formats | JSON, CSV, Excel, HTML, XML |

### 💡 Tips for best results

1. **Use searchUrl for complex searches.** Set all your filters on leboncoin.fr (location, price range, sorting, radius) then paste the URL. This is the fastest and most reliable way to get exactly what you need.

2. **Enable browseMode when you need contact details.** Phone numbers, full descriptions, GPS coordinates, and category attributes (surface, rooms, mileage) are only available in browse mode.

3. **Filter by seller type to compare markets.** Set `ownerType` to "pro" to analyze dealer pricing, or "private" to find individual sellers. Run both separately to compare price differences.

4. **Start with a small maxItems to test.** Set maxItems to 10 or 20 for your first run to verify the results match what you expect. Scale up once you are satisfied.

5. **Pick the right category for cleaner results.** Searching "voiture" in "All Categories" returns cars but also car accessories, car seats, and toy cars. Select "Cars" to get only vehicle listings.

### ❓ FAQ

#### Do I need a Leboncoin account?

No. The scraper extracts publicly available listing data. No login, no API key, no cookies needed.

#### What is browse mode?

Browse mode visits each listing page individually to collect the full details: description, seller phone number, GPS coordinates, and all category-specific attributes (surface, rooms, energy class, mileage, etc.). Without browse mode, you get listing summaries only.

#### Are phone numbers always available?

Phone numbers are available in browse mode when the seller has chosen to display their number on the listing. Not all sellers share their phone number.

#### What categories are supported?

11 categories: All Categories, Real Estate (All), Property Sales, Rentals, Roommates, Cars, Motorcycles, All Vehicles, Jobs, Fashion, and Leisure.

#### When should I use searchUrl vs manual fields?

Use `searchUrl` whenever possible. It captures all filters available on leboncoin.fr, including location radius, price ranges, and sorting. Manual fields (`text`, `category`, `ownerType`) are useful for simple searches or when building automated pipelines.

#### How much does it cost?

This Actor uses Apify compute units. Check the Pricing tab for current rates.

### 📬 Support

Need something this scraper doesn't do yet? We ship features fast.

- Feature requests go straight to our backlog
- Enterprise needs? We do custom integrations

Check out our other scrapers: [SilentFlow on Apify](https://apify.com/silentflow)

Response time: usually under 24 hours.

***

***

## 🇫🇷 Version Francaise

[🇬🇧 English](#leboncoin-scraper) | 🇫🇷 Francais

***

***

## Leboncoin Scraper

**Transformez Leboncoin en base de donnees structuree.** Extrayez les prix, descriptions, numeros de telephone des vendeurs, coordonnees GPS et attributs de categorie depuis la plus grande marketplace de petites annonces en France.

### How it works

![How it works](https://api.apify.com/v2/key-value-stores/Vcm0urr8x9cUCuOCG/records/how-it-works-v1.png)

### ✨ Pourquoi utiliser ce scraper ?

Vous passez des heures a copier des annonces depuis les onglets Leboncoin ? Vous avez besoin des numeros de telephone mais vous etes bloque par le "cliquer pour afficher" ? Vous voulez des donnees structurees parmi 28 millions d'annonces mais vous etes limite a la navigation manuelle ?

- 📊 **28M+ d'annonces dans 11 categories.** Immobilier, vehicules, emploi, mode, electronique, loisirs. Un seul scraper couvre toute la marketplace.
- 📱 **Recuperez les numeros de telephone automatiquement.** Le mode navigation revele les coordonnees masquees derriere les clics sur le site. Aucun travail manuel.
- 👤 **Separez les professionnels des particuliers.** Filtrez par type de vendeur pour cibler les pros ou les particuliers. Comparez les strategies de prix entre les deux.
- 🔗 **Collez une URL Leboncoin et c'est parti.** Configurez vos filtres sur leboncoin.fr, copiez l'URL, collez-la ici. Tous vos filtres sont appliques automatiquement.

### 🎯 Cas d'utilisation

| Equipe | Ce qu'elle construit |
|--------|---------------------|
| **Agences immobilieres** | Tableaux de comparaison de prix dans les villes et regions francaises, suivi hebdomadaire des tendances locatives et de vente |
| **Concessionnaires auto** | Surveillance d'inventaire de vehicules d'occasion avec kilometrage, annee, et ecarts de prix entre pros et particuliers |
| **Analystes de marche** | Rapports de tendances consommateurs dans 11 categories, de l'electronique a la mode, avec decoupages regionaux |
| **Recruteurs** | Analyse du marche de l'emploi par region, fourchettes salariales et type d'entreprise pour la strategie d'acquisition de talents |
| **Investisseurs** | Alertes sur les biens sous-evalues en comparant les prix des annonces aux moyennes du quartier |
| **Vendeurs e-commerce** | Suivi des prix concurrents sur l'electronique, le mobilier et la mode pour ajuster les prix en temps reel |

### 📥 Parametres d'entree

#### Recherche

Deux options pour definir votre recherche. **L'option 1 est recommandee** : collez une URL Leboncoin avec tous vos filtres deja appliques.

| Parametre | Type | Description |
|-----------|------|-------------|
| `searchUrl` | string | **(Recommande)** Collez une URL de recherche Leboncoin depuis votre navigateur. Tous les filtres de l'URL (mots-cles, categorie, localisation, fourchette de prix, tri) sont utilises automatiquement. |
| `text` | string | Mots-cles a rechercher (ex : "appartement", "voiture", "iphone"). Ignore quand une URL de recherche est fournie. |
| `category` | select | Categorie Leboncoin : Toutes categories, Immobilier (tout), Ventes immobilieres, Locations, Colocations, Voitures, Motos, Tous vehicules, Emploi, Mode, Loisirs. |
| `ownerType` | select | Filtre vendeur : Tous les vendeurs, Particuliers uniquement, Professionnels uniquement. |

#### Options

| Parametre | Type | Defaut | Description |
|-----------|------|--------|-------------|
| `maxItems` | integer | 100 | Nombre maximum d'annonces a retourner. |
| `browseMode` | boolean | false | Visite chaque page d'annonce pour les details complets : description, numero de telephone, infos vendeur, coordonnees GPS et tous les attributs de categorie. |

### 📊 Donnees de sortie

Telechargez vos resultats en Excel, CSV, JSON, HTML ou XML.

**Le mode recherche** retourne des resumes d'annonces :

```json
{
    "id": 3058213755,
    "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3058213755",
    "title": "Bel appartement 3 pieces 75m2",
    "price": 285000,
    "city": "Paris",
    "zipcode": "75011",
    "department": "Paris",
    "region": "Ile-de-France",
    "categoryId": "9",
    "categoryName": "Ventes immobilieres",
    "firstPublicationDate": "2025-01-15T10:30:00Z",
    "images": ["https://img.leboncoin.fr/api/v1/lbcpb1/images/..."],
    "adType": "offer",
    "hasPhone": true,
    "scrapedAt": "2026-04-09T15:30:00Z"
}
```

**Le mode navigation** (`browseMode: true`) ajoute les details complets pour chaque annonce :

```json
{
    "id": 3058213755,
    "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3058213755",
    "title": "Bel appartement 3 pieces 75m2",
    "price": 285000,
    "city": "Paris",
    "zipcode": "75011",
    "department": "Paris",
    "region": "Ile-de-France",
    "categoryId": "9",
    "categoryName": "Ventes immobilieres",
    "firstPublicationDate": "2025-01-15T10:30:00Z",
    "images": ["https://img.leboncoin.fr/api/v1/lbcpb1/images/..."],
    "adType": "offer",
    "hasPhone": true,
    "description": "Superbe appartement lumineux de 75m2 avec balcon, situe au 3eme etage avec ascenseur. 3 pieces dont 2 chambres, cuisine equipee, parking en sous-sol.",
    "status": "active",
    "latitude": 48.85122,
    "longitude": 2.33289,
    "phone": "+33612345678",
    "ownerId": "abc-123-def-456",
    "ownerName": "Agence Duval Immobilier",
    "ownerType": "pro",
    "favorites": 42,
    "attributes": [
        {
            "key": "square",
            "keyLabel": "Surface",
            "value": "75",
            "valueLabel": "75 m2"
        },
        {
            "key": "rooms",
            "keyLabel": "Pieces",
            "value": "3",
            "valueLabel": "3"
        },
        {
            "key": "energy_rate",
            "keyLabel": "Classe energie",
            "value": "c",
            "valueLabel": "C"
        }
    ],
    "scrapedAt": "2026-04-09T15:30:00Z"
}
```

### 🗂️ Champs de donnees

#### Basique

| Champ | Type | Description |
|-------|------|-------------|
| `id` | integer | Identifiant unique de l'annonce Leboncoin |
| `url` | string | Lien direct vers l'annonce |
| `title` | string | Titre de l'annonce |
| `price` | integer | Prix en euros |
| `categoryId` | string | ID de categorie Leboncoin |
| `categoryName` | string | Nom de la categorie en francais |
| `adType` | string | Type d'annonce (offre, demande) |
| `firstPublicationDate` | string | Date de premiere publication (ISO 8601) |
| `images` | array | Liste des URLs d'images |
| `hasPhone` | boolean | Si un numero de telephone est disponible |

#### Localisation

| Champ | Type | Description |
|-------|------|-------------|
| `city` | string | Nom de la ville |
| `zipcode` | string | Code postal |
| `department` | string | Departement francais |
| `region` | string | Region francaise |
| `latitude` | float | Latitude GPS (mode navigation) |
| `longitude` | float | Longitude GPS (mode navigation) |

#### Vendeur

| Champ | Type | Description |
|-------|------|-------------|
| `ownerId` | string | Identifiant unique du vendeur (mode navigation) |
| `ownerName` | string | Nom affiche du vendeur (mode navigation) |
| `ownerType` | string | Type de vendeur : particulier ou pro (mode navigation) |
| `phone` | string | Numero de telephone du vendeur (mode navigation) |

#### Contenu (mode navigation)

| Champ | Type | Description |
|-------|------|-------------|
| `description` | string | Texte complet de description de l'annonce |
| `status` | string | Statut de l'annonce (active, expiree) |
| `favorites` | integer | Nombre d'utilisateurs ayant sauvegarde cette annonce |
| `attributes` | array | Attributs specifiques a la categorie (surface, pieces, classe energie, kilometrage, etc.) |

#### Meta

| Champ | Type | Description |
|-------|------|-------------|
| `scrapedAt` | string | Horodatage d'extraction (ISO 8601) |

### 🚀 Exemples

#### Chercher des appartements a Paris avec une URL

Le plus simple : allez sur leboncoin.fr, definissez vos filtres, copiez l'URL.

```json
{
    "searchUrl": "https://www.leboncoin.fr/recherche?category=10&text=appartement&locations=Paris&price=500-1500",
    "maxItems": 50
}
```

#### Trouver des voitures d'occasion chez les pros

Utilisez les champs de recherche manuelle pour filtrer par categorie et type de vendeur.

```json
{
    "text": "voiture",
    "category": "2",
    "ownerType": "pro",
    "maxItems": 100
}
```

#### Obtenir tous les details avec numeros de telephone

Activez le mode navigation pour collecter descriptions, coordonnees GPS, numeros de telephone et tous les attributs de categorie.

```json
{
    "searchUrl": "https://www.leboncoin.fr/recherche?category=9&text=maison&price=200000-500000",
    "maxItems": 30,
    "browseMode": true
}
```

#### Parcourir les offres d'emploi de particuliers

Combinez recherche textuelle avec filtres de categorie et type de vendeur.

```json
{
    "text": "developpeur",
    "category": "71",
    "ownerType": "private",
    "maxItems": 50
}
```

### 💻 Integrations

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

run = client.actor("silentflow/leboncoin-scraper").call(run_input={
    "searchUrl": "https://www.leboncoin.fr/recherche?category=9&text=appartement&locations=Paris",
    "maxItems": 50,
    "browseMode": True,
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"{item['title']} - {item['price']}€ - {item.get('phone', 'N/A')}")
```

#### JavaScript

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

const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });

const run = await client.actor('silentflow/leboncoin-scraper').call({
    searchUrl: 'https://www.leboncoin.fr/recherche?category=9&text=appartement&locations=Paris',
    maxItems: 50,
    browseMode: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(item => {
    console.log(`${item.title} - ${item.price}€ - ${item.phone || 'N/A'}`);
});
```

### 📈 Performance & limites

| Metrique | Valeur |
|----------|--------|
| Annonces par page de recherche | Jusqu'a 35 |
| Champs de donnees (mode recherche) | 15 |
| Champs de donnees (mode navigation) | 28+ |
| Categories supportees | 11 |
| Resultats maximum par execution | 10 000 |
| Formats de sortie | JSON, CSV, Excel, HTML, XML |

### 💡 Conseils pour de meilleurs resultats

1. **Utilisez searchUrl pour les recherches complexes.** Definissez tous vos filtres sur leboncoin.fr (localisation, fourchette de prix, tri, rayon) puis collez l'URL. C'est la methode la plus rapide et la plus fiable pour obtenir exactement ce que vous cherchez.

2. **Activez browseMode quand vous avez besoin des coordonnees.** Les numeros de telephone, descriptions completes, coordonnees GPS et attributs de categorie (surface, pieces, kilometrage) ne sont disponibles qu'en mode navigation.

3. **Filtrez par type de vendeur pour comparer les marches.** Mettez `ownerType` sur "pro" pour analyser les prix des professionnels, ou "private" pour trouver les particuliers. Lancez les deux separement pour comparer les ecarts de prix.

4. **Commencez avec un petit maxItems pour tester.** Mettez maxItems a 10 ou 20 pour votre premiere execution afin de verifier que les resultats correspondent a vos attentes. Augmentez ensuite.

5. **Choisissez la bonne categorie pour des resultats plus propres.** Chercher "voiture" dans "Toutes categories" retourne des voitures mais aussi des accessoires auto, des sieges auto et des voitures jouets. Selectionnez "Voitures" pour n'obtenir que les vehicules.

### ❓ FAQ

#### Ai-je besoin d'un compte Leboncoin ?

Non. Le scraper extrait les donnees d'annonces publiquement disponibles. Pas de connexion, pas de cle API, pas de cookies necessaires.

#### Qu'est-ce que le mode navigation ?

Le mode navigation visite chaque page d'annonce individuellement pour collecter les details complets : description, numero de telephone du vendeur, coordonnees GPS et tous les attributs specifiques a la categorie (surface, pieces, classe energie, kilometrage, etc.). Sans le mode navigation, vous obtenez uniquement les resumes d'annonces.

#### Les numeros de telephone sont-ils toujours disponibles ?

Les numeros de telephone sont disponibles en mode navigation quand le vendeur a choisi d'afficher son numero sur l'annonce. Tous les vendeurs ne partagent pas leur numero.

#### Quelles categories sont supportees ?

11 categories : Toutes categories, Immobilier (tout), Ventes immobilieres, Locations, Colocations, Voitures, Motos, Tous vehicules, Emploi, Mode et Loisirs.

#### Quand utiliser searchUrl ou les champs manuels ?

Utilisez `searchUrl` autant que possible. Il capture tous les filtres disponibles sur leboncoin.fr, y compris le rayon de localisation, les fourchettes de prix et le tri. Les champs manuels (`text`, `category`, `ownerType`) sont utiles pour les recherches simples ou pour construire des pipelines automatises.

#### Combien ca coute ?

Cet Actor utilise des unites de calcul Apify. Consultez l'onglet Pricing pour les tarifs en vigueur.

### 📬 Support

Besoin d'une fonctionnalite que ce scraper ne propose pas encore ? Nous livrons les evolutions rapidement.

- Les demandes de fonctionnalites vont directement dans notre backlog
- Besoins entreprise ? Nous faisons des integrations sur mesure

Decouvrez nos autres scrapers : [SilentFlow on Apify](https://apify.com/silentflow)

Temps de reponse : generalement moins de 24 heures.

# Actor input Schema

## `searchUrl` (type: `string`):

Paste a Leboncoin search URL with all your filters already applied. Go to leboncoin.fr, set your keywords, category, location, price range, then copy the URL from your browser. All filters from the URL are used automatically.

## `text` (type: `string`):

Keywords to search for (e.g. appartement, voiture, iphone). Ignored when a Search URL is provided.

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

Leboncoin category to search in.

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

Filter by seller type.

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

Maximum number of ads to return.

## `browseMode` (type: `boolean`):

Visit each ad's detail page for full data: description, phone number, seller info, GPS coordinates, and attributes. Slower but much richer data.

## Actor input object example

```json
{
  "text": "appartement",
  "category": "0",
  "ownerType": "all",
  "maxItems": 1000,
  "browseMode": false
}
```

# Actor output Schema

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

Complete listing data including: id (ad ID), title, price (EUR), city, department, region, postalCode, categoryId, categoryName, subCategoryName, firstPublicationDate, indexDate, owner (pro/private), hasPhone, url, images (photo URLs), attributes (specific fields per category), description.

## `listingsCSV` (type: `string`):

CSV format export of all listings for spreadsheet analysis

## `listingsExcel` (type: `string`):

Excel format export of all listings

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

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

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searchUrl": "",
    "text": "appartement"
};

// Run the Actor and wait for it to finish
const run = await client.actor("silentflow/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 = {
    "searchUrl": "",
    "text": "appartement",
}

# Run the Actor and wait for it to finish
run = client.actor("silentflow/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 '{
  "searchUrl": "",
  "text": "appartement"
}' |
apify call silentflow/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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