# Leboncoin Immobilier Scraper API - Location, Vente & Prix (`scrapifier/leboncoin-immobilier-scraper`) Actor

⚡ Scrape unlimited Leboncoin real-estate listings — no URL needed! Pick rent, sale or flatshare, add your filters (price, surface, rooms, DPE…) and instantly get rich, structured data for market analysis, deal sourcing, price monitoring or lead generation.

- **URL**: https://apify.com/scrapifier/leboncoin-immobilier-scraper.md
- **Developed by:** [Scrapifier](https://apify.com/scrapifier) (community)
- **Categories:** Real estate
- **Stats:** 12 total users, 7 monthly users, 99.5% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.60 / 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 Immobilier Scraper API - Location, Vente & Prix

Scrape real-estate listings from Leboncoin by transaction, location and property filters (no URL to build) and export them as JSON, CSV or Excel, or pull them straight from the API.

⚡ For every listing you get the **title, price or rent and full description**, the **surface, rooms, bedrooms, DPE and GES classes**, heating, floor and the other typed attributes, the **image URLs**, the **city, postal code and GPS coordinates**, the publication and update dates, the Leboncoin category and whether the seller published a phone number. Covers rentals, sales, flatshares, holiday rentals, new builds and offices, with **server-side filters** applied by Leboncoin before you pay, **no login** and **pay per result**.

[![Apify Actor](https://apify.com/actor-badge?actor=scrapifier/leboncoin-immobilier-scraper)](https://apify.com/scrapifier/leboncoin-immobilier-scraper)

### 🎯 Why scrape Leboncoin real estate?

- **Deal sourcing for investors**: pull every house for sale under a budget in a department, with land surface and construction year, and spot underpriced listings the day they appear.
- **Price and rent monitoring**: collect apartments for rent in a city each week and follow the median rent per square metre by arrondissement.
- **Lead generation for agencies**: list private-seller listings (`owner_type` set to `private`) in your zone and reach owners before the competition does.
- **Market research**: measure how many listings carry a DPE class F or G, how many are furnished, or how long they stay online across whole regions.
- **Relocation and house hunting**: get a spreadsheet of flatshares or rentals matching your exact criteria instead of refreshing search pages.
- **Academic and data journalism work**: build datasets of rents, surfaces and energy ratings for housing studies, with coordinates ready for mapping.

### 📊 What data does Leboncoin Real Estate Scraper extract?

| Field | Description |
|---|---|
| `id` | Unique Leboncoin listing id |
| `url` | Direct link to the listing |
| `subject` | Listing title |
| `body` | Full description text |
| `price` | Price or rent in euros |
| `category_id`, `category_name` | Leboncoin category id and name |
| `first_publication_date`, `index_date`, `expiration_date` | First publication, last update and expiration dates (`YYYY-MM-DD HH:MM:SS`) |
| `status` | Listing status (for example `active`) |
| `ad_type` | `offer` or `demand` |
| `brand` | Source brand (`leboncoin`) |
| `images[]` | Image URLs |
| `attributes[]` | Typed real-estate attributes: surface, rooms, bedrooms, DPE, GES, heating, floor and more |
| `attributes[].key`, `key_label`, `value`, `value_label` | Attribute key (for example `rooms`, `square`, `energy_rate`), its readable name, the raw value and the readable value |
| `attributes[].values`, `values_label`, `value_label_reader`, `generic` | Multi-valued variants, accessibility label and generic flag |
| `location.*` | `city`, `city_label`, `zipcode`, `department_id`, `department_name`, `region_id`, `region_name`, `country_id`, `lat`, `lng`, `source`, `provider`, `is_shape` |
| `has_phone` | Whether the seller published a phone number |
| `scraped_at` | Extraction timestamp |
| `search_category`, `search_location`, `search_url` | The category, location and search URL that produced the listing |

The dataset's **Overview** view shows the key columns (id, title, price, category, city, zipcode, last update, URL); the full item is available in every export.

### 🚀 How to scrape Leboncoin real estate

1. Open the Actor and pick a **Transaction** in `category`: for rent, for sale, flatshares, holiday rentals, new builds, or offices and commercial.
2. Add one or more **locations** in `locations` (`Paris 11`, `Lyon`, `75011`), or leave it empty to search all of France. Set `radius_m` to `0` to stay inside the city limits.
3. Set your **budget** (`price_min`, `price_max`), the **property type** and any property filter: surface, rooms, DPE, heating, elevator, floor, construction year, condition. Anything else goes in **Advanced filters**.
4. Set **Max results** (`0` collects everything available) and keep the pre-filled **residential FR proxy**.
5. Click **Start**. The Actor geocodes your locations, builds the Leboncoin search and collects listings page by page.
6. Open the **Storage** tab to preview the listings and export them as JSON, CSV, Excel or XML, or read them from the dataset API.

The same run can be started from the Apify API, the Python or JavaScript client, or put on a schedule for daily monitoring.

### 📥 Input parameters

| Field | Key | Type | Default | Description |
|---|---|---|---|---|
| Leboncoin search URL | `url` | string | none | Paste a leboncoin.fr search URL to replay exactly that search. When set, every other filter is ignored. |
| Transaction | `category` | select | `10` | `10` For rent, `9` For sale, `11` Flatshares, `12` Holiday rentals, `304` New builds, `13` Offices & commercial. |
| Keywords | `text` | string | none | Optional free-text keywords, e.g. `balcon`, `loft`, a program name. |
| Location(s) | `locations` | array of strings | `["Paris"]` | City, arrondissement or postal code (`Paris 11`, `Lyon`, `75011`). Empty = all of France. |
| Search radius (m) | `radius_m` | integer | none | Radius around each city, 0 to 100000. `0` keeps the city itself; empty uses the geocoder's radius. |
| Min price (€) | `price_min` | integer | none | Minimum price or rent. |
| Max price (€) | `price_max` | integer | `2500` | Maximum price or rent. |
| Seller type | `owner_type` | select | `all` | `all`, `private` (private sellers only) or `pro` (agencies and professionals only). |
| Sort by | `sort` | select | `relevance` | `relevance`, `newest`, `price_asc` or `price_desc`. |
| Property type | `property_types` | array of strings | `["apartment"]` | One or more of `apartment`, `house`, `land`, `parking`, `other`. Empty = all. |
| Min surface (m²) | `surface_min` | integer | none | Minimum living surface. |
| Max surface (m²) | `surface_max` | integer | none | Maximum living surface. |
| Min rooms | `rooms_min` | integer | `2` | Minimum number of rooms (pièces). |
| Min bedrooms | `bedrooms_min` | integer | none | Minimum number of bedrooms. |
| Min bathrooms | `bathrooms_min` | integer | none | Minimum number of bathrooms. |
| Min land surface (m²) | `land_surface_min` | integer | none | Minimum land or plot surface (houses, land). |
| Max land surface (m²) | `land_surface_max` | integer | none | Maximum land or plot surface (houses, land). |
| Furnished | `furnished` | array of strings | none | `1` Furnished, `2` Unfurnished (mostly rentals). |
| Energy rating (DPE) | `energy_rate` | array of strings | none | DPE classes to include: `a` to `g`. |
| Greenhouse gas (GES) | `ges` | array of strings | none | GES classes to include: `a` to `g`. |
| Heating type | `heating_type` | array of strings | none | `individual` or `communal`. |
| Heating mode | `heating_mode` | array of strings | none | `gas`, `electric`, `fuel` (fuel oil) or `other`. |
| Elevator | `elevator` | array of strings | none | `1` With elevator, `2` Without elevator. |
| Orientation | `orientation` | array of strings | none | `north`, `south`, `east`, `west`, `north_east`, `north_west`, `south_east`, `south_west`. |
| Min floor | `floor_min` | integer | none | Minimum floor number. |
| Min parking spaces | `parkings_min` | integer | none | Minimum number of parking spaces. |
| Built after (year) | `building_year_min` | integer | none | Minimum construction year (1800 or later). |
| Built before (year) | `building_year_max` | integer | none | Maximum construction year. |
| Sale type | `immo_sell_type` | array of strings | none | `old` Existing, `new` New build, `viager` Life annuity. For the "For sale" transaction. |
| Condition | `property_condition` | array of strings | none | `1` Excellent, `2` Good, `3` Renovated, `4` To refresh. |
| Advanced filters | `filters` | object | `{}` | Any other Leboncoin filter: a key with a list of codes or a `{"min": .., "max": ..}` range. Overrides the dedicated inputs. |
| Max results | `max_results` | integer | `100` | How many listings to collect. `0` = as many as available. |
| Proxy | `proxyConfiguration` | object | residential FR | Apify residential proxies with country `FR` are recommended for reliable runs. |

Example input (the Actor's pre-filled input, apartments for rent in Paris):

```json
{
  "category": "10",
  "locations": ["Paris"],
  "property_types": ["apartment"],
  "price_max": 2500,
  "rooms_min": 2,
  "max_results": 100,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" }
}
```

Each dedicated input maps to one Leboncoin key (`property_types` to `real_estate_type`, surfaces to `square` and `land_plot_surface`, `property_condition` to `global_condition`...). To find any key or code, build the search on [leboncoin.fr](https://www.leboncoin.fr) and read the URL: `square=30-80` becomes `{"square": {"min": 30, "max": 80}}` in `filters`, or paste the whole URL in `url`.

### 📤 Output example

Each listing is one dataset item, exportable as JSON, CSV, Excel or via the API. The item below shows the shape of a rental listing from the pre-filled search; values in angle brackets depend on the listing.

```json
{
  "id": "<listing id>",
  "first_publication_date": "<YYYY-MM-DD HH:MM:SS>",
  "index_date": "<YYYY-MM-DD HH:MM:SS>",
  "status": "active",
  "category_id": "10",
  "subject": "<listing title>",
  "body": "<full description>",
  "brand": "leboncoin",
  "ad_type": "offer",
  "url": "<listing URL>",
  "price": "<rent in euros>",
  "images": ["<image URL>"],
  "attributes": [
    { "key": "square", "key_label": "<label>", "value": "<m²>", "value_label": "<label>" },
    { "key": "rooms", "key_label": "<label>", "value": "<count>", "value_label": "<label>" },
    { "key": "energy_rate", "key_label": "<label>", "value": "<a to g>", "value_label": "<label>" }
  ],
  "location": { "city": "Paris", "zipcode": "<postal code>", "lat": "<latitude>", "lng": "<longitude>" },
  "has_phone": false,
  "scraped_at": "<YYYY-MM-DD HH:MM:SS>",
  "search_category": "IMMOBILIER_LOCATIONS",
  "search_location": "Paris",
  "search_url": "<search URL>"
}
```

The run's OUTPUT record also holds the run statistics (`total_ads`, `unique_ads`, `duplicates`, `pages_processed`, `errors`), the total number of listings Leboncoin reported for the search (`total_ads_available`) and the effective configuration.

### 💡 Ready-to-run examples

**Apartments for rent in Paris, two rooms or more, under 2,500 € (the pre-filled input)**

```json
{ "category": "10", "locations": ["Paris"], "property_types": ["apartment"], "price_max": 2500, "rooms_min": 2, "max_results": 100, "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" } }
```

**Houses for sale near Bordeaux, 200,000 to 500,000 €, 100 m² and 300 m² of land**

```json
{ "category": "9", "locations": ["Bordeaux"], "property_types": ["house"], "price_min": 200000, "price_max": 500000, "surface_min": 100, "rooms_min": 4, "land_surface_min": 300, "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" } }
```

**Advanced filters: DPE A to C, 2 to 4 rooms, 300 m² of land, with elevator**

```json
{ "category": "10", "locations": ["Paris"], "filters": { "energy_rate": ["a", "b", "c"], "rooms": { "min": 2, "max": 4 }, "land_plot_surface": { "min": 300 }, "elevator": ["1"] }, "max_results": 100 }
```

**Newest flatshares in Lyon from private sellers only**

```json
{ "category": "11", "locations": ["Lyon"], "owner_type": "private", "sort": "newest", "max_results": 100 }
```

### 💰 Pricing: how much does it cost to scrape Leboncoin?

From **$0.89 per 1,000 listings** on the free plan, with automatic volume discounts down to **$0.60 per 1,000** on higher Apify plans. You pay only for the results you receive, there is no subscription and no start fee. New Apify accounts get free monthly platform credits to try it.

Cost is driven purely by the number of listings returned: `max_results` caps each run (the default is `100`), and every filter (price range, property type, surface, DPE, seller type) is applied by Leboncoin before the results are counted, so a precise search costs less than a broad one. Residential proxy traffic is billed separately by Apify.

### ⚙️ Performance, proxies and limits

- **Proxy**: Apify residential proxies with country `FR` are pre-filled and recommended. The Actor also runs without a proxy, but pages can then be blocked; a blocked page is logged and that search stops.
- **Page size**: listings are fetched 35 per page and pushed to the dataset in batches, so results appear while the run is going.
- **Large searches**: a price range wider than 50,000 € is split into 50,000 € intervals searched one after the other, so large result sets are covered beyond Leboncoin's paging depth.
- **Deduplication**: listings are deduplicated by `id` within a run, across price intervals; the duplicates ignored are counted in the OUTPUT record.
- **Locations**: each entry in `locations` is geocoded (with retries and an OpenStreetMap fallback). An unresolved location is skipped; if none resolves, the run fails with an explicit message.
- **URL mode**: with `url` set, the search is replayed exactly as the website ran it; other inputs are ignored and prices are not split, so the result matches the page.
- **Default run options**: 1,024 MB of memory and a 3,600 s timeout.

### 🔌 Integrations and API

Run Leboncoin Real Estate Scraper from the [Apify API](https://docs.apify.com/api/v2), the [Python](https://docs.apify.com/api/client/python) or [JavaScript](https://docs.apify.com/api/client/js) client, or on a [schedule](https://docs.apify.com/platform/schedules). Connect it to Make, Zapier, n8n, Google Sheets, Slack or any webhook through [Apify integrations](https://apify.com/integrations). Every run's dataset is available as JSON, CSV, Excel or XML from the dataset API.

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapifier~leboncoin-immobilier-scraper/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{ "category": "10", "locations": ["Paris"], "property_types": ["apartment"], "price_max": 2500, "rooms_min": 2, "max_results": 100, "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"], "apifyProxyCountry": "FR" } }'
```

### ❓ FAQ

**Is it legal to scrape Leboncoin real estate?**

The Actor only reads listings Leboncoin publishes to anyone without logging in. Listings can contain personal data, so process them in line with GDPR, respect Leboncoin's terms, and stay responsible for how you use the data. This is not legal advice.

**Do I need a Leboncoin account, login or cookies?**

No. Nothing to log in to, no cookies. Keep the pre-filled residential FR proxy for reliable runs.

**Can I export Leboncoin listings to Excel or Google Sheets?**

Yes. Every run's dataset downloads as CSV, XLSX, JSON or XML, and the Google Sheets integration can push new listings to a sheet.

**How many listings can I scrape?**

As many as Leboncoin returns: set `max_results` to `0` to collect everything, or keep a cap to control cost.

**Which transactions are supported?**

Rent, sale, flatshares, holiday rentals, new builds, and offices and commercial. Vehicles are handled by the Leboncoin Vehicles Scraper below.

**How do I find a filter's code?**

Build the search on leboncoin.fr and read the URL parameters. Every key and value from the URL works in `filters`, or paste the whole URL in `url`.

**Does it search the whole city or the surrounding area too?**

By default each location uses the geocoder's radius, which spills into neighbouring towns. Set `radius_m` to `0` to keep the city itself, or to any value up to 100,000 m.

**How fresh is the data?**

Every run scrapes Leboncoin live. Sort by `newest` and schedule the Actor daily or hourly to catch new listings as they appear.

### 🔗 Related scrapers

- [Leboncoin Vehicles Scraper](https://apify.com/scrapifier/leboncoin-voitures-scraper): cars, motorbikes and vans by filters, the same input style.
- [Leboncoin Scraper](https://apify.com/scrapifier/leboncoin-scraper): any Leboncoin category from a search URL.
- [SeLoger Scraper](https://apify.com/scrapifier/seloger-scraper): real-estate listings from SeLoger.
- [PAP Scraper](https://apify.com/scrapifier/pap-immobilier-scraper): private-seller real estate from pap.fr.
- [Bien'ici Scraper](https://apify.com/scrapifier/bienici-scraper): real-estate listings from Bien'ici.

### 🇫🇷 En français

Ce scraper Leboncoin extrait les annonces immobilières (location, vente, colocation, saisonnier, neuf, bureaux et commerces) à partir de simples filtres, sans construire d'URL. Choisissez une transaction, une ou plusieurs localisations (ville, arrondissement ou code postal, géocodés automatiquement) et vos critères : prix ou loyer, type de bien, surface, pièces, chambres, DPE et GES, chauffage, ascenseur, étage, année de construction, état du bien, type de vendeur. Les filtres sont appliqués par Leboncoin avant la collecte, et l'objet `filters` accepte n'importe quel autre paramètre lu dans l'URL de leboncoin.fr. Chaque annonce est renvoyée avec son titre, sa description, son prix, ses attributs typés, ses photos et sa géolocalisation (ville, code postal, latitude, longitude). L'export se fait en CSV, JSON ou Excel depuis l'onglet Storage ou via l'API Apify, pour alimenter un tableur, un CRM ou une analyse de marché. Le paiement est au résultat : vous ne payez que les annonces reçues, sans abonnement.

### 💬 Support

Questions, bugs or a feature request? Open an issue in the **Issues** tab of this Actor, I answer quickly. If Leboncoin Real Estate Scraper saves you time, a rating on the Store helps others find it.

# Actor input Schema

## `url` (type: `string`):

Paste the URL of a search from leboncoin.fr to get exactly what that page returns. When set, every other filter below is ignored.

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

What kind of real-estate listing to search.

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

Optional free-text keywords, e.g. "balcon", "loft", a program name.

## `locations` (type: `array`):

City, arrondissement or postal code, e.g. "Paris 11", "Lyon", "75011". Add several, or leave empty to search all of France.

## `radius_m` (type: `integer`):

How far around each city to search. 0 keeps the city itself, like "toute la ville" on Leboncoin. Leave empty to use the radius the geocoder suggests, which spills into neighbouring towns.

## `price_min` (type: `integer`):

Minimum price / rent.

## `price_max` (type: `integer`):

Maximum price / rent.

## `owner_type` (type: `string`):

Filter by seller.

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

Result ordering.

## `property_types` (type: `array`):

One or more property types. Empty = all.

## `surface_min` (type: `integer`):

Minimum living surface.

## `surface_max` (type: `integer`):

Maximum living surface.

## `rooms_min` (type: `integer`):

Minimum number of rooms (pièces).

## `bedrooms_min` (type: `integer`):

Minimum number of bedrooms.

## `bathrooms_min` (type: `integer`):

Minimum number of bathrooms.

## `land_surface_min` (type: `integer`):

Minimum land/plot surface (houses, land).

## `land_surface_max` (type: `integer`):

Maximum land/plot surface (houses, land).

## `furnished` (type: `array`):

Furnished / unfurnished (mostly rentals).

## `energy_rate` (type: `array`):

Energy performance classes to include.

## `ges` (type: `array`):

GES classes to include.

## `heating_type` (type: `array`):

Individual or communal heating.

## `heating_mode` (type: `array`):

Heating energy.

## `elevator` (type: `array`):

Building elevator.

## `orientation` (type: `array`):

Facing direction.

## `floor_min` (type: `integer`):

Minimum floor number.

## `parkings_min` (type: `integer`):

Minimum number of parking spaces.

## `building_year_min` (type: `integer`):

Minimum construction year.

## `building_year_max` (type: `integer`):

Maximum construction year.

## `immo_sell_type` (type: `array`):

Type of sale (for the 'For sale' transaction).

## `property_condition` (type: `array`):

Property condition.

## `filters` (type: `object`):

Any other Leboncoin real-estate filter — each entry is a key with either a list of codes (enum) or a {"min":.., "max":..} range. Example: {"energy_rate": \["a","b"], "rooms": {"min": 2, "max": 4}, "land_plot_surface": {"min": 300}}. The full key/code table is in the README (Filters reference section). Tip: build your search on leboncoin.fr and copy the URL query parameters — every key and value from the URL works here (e.g. real_estate_type=2\&square=30-80 → {"real_estate_type": \["2"], "square": {"min": 30, "max": 80}}). Also lets you override any dedicated input above.

## `max_results` (type: `integer`):

How many listings to collect (0 = as many as available).

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

Residential FR proxies are recommended for reliable runs.

## Actor input object example

```json
{
  "category": "10",
  "locations": [
    "Paris"
  ],
  "price_max": 2500,
  "owner_type": "all",
  "sort": "relevance",
  "property_types": [
    "apartment"
  ],
  "rooms_min": 2,
  "filters": {},
  "max_results": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

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

All Leboncoin real-estate listings extracted by this run.

# 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 = {
    "url": "",
    "locations": [
        "Paris"
    ],
    "price_max": 2500,
    "property_types": [
        "apartment"
    ],
    "rooms_min": 2,
    "filters": {},
    "max_results": 100,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapifier/leboncoin-immobilier-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 = {
    "url": "",
    "locations": ["Paris"],
    "price_max": 2500,
    "property_types": ["apartment"],
    "rooms_min": 2,
    "filters": {},
    "max_results": 100,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapifier/leboncoin-immobilier-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 '{
  "url": "",
  "locations": [
    "Paris"
  ],
  "price_max": 2500,
  "property_types": [
    "apartment"
  ],
  "rooms_min": 2,
  "filters": {},
  "max_results": 100,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call scrapifier/leboncoin-immobilier-scraper --silent --output-dataset

```

## MCP server setup

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