# Leboncoin Immobilier Scraper — French Real Estate (`noahadler/leboncoin-immobilier`) Actor

Scrape Leboncoin.fr Immobilier (ventes/locations): price EUR, rooms, m², property type, energy labels, city and ad URL. FR RESIDENTIAL recommended. Racimo of Leboncoin Voiture — clean RE schema, not a generalist dump.

- **URL**: https://apify.com/noahadler/leboncoin-immobilier.md
- **Developed by:** [Noah Adler](https://apify.com/noahadler) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 properties

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 Immobilier Scraper — French Real Estate 🇫🇷

**Leboncoin.fr Immobilier** scraper for **French real estate** (ventes / locations / colocations): price EUR, rooms, m², property type, energy labels, city and ad URL — one clean Dataset row per listing.

> Leboncoin search pages ship ad payloads inside Next.js `__NEXT_DATA__`. This Actor GETs `/recherche?category=9|10|11&…`, extracts `props.pageProps.searchData.ads` (~35 per page), and paginates until `maxItems`. **France residential proxy is recommended** (bot protection is strong; default input enables Apify RESIDENTIAL + country FR).

**Why this Actor:** Immobilier-only vertical · Rich RE fields (rooms / m² / DPE) · No Playwright · FR SEO · Cleaner than generalist Leboncoin scrapers · CSV / API / webhooks ready

### How it works

| Step | Action |
|------|--------|
| 1 | Accept `keyword` and/or Immobilier `searchUrl`, plus category / price / sort / `maxItems` |
| 2 | Build `https://www.leboncoin.fr/recherche?category=9&text=…&page=n` |
| 3 | Parse `__NEXT_DATA__` ads and normalize RE attributes |
| 4 | Paginate until `maxItems` or empty page |

### Output fields

- `listingId`, `title`, `url`, `price`, `priceCents`, `categoryId`, `categoryName`
- `propertyType`, `rooms`, `bedrooms`, `areaSqm`, `furnished`
- `energyLabel`, `gesLabel`, `floor`, `elevator`
- `sellerType`, `sellerName`, `city`, `zipcode`, `department`, `region`, coords
- `thumbUrl`, `imageCount`, dates, raw `attributes`, `keyword`, `scrapedAt`
- `error` / `errorMessage` on hard failure

### Input

| Field | Required | Description |
|-------|----------|-------------|
| `keyword` | Cond. | e.g. `appartement`, `maison` |
| `searchUrl` | Cond. | Full Leboncoin search URL; must be Immobilier (`category` 9/10/11) |
| `category` | No | `9` ventes (default), `10` locations, `11` colocations |
| `maxItems` | No | 1–300 (default 50) |
| `minPrice` / `maxPrice` | No | EUR filters |
| `sort` | No | `relevance` / `time` / `price` |
| `proxyConfiguration` | No | Default RESIDENTIAL + FR |

#### Example

```json
{
  "keyword": "appartement",
  "category": 9,
  "maxItems": 50,
  "minPrice": 100000,
  "maxPrice": 400000,
  "sort": "price",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"],
    "apifyProxyCountry": "FR"
  }
}
```

### Sample output

```json
{
  "listingId": "3202619127",
  "title": "Appartement T3 68 m² centre-ville",
  "url": "https://www.leboncoin.fr/ad/ventes_immobilieres/3202619127",
  "price": 245000,
  "categoryId": 9,
  "categoryName": "Ventes immobilières",
  "propertyType": "Appartement",
  "rooms": 3,
  "areaSqm": 68,
  "energyLabel": "D",
  "city": "Lyon",
  "sellerType": "pro",
  "error": false
}
```

### Use cases

- Lead gen for agencies / proptech
- Price monitoring ventes & locations
- Competitive intel on French classified RE
- SEO niche: **leboncoin immobilier** vs generalist marketplace scrapers

### Limitations

- Immobilier only (9/10/11) — cars/other categories are out of scope (see `leboncoin-voiture`)
- Strong antibot: use FR RESIDENTIAL
- Does not harvest phone numbers

### FAQ

**Keyword or URL?** Either. `searchUrl` must target Immobilier categories.

**Proxy required?** Strongly recommended. Default input enables RESIDENTIAL + FR.

### Keywords

leboncoin immobilier, leboncoin ventes, leboncoin locations, scraper leboncoin immobilier, france real estate scraper, appartement occasion leboncoin, DPE leboncoin export, PPE leboncoin immobilier, category=9 leboncoin api

# Actor input Schema

## `keyword` (type: `string`):

Free text as on Leboncoin (e.g. appartement, maison, studio). Optional if searchUrl is set.

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

Optional full www.leboncoin.fr search URL override. Must be Immobilier (category 9/10/11). When set, keyword/price/sort from the URL are used; input keyword still stored as metadata if provided.

## `category` (type: `integer`):

Leboncoin Immobilier category ID: 9 = ventes immobilières, 10 = locations, 11 = colocations. Ignored when searchUrl already sets category.

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

Maximum immobilier ads to collect (1–300). ~35 ads per page.

## `minPrice` (type: `integer`):

Optional minimum price in euros (maps to price=min-max query param).

## `maxPrice` (type: `integer`):

Optional maximum price in euros.

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

Leboncoin sort: relevance (site default), time (newest), price.

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

Leboncoin often blocks datacenter IPs. Default: Apify RESIDENTIAL, country France (FR). Disable only for local smoke tests.

## Actor input object example

```json
{
  "keyword": "appartement",
  "category": 9,
  "maxItems": 50,
  "sort": "relevance",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

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

No description

# API

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

## JavaScript example

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

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

// Prepare Actor input
const input = {
    "keyword": "appartement"
};

// Run the Actor and wait for it to finish
const run = await client.actor("noahadler/leboncoin-immobilier").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 = { "keyword": "appartement" }

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

```

## MCP server setup

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

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/PJcnQpuBD54nT6wIi/builds/Ow7jlY4PzclcLe9pd/openapi.json
