# Leboncoin Scraper: Ads, Prices, Real Estate & Cars (`automation_craft/leboncoin-scraper`) Actor

Scrape Leboncoin ads by keyword, category, town, postal code, department or region, or from search and ad links, no login. Rows carry the full description, price, photos, every attribute, immobilier surface, rooms and DPE, car make, year and mileage. New ad monitor, CSV or API; pay per ad.

- **URL**: https://apify.com/automation_craft/leboncoin-scraper.md
- **Developed by:** [Automation Craft](https://apify.com/automation_craft) (community)
- **Categories:** Real estate, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.57 / 1,000 ads

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: Ads, Prices, Real Estate & Cars

**Leboncoin Scraper** turns Leboncoin (leboncoin.fr), France's classifieds site, into clean rows: one row per ad with the
title, the full description, the price, the category, the town, postal code, department and region, map coordinates, photo
links, every attribute with Leboncoin's own labels, named real estate fields (surface, rooms, bedrooms, DPE, price per m2,
notary fees, rent and charges) and named car fields (make, model, year, mileage, fuel, gearbox, Leboncoin's own price range).
Search by keyword, category and place (a town, a postal code, a department, a region or coordinates with a radius), paste
Leboncoin search links, give ad links, or read a seller's ads. No login, no browser.

Turn on **Ad details** for each ad's favourites count, and **Seller profiles** for the seller's public profile (member since,
reply rate, ratings, badges; a professional's company, SIREN, SIRET, address and shop). Name a **monitor** and schedule the
Actor: each run delivers and bills only ads it has not delivered before, and can send them to your webhook or Telegram chat.

#### Who uses it

- **Buyers and resellers** watching a town or a department for new ads in a category, newest first, on a schedule.
- **Real estate investors and agents** reading Ventes immobilières and Locations with surface, rooms, DPE, price per m2,
  notary fees, rent and charges.
- **Car dealers and car buyers** reading Voitures with make, model, year, mileage, fuel, gearbox and Leboncoin's own price
  range for the car.
- **Market analysts and data teams** who need French classifieds as rows in JSON, CSV or Excel, through the Apify API.

#### Features

| Feature | Settings | Event billed |
|---|---|---|
| Keyword search, in titles only if you like, with words to leave out | `keywords`, `searchInTitleOnly`, `excludeKeywords` | Ad |
| Leboncoin's 96 categories by id, French name or slug (a parent category covers its children) | `categories` | Ad |
| Places: a town, a town with its postal code, a postal code, a department (name or number), a region, coordinates; a radius in km | `locations`, `radiusKm` | Ad |
| Pasted Leboncoin search links, every parameter read | `searchUrls` | Ad |
| Single ads by link or id | `adUrls` | Ad by URL |
| Every active ad of a seller | `sellerIds` | Ad |
| Price range, private or professional sellers, offers or wanted ads, urgent ads, free items (dons), shippable ads | `minPrice`, `maxPrice`, `sellerType`, `adType`, `urgentOnly`, `freeItemsOnly`, `shippableOnly` | no charge |
| Posted within N days or N hours (Leboncoin's first publication date), or on or after a date | `postedWithinDays`, `postedWithinHours`, `postedAfter` | no charge |
| On the market at least N days (every row carries `daysOnMarket` and `longOnMarket`, 90 days or more; Leboncoin orders by last update and renewed ads keep their first publication date, so older ads are spread through every order), ads with photos only, ads you already have left out | `minDaysOnMarket`, `withPhotosOnly`, `excludeAdIds` | no charge |
| Real estate filters: property type, rooms, bedrooms, living area, land area, DPE, furnished | `propertyTypes`, `roomsMin`, `roomsMax`, `bedroomsMin`, `bedroomsMax`, `surfaceMin`, `surfaceMax`, `landSurfaceMin`, `landSurfaceMax`, `energyClasses`, `furnished` | no charge |
| Car filters: make, fuel, gearbox, year, mileage | `carBrands`, `fuelTypes`, `gearbox`, `yearMin`, `yearMax`, `mileageMin`, `mileageMax` | no charge |
| Any other Leboncoin filter by its own key (floor, elevator, holiday capacity, vehicle type, condition) | `filters` | no charge |
| Sort: newest, oldest, price low or high, relevance | `sort` | no charge |
| Caps per run, per search and per search in pages | `maxItems`, `maxItemsPerSearch`, `maxPagesPerSearch` | no charge |
| Favourites count and the ad's newest state, read from each ad's own record | `includeAdDetails` | Ad detail |
| Seller profiles, once per seller per run; sellers you already have can be skipped | `includeSellerProfiles`, `skipSellerIds` | Seller profile |
| A monitor: only ads new to it, run after run | `monitorName` | Ad (new ads only) and Results page |
| Price changes and removals: a known ad whose price moved comes back with its previous price, price history and drop; an ad your complete searches no longer find gets a removed row (sold, withdrawn, expired) | `trackChanges` (with a monitor) | Ad update |
| Leboncoin's own price drop on the ad (its old price) in percent | always | included |
| Webhook (signed with HMAC SHA-256) and Telegram notifications of each run's ads | `webhookUrl`, `webhookSecret`, `telegramBotToken`, `telegramChatId` | free |
| A private seller's name, written phone numbers and e-mail addresses, exact coordinates (off by default) | `includePersonalData` | free |
| Fail the run when a search could not be read to its end | `failIfIncomplete` | free |
| Apify residential proxies in France (included in the price) or your own proxy links; a gentle pace | `proxyConfiguration`, `requestsPerSecond` | included |
| A coverage row per search, free status rows for misses (20 a run plus one per paid event, then the first of each kind), a run summary that counts every miss, and an HTML run report (key `REPORT`) | always | free |

### Quick start

1. Type a keyword (for example `velo electrique`, `appartement T3` or `clio 4`) and a place (for example `Paris`, `Lyon 69003`,
   `33000`, `Rhône`, `69` or `Bretagne`).
2. Optional: pick a category (`Voitures`, `Ventes immobilières`, `Locations` or an id such as `2`), a price range, a seller
   type, or the real estate and car filters.
3. Set **Maximum ads** and press **Start**.
4. Download the rows as JSON, CSV or Excel, or read them through the API.

Example input, the Actor's own prefill:

```json
{
    "keywords": ["velo"],
    "locations": ["Paris"],
    "maxItems": 20
}
```

Apartments for sale in Lyon with 3 rooms or more and a DPE of A to C, with seller profiles:

```json
{
    "categories": ["Ventes immobilières"],
    "locations": ["Lyon"],
    "propertyTypes": ["apartment"],
    "roomsMin": 3,
    "energyClasses": ["a", "b", "c"],
    "includeSellerProfiles": true,
    "maxItems": 200
}
```

Cars from professionals in Gironde, 2018 or newer, under 80,000 km, cheapest first:

```json
{
    "categories": ["Voitures"],
    "locations": ["33"],
    "sellerType": "pro",
    "yearMin": 2018,
    "mileageMax": 80000,
    "sort": "price_low",
    "maxItems": 100
}
```

### What you get

One row per ad (`type: "ad"`), one coverage row per search (`type: "search"`), free status rows for anything that did not end
as an ad (`type: "status"`), with Track price changes a removed row per ad a monitor no longer finds (`type: "removed"`), and
one run summary at the end (`type: "summary"`). Fill rates below were measured on 1,200 ads
(the 100 newest of each of 12 categories).

#### Ad fields

| Field | What it holds | Filled |
|---|---|---|
| `listId`, `url`, `title`, `description` | Leboncoin's ad id, the ad's link, the title and the full description | 100 % |
| `price`, `priceCents`, `currency`, `oldPrice` | the asking price in euros (`currency` EUR), the price before a drop where Leboncoin shows one | price 95.8 % |
| `priceDropPercent` | how far the price is below the old price Leboncoin shows (percent) | where Leboncoin shows an old price (26 of 600 ads) |
| `publishedAt`, `updatedAt`, `expiresAt` | first published, last updated, expiry (UTC) | published and updated 100 %, expiry 21.4 % |
| `daysOnMarket`, `longOnMarket` | whole days since the first publication at the run's start; whether that is 90 days or more | 100 % |
| `status`, `adType` | active; offer or wanted | 100 % |
| `categoryId`, `categoryName`, `parentCategoryId`, `parentCategoryName` | the ad's category and its parent in Leboncoin's own tree | category 100 % |
| `city`, `zipcode`, `departmentId`, `departmentName`, `regionId`, `regionName` | the ad's place | town 99.4 %, the rest 100 % |
| `latitude`, `longitude`, `locationPrecision`, `coordinatesRounded` | map coordinates, `address` or `city` level, whether they were rounded (private sellers with `includePersonalData` off) | coordinates 100 %, address level 44.5 % |
| `imageUrls`, `imageCount`, `thumbnailUrl` | photo links | 99.0 % (median 4 photos) |
| `attributes`, `features` | every attribute of the ad: `{key: {value, values, label, valueLabel}}`, and equipment lists | attributes 100 % (median 18 an ad) |
| `sellerType`, `sellerUserId`, `sellerStoreId` | private or pro, the seller's ids (the same on all ads of one seller) | 100 % |
| `sellerName`, `sellerSiren`, `sellerActivitySector`, `sellerStoreName` | the seller's shown name (a private seller's only with `includePersonalData`), a professional's SIREN and shop | SIREN on 328 of 332 pro ads |
| `sellerRatingScore`, `sellerRatingCount`, `sellerRefusesCanvassing`, `proRatesLink` | the seller's rating on the ad, whether the seller refuses canvassing, an agency's fee scale link | where Leboncoin shows them |
| `hasPhone` | whether the seller shows a phone number on Leboncoin (the number itself is never read) | 100 %, true on 23.7 % |
| `urgent`, `boosted`, `featuredInGallery`, `highlighted`, `topList`, `extraPhotos` | Leboncoin's paid options | at least one true on 7.2 % |
| `condition`, `shippable`, `shippingType`, `onlinePurchase` | item condition, delivery and online purchase | where Leboncoin has them |
| `favorites`, `detailsIncluded` | how many users saved the ad (with Ad details on, and on every ad link row), whether a search row's own record was read | Ad details on and ad links |
| `sellerProfile`, `sellerProfileCharged` | the seller's public profile (with Seller profiles on); whether this row carried the seller's one charged profile of the run | Seller profiles on |
| `change` | with Track price changes: on a known ad delivered again because its price moved, `changeType`, `previousPrice`, `firstSeenPrice`, `firstSeenAt`, `priceChangeCount`, `priceDropPercentSinceFirstSeen`, `priceHistory` (up to 6 dated prices), `daysSinceLastChange`, `lastPriceChangeAt`; null on other rows | Track price changes on |
| `source`, `searchKey`, `searchLabel`, `page`, `rank`, `monitorName`, `deliveryId`, `scrapedAt` | what found the ad (`fields`, `searchUrl`, `seller` or `adUrl`), the search, its page and rank, the monitor (monitor runs), when the row was made | set by the Actor on every row |

#### Removed rows (`trackChanges`)

`listId`, `reason` (`notFoundByCompleteSearches`), `message`, `lastPrice`, `firstSeenPrice`, `priceChangeCount`, `firstSeenAt`,
`publishedAt` (day), `daysOnMarket`, `monitorName`, `scrapedAt`. Written only when every search of the run was read to its end,
the monitor has no ad links and no posted window, and fewer than half of the tracked ads are missing at once (more points to a
fault at the source; the next complete run compares again). An ad is reported once; if it comes back it is tracked again.

#### Real estate, car and holiday rental fields

| Object | Fields | Filled (100 ads each) |
|---|---|---|
| `realEstate` (Ventes immobilières, Locations, Colocations, Bureaux & Commerces, Immobilier Neuf) | `propertyType`, `saleType`, `surface`, `rooms`, `bedrooms`, `bathrooms`, `landSurface`, `energyClass`, `gesClass`, `furnished`, `floor`, `floorsInBuilding`, `elevator`, `parkingSpaces`, `buildingYear`, `heating`, `condition`, `outsideAccess`, `pricePerSquareMeter`, `estimatedNotaryFees`, `estimatedTotalPrice`, `priceExceptFees`, `agencyFeesPercent`, `monthlyCharges`, `annualCharges`, `propertyTax`, `rentExcludingCharges`, `chargesIncluded`, `securityDeposit`, `availableFrom`, `annualEnergyCostMin`, `annualEnergyCostMax` | sales: property type 100 %, surface 92 %, rooms 89 %, bedrooms 81 %, DPE 77 %, GES 72 %, price per m2 96 %, notary fees 98 %; rentals: surface and rooms 89 %, furnished 88 %, charges 86 %, deposit 83 % |
| `car` (Voitures, Utilitaires) | `make`, `model`, `version`, `trim`, `year`, `firstRegistration`, `mileageKm`, `fuel`, `gearbox`, `vehicleType`, `color`, `doors`, `seats`, `fiscalHorsepower`, `horsepowerDin`, `critAir`, `technicalInspectionValid`, `leboncoinPriceMin`, `leboncoinPriceMax`, `leboncoinPricePositioning`, `historyReportUrl` | make, model, year, mileage, fuel, gearbox 100 %, fiscal horsepower 99 %, Leboncoin's price range 81 % |
| `holidayRental` (Locations saisonnières) | `capacity`, `bedrooms`, `accommodationType`, `bookable`, `rate` with `ratePeriod` (`nightly` or `weekly`, as the owner set it), `nightlyRate`, `weeklyRate`, `minNights`, `petsAccepted`, `smokersAccepted`, `guestRatingScore`, `guestRatingCount`, `checkIn`, `checkOut` (the row's `price` is Leboncoin's price per night) | capacity, type, rate and its period, pets and smokers 100 %, nightly rate 57 %, weekly rate 43 %, bedrooms 90 % |

Each object also has `orMore`: the count fields where the seller chose Leboncoin's "or more" option (for example `seats` 7 for "7 ou plus", `parkingSpaces` 6 for "6 et plus", `capacity` 12 for "12+ pers."). Rows outside these categories carry `realEstate`, `car` and `holidayRental` as null; their own attributes are in `attributes`.

#### Sample row (a real row of the prefill run; some fields and attributes left out)

```json
{
    "type": "ad",
    "listId": "3269893436",
    "url": "https://www.leboncoin.fr/ad/velos/3269893436",
    "title": "2 Velo pour enfants",
    "description": "Je vends ces 2 vélos pour enfants, parfaits pour accompagner les plus petits dans leurs premières aventures à deux roues.\n- Type de vélo : Vélo enfant\n- Univers : Enfant\n- Marque : B'Twin (Decathlon)\n- Quantité : Lot de 2\n 95€ rose pour fille\n 75€ blan pour garçon\nLes 2 a: 150 €",
    "price": 75,
    "currency": "EUR",
    "adType": "offer",
    "status": "active",
    "categoryId": "55",
    "categoryName": "Vélos",
    "parentCategoryName": "Loisirs",
    "publishedAt": "2026-09-14T20:24:55.000Z",
    "daysOnMarket": 29,
    "city": "Paris",
    "zipcode": "75012",
    "departmentName": "Paris",
    "regionName": "Ile-de-France",
    "latitude": 48.85,
    "longitude": 2.41,
    "locationPrecision": "address",
    "coordinatesRounded": true,
    "imageCount": 2,
    "imageUrls": [
        "https://img.leboncoin.fr/api/v1/lbcpb1/images/3e/70/31/3e7031507fd71dbdc454d3a3468ff21f975af7d9.jpg?rule=ad-large",
        "https://img.leboncoin.fr/api/v1/lbcpb1/images/94/75/7c/94757c659e3230cc7a099c3a4efa64a6a7d39e55.jpg?rule=ad-large"
    ],
    "sellerType": "private",
    "sellerUserId": "0b2f0229-be4e-4d2c-9aac-333370240192",
    "sellerName": null,
    "hasPhone": false,
    "urgent": false,
    "condition": null,
    "shippable": false,
    "attributes": {
        "rating_score": {
            "value": "1",
            "values": [
                "1"
            ],
            "label": null,
            "valueLabel": "1"
        },
        "rating_count": {
            "value": "3",
            "values": [
                "3"
            ],
            "label": null,
            "valueLabel": "3"
        },
        "estimated_parcel_weight": {
            "value": "40000",
            "values": [
                "40000"
            ],
            "label": null,
            "valueLabel": "40000"
        }
    },
    "realEstate": null,
    "car": null,
    "source": "fields",
    "searchLabel": "\"velo\" in Paris (75)",
    "page": 1,
    "rank": 16,
    "scrapedAt": "2026-10-14T19:39:39.438Z"
}
```

#### Seller profile (`includeSellerProfiles`)

`memberSince`, `area`, `replyRatePercent`, `replyTimeText`, `replyMinutes`, `ratingScore`, `ratingCount`, `ratingScores`,
`badges`, `activeAds`; for a professional also `name`, `description`, `lastActive`, `companyName`, `siren`, `siret`,
`activitySector`, `address`, `storeName`, `storeId`, `storeDescription`, `storeOpeningHours`, `storeWebsite`, `storePhone` (the shop's phone, when the shop shows one; Leboncoin limits that call, so a run reads phones until its first refusal,
about 5 shops per run in our tests, then stops asking, and the summary counts `storePhonesRead` and `storePhonesNotRead`), `storeLogoUrl`,
`storeAddress`, `storeActiveSince` and `storeRating` (the shop's rating as Leboncoin shows it). A private seller's profile
carries their `name`, `description`, `pictureUrl` and `lastActive` only with `includePersonalData` on. A seller's profile is billed once per run; their later rows carry it
free. A profile that could not be read leaves the row without one, and nothing is billed for it.

#### Coverage row (one per search)

`searchKind`, `searchLabel`, `searchKeyword`, `searchCategoryId`, `searchPlace`, `searchRadiusKm`, `searchSellerId`, `sort`,
`adsOnLeboncoin` (Leboncoin's total for the search), `adsOnLeboncoinPro`, `adsOnLeboncoinPrivate`, `pagesRead`, `adsSeen`,
`adsDelivered`, `alreadyDelivered`, `knownToMonitor`, `filteredOut` and `filteredOutBy` (per filter), `removedOrGone`,
`detailsFailed`, `newAdsMayLieBeyond` (a monitor), `complete`, `stoppedBy`, `morePagesOffered` and a `note`.

#### Free status rows

Each status row has `scope` (input, place, ad, search or run), `key`, `status`, `message`, `input` and `details`: a setting
or an item the Actor refused (`invalid`), a category or place name that several share or that Leboncoin's place search
answers with another spelling or town (`ambiguous`, with what it found), a place Leboncoin does not know (`unknown_place`), an ad that was removed, sold or expired or an id that
never existed (`not_found`), an ad or a page that could not be read (`failed`), a search Leboncoin refused as sent
(`search_not_applied`), an ad link the monitor already delivered (`skipped`), a webhook or Telegram failure
(`notification_failed`), and the reason a run stopped (`limit_reached`, `source_unavailable`, `monitor_unavailable`).

The platform bills every row written, so a run writes 20 rows about single ads, places, inputs or searches plus one per paid
event; past that it writes the first row of each kind, counts the rest in the summary (`statusRowsNotWritten`) and says so in
one run row. The run report (key `REPORT`) keeps up to 200 coverage rows.

#### How searches are read

- **Past 3,500 ads.** Leboncoin's page numbers stop at 3,500 ads (100 pages of 35). Newest first (the default), oldest first
  and the price orders are walked with Leboncoin's own cursor past that point, ads without a price included (a platform run read
  3,784 of the 3,785 ads Leboncoin counted for one search; an ad added or moved while a walk runs can be missed, and when
  Leboncoin's cursor serves a page already read the walk ends there with `stoppedBy: "repeat"`). The relevance order is read
  page by page and stops at 3,500 ads, and the coverage row says so (`stoppedBy: "searchCap"`).
- **In order.** Ad links are read first, then the searches one after the other (for each place, each keyword with each
  category), then search links and sellers, so the first search can take the whole `maxItems`; set `maxItemsPerSearch` to
  spread a run over its searches.
- **Checked on every ad.** Leboncoin applies the search's filters, and ignores some values without a word, so every ad of a
  search is checked again against your category, place, price, seller type, ad type and every filter before it is delivered
  (ad links are delivered as given). An ad
  that fails a check is left out free and counted on the coverage row. A count where the seller chose Leboncoin's "or more"
  option (seats "7 ou plus") is that number or more: it passes a minimum at or under that number and never a maximum, and is
  otherwise left out free, counted as `filter:<key>:orMore`.
- **Places.** Departments and regions need no lookup. A town or a postal code is looked up with Leboncoin's own place
  search, and only an exact answer is used; another spelling or another town is a free `ambiguous` row naming what Leboncoin
  found, a place it does not know a free `unknown_place` row, and that place's searches are not read.
- **Access.** Requests leave through one Apify residential exit in France at a gentle pace (0.8 a second by default). An
  exit Leboncoin refuses is replaced by a fresh one, up to 6 times a run; after that the run ends with a free
  `source_unavailable` row.
- **One row per ad.** An ad found by several keywords, places or links in one run is delivered and billed once.

### How much does it cost to scrape Leboncoin?

You pay per ad row delivered, plus a small start fee per run. Platform usage and the residential proxy are included.

| Event | Free | Bronze | Silver | Gold |
|---|---|---|---|---|
| Ad (per 1,000 ads from searches, search links and sellers) | $0.80 | $0.73 | $0.66 | $0.57 |
| Ad by URL (per 1,000 ads from `adUrls`) | $2.00 | $1.80 | $1.60 | $1.40 |
| Ad detail (per 1,000 rows, only with `includeAdDetails`) | $0.50 | $0.45 | $0.40 | $0.35 |
| Seller profile (per 1,000 sellers, only with `includeSellerProfiles`) | $1.00 | $0.90 | $0.80 | $0.70 |
| Results page (per 1,000 pages of up to 35 ads, monitor runs only) | $4.50 | $4.20 | $3.90 | $3.50 |
| Ad update (per 1,000 price changes and removed rows, monitor runs with `trackChanges` only) | $0.80 | $0.73 | $0.66 | $0.57 |
| Actor start (per run) | $0.0075 | $0.0075 | $0.0075 | $0.0075 |

Platinum and Diamond plans pay the Gold price. The Actor start event is a flat $0.0075, charged once per run, with no plan
discount. The Store pricing card shows these same prices per 1,000 events: "$0.73 / 1,000" on the Ad row means one ad costs
$0.00073, and "$4.20 / 1,000" on the Results page row means one results page costs 0.42 cents.

- **1,000 ads** on the Bronze plan cost 1,000 x $0.00073 = $0.73, plus $0.0075 for the run: $0.7375. The same run costs $0.8075
  on Free and $0.5775 on Gold. With Ad details on, 1,000 ads cost $0.73 + $0.45 + $0.0075 = $1.1875 on Bronze.
- **100 ad links** on Bronze cost 100 x $0.0018 = $0.18, plus $0.0075: $0.1875.
- **A monitor run** on Bronze over 2 searches reads at most 3 pages each (6 x $0.0042 = $0.0252); with 12 new ads it costs
  $0.0252 + 12 x $0.00073 + $0.0075 = $0.04146. Runs without a monitor never pay Results page.
- **A tracked monitor run** (`trackChanges`) on Bronze over a 108 ad search read to its end in 4 pages, finding 3 price changes,
  2 removed ads and 1 new ad: 4 x $0.0042 + 5 x $0.00073 + 1 x $0.00073 + $0.0075 = $0.02868. Known ads whose price did not
  move are free.
- **What is never billed:** ads left out by your filters, an ad found twice in one run, ads a monitor already delivered
  (unless Track price changes finds their price moved),
  removed, sold or expired ads and unknown ids, places Leboncoin's place search does not match exactly, a seller's profile on
  their later rows, coverage, status and summary rows, the run report and the notifications.
- **Limits:** set **Maximum ads** and, in the run options, a maximum charge for the run: the Actor stops before it would pass
  either, and a row whose events do not all fit is withheld whole. A run also spends a small allowance on work that delivers
  nothing billable (pages whose ads your filters leave out, ads that no longer exist, place lookups), USD 0.0006 plus a share
  of every paid event it delivers; a long list of searches that mostly find nothing, or a day when Leboncoin answers very
  slowly, stops early with a free run row that says so. A run writes 20 free rows about single ads, places or searches plus
  one per paid event; past that it writes the first row of each kind and counts the rest in the summary. Maximum ads counts
  ads, price changes and removed rows together.

### Input

| Setting | What it does |
|---|---|
| `keywords` | search words as you would type them on Leboncoin, up to 100 characters each |
| `locations` | a town (`Paris`), a town with its postal code (`Lyon 69003`), a postal code (`33000`), a department by name or number (`Rhône`, `69`, `2A`), a region (`Bretagne`, or today's `Auvergne-Rhône-Alpes`), or coordinates (`48.8566, 2.3522`); without places a search covers all of France |
| `radiusKm` | 1 to 200 km around a town, a postal code or coordinates (coordinates default to 10 km) |
| `categories` | Leboncoin categories by id (`2`), French name (`Voitures`) or slug (`ventes_immobilieres`); every category when left empty |
| `searchUrls` | `https://www.leboncoin.fr/recherche?...` links (the first page); a parameter the Actor cannot read refuses that link with a free row |
| `adUrls` | ad links (`/ad/<category>/<id>` or the older `.htm` links) or ids, each read by id and billed as an Ad by URL |
| `sellerIds` | a seller's id (`sellerUserId` on every row) or profile link: every active ad of that seller |
| `minPrice`, `maxPrice`, `sellerType`, `adType`, `urgentOnly`, `freeItemsOnly`, `shippableOnly` | price in euros, any, private or pro, offer or wanted, urgent, free items, shippable |
| `postedWithinDays`, `postedAfter` | ads first published within N days of the run's start, or on or after a date (one of the two) |
| real estate and car filters | `propertyTypes`, `roomsMin` to `landSurfaceMax`, `energyClasses`, `furnished`; `carBrands` (in capitals, as Leboncoin writes them), `fuelTypes`, `gearbox`, `yearMin` to `mileageMax` |
| `filters` | up to 10 other Leboncoin filters by their own keys: a list of values or `{"min": n, "max": n}` |
| `sort` | newest (default), oldest, price_low, price_high, relevance |
| `maxItems` | the most ad rows a run delivers (100 when left empty, up to 100,000) |
| `maxItemsPerSearch`, `maxPagesPerSearch` | caps per search, search link or seller |
| `includeAdDetails`, `includeSellerProfiles`, `skipSellerIds` | the two add-ons, and sellers whose profile you already have |
| `monitorName`, `webhookUrl`, `webhookSecret`, `telegramBotToken`, `telegramChatId` | the monitor and the notifications |
| `includePersonalData` | a private seller's personal data as Leboncoin shows it logged out (off by default; see Privacy) |
| `failIfIncomplete` | mark the run failed when a search or an ad link could not be read to its end (your own caps never count) |
| `proxyConfiguration`, `requestsPerSecond` | Apify residential in France (default) or your own proxy links; 0.2 to 1 requests a second (0.8 default) |

A run may hold up to 100 searches (places x keywords x categories, plus one per search link and one per seller) and up to
5,000 ad links.

### The monitor and notifications

Name a monitor (`monitorName`) and schedule the Actor (every hour, for example). The monitor remembers every ad it delivered
in a named store this Actor creates for itself, so each run delivers and bills only ads it never delivered before; ads it
already knows are skipped for free. Each run reads the newest 3 pages of 35 ads of each search (set `maxPagesPerSearch` to
change it) and pays a Results page for each page it reads; when the coverage row says `newAdsMayLieBeyond`, raise the pages or
run more often. A monitor needs the newest first order. One monitor name belongs to one set of settings: a run with other
settings delivers nothing and gets a free row saying so. A monitor remembers up to 100,000 ads. Runs on one monitor name
should not overlap: a run that finds the name in use by another run reads nothing and gets a free row.

**Track price changes and removals** (`trackChanges`, with a monitor; it can be switched on for an existing monitor): the
monitor also remembers each ad's price. A known ad met again with another price is delivered again with `change` (previous
price, first seen price, up to 6 dated prices, drop in percent since first seen, number of changes, days since the last
change), billed as an Ad update; a known ad whose price did not move stays free. When every search of a run was read to its
end (set `maxPagesPerSearch` high enough for your searches; the summary's `removalCheck` says whether the check ran), each ad
the monitor tracks that the run did not meet gets a `removed` row, also an Ad update: sold, withdrawn, expired, or changed so
that your searches no longer find it. A run that misses more than half of the tracked ads at once reports none (a fault at
the source is likelier) and the next complete run compares again. Not with ad links or a posted window, which let ads leave
the searches for other reasons.

**Notifications** (free, with or without a monitor) send the ads a run delivered after they were delivered and billed:

- **Webhook** (`webhookUrl`, an https address): JSON batches of 100 ads, up to 1,000 a run, each ad with `listId`, `url`,
  `title`, `price`, `city`, `zipcode`, `categoryName`, `sellerType`, `publishedAt`, `imageUrl` and `searchLabel`. With
  `webhookSecret`, the header `x-signature-sha256` carries the HMAC SHA-256 of the body.
- **Telegram** (`telegramBotToken` of your own bot and `telegramChatId`): one message per ad with its title, price, place and
  link, up to 30 messages a run, the last one counting the rest.

A failed call never fails the run: it is a free `notification_failed` row, without your address or token.

### Privacy and personal data

A private seller's personal data is delivered only when you turn on `includePersonalData` (off by default). With it off, a
private seller's shown name (`sellerName`) and profile picture are not delivered, their street view link is left out, their
address level coordinates are rounded to 2 decimals (about 1 km), phone numbers and e-mail addresses written into their title,
description and attribute values are replaced with `[numéro masqué]` and `[e-mail masqué]` (a wide rule: another 10 digit
figure starting with 0 can be replaced too; a number written in words is not detected), and their shown name is replaced with
`[nom masqué]` in their own title and description. With it on, all of these come as Leboncoin shows them logged out, and the
seller profile add-on adds the private seller's name, profile description, picture and last activity. An ad whose seller type
Leboncoin does not state counts as private. A professional's row is business data and is never masked: name, SIREN, SIRET,
address, shop and the contact details written into its texts. The seller's ids stay in every case, so ads of one seller can be
grouped. Phone numbers that Leboncoin shows only to signed in users are never read. Photos are delivered as links to
Leboncoin's image host; they belong to the people who posted them. You are responsible for a lawful use of personal data,
GDPR included.

### Legal

This Actor is not affiliated with, endorsed by or sponsored by Leboncoin or LBC France. Leboncoin is a trademark of its
owner. Leboncoin's terms forbid automated extraction, and French law protects its database (the database producer's right,
articles L342-1 to L343-4 of the Code de la propriété intellectuelle). You are responsible for a lawful use of the data, which
means a use of non substantial parts of the database and no repeated and systematic extraction of non substantial parts that
goes beyond a normal use of it (article L342-2, which matters for a monitor run on a schedule), and for complying with the
GDPR for any personal data.

### What this Actor does NOT do

- **No phone numbers behind an ad's "show number" button.** Leboncoin shows them only to signed in users and this Actor
  never signs in. A professional's shop phone comes with Seller profiles (`storePhone`), and numbers the seller writes into
  the ad come with the ad (a private seller's with `includePersonalData`, see Privacy).
- **No messages, offers, posting or anything else that needs a Leboncoin account.**
- **No data from other sites:** no e-mails from a professional's own website, no payment provider detection, no Google
  lookups, no energy certificate (ADEME DPE) or recorded sale price (DVF) look ups, no street address recovered from
  government registers, no other property portals and no merging across portals. The shop rating is delivered only as
  Leboncoin itself shows it; the DPE and GES classes only as the ad states them.
- **No nearby transport or points of interest.** The website's map draws them from a map provider's data; they are not in
  the ad's own record.
- **No holiday rental availability dates.** Leboncoin serves its booking calendar only to signed in users, and its date
  filter is not applied without one. Capacity, bookable and accommodation type are available through `filters`.
- **No free allowance of ads per account.** Every ad is billed at the per ad price, which is kept low instead.

### FAQ

#### Does Leboncoin have an API?

Leboncoin offers no public API for its listings. This Actor reads the same public ad data any visitor sees, with no login,
and gives it to you as rows you can read through the Apify API (examples below).

#### Is it legal to scrape Leboncoin?

This Actor reads only public ads without logging in and never asks for phone numbers; a private seller's personal data comes
only when you turn it on. Leboncoin's terms forbid automated extraction and French law protects its database, so you are responsible for a lawful use:
non substantial parts of the database, no repeated and systematic extraction beyond a normal use, and the GDPR for any
personal data (see Legal).

#### Can I get the seller's phone number from Leboncoin?

Not the number behind an ad's "show number" button: Leboncoin shows it only to signed in users, and this Actor never signs in.
The `hasPhone` field tells you whether the seller shows a number on Leboncoin. A professional's shop phone comes with Seller
profiles (`storePhone`). Numbers written into the ad's own texts come
as written for professionals, and for private sellers when you turn on `includePersonalData`.

#### How do I get alerts for new Leboncoin ads?

Name a monitor and schedule the Actor, every hour for example. Each run delivers only ads the monitor has not delivered
before, newest first, bills only those, and can send them to your webhook or to a Telegram chat through your own bot.

#### How many ads can one Leboncoin search return?

Leboncoin's page numbers stop at 3,500 ads (100 pages of 35). Newest first (the default), oldest first and the price orders
are walked with Leboncoin's own cursor past that point, to the end of the search as Leboncoin serves it (the relevance order stops at 3,500); the coverage row gives Leboncoin's total for the search and says whether
it was read to its end.

#### Why does this Actor run with limited permissions?

It needs nothing beyond its own storages: it reads Leboncoin's public ads and writes to its own dataset and key-value store.
Limited permissions keep it from touching anything else in your account. A monitor's memory is a named store the Actor
creates for itself.

### API

Each example starts a run and waits for its rows (the run-sync endpoint suits short runs; use `maxItems` to keep them short).

```bash
curl -X POST "https://api.apify.com/v2/acts/automation_craft~leboncoin-scraper/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"keywords": ["velo"], "locations": ["Paris"], "maxItems": 20}'
```

```js
const res = await fetch('https://api.apify.com/v2/acts/automation_craft~leboncoin-scraper/run-sync-get-dataset-items', {
    method: 'POST',
    headers: { Authorization: 'Bearer <YOUR_API_TOKEN>', 'Content-Type': 'application/json' },
    body: JSON.stringify({ keywords: ['velo'], locations: ['Paris'], maxItems: 20 }),
});
const rows = await res.json();
console.log(rows.filter((r) => r.type === 'ad'));
```

```python
import requests

res = requests.post(
    "https://api.apify.com/v2/acts/automation_craft~leboncoin-scraper/run-sync-get-dataset-items",
    headers={"Authorization": "Bearer <YOUR_API_TOKEN>"},
    json={"keywords": ["velo"], "locations": ["Paris"], "maxItems": 20},
    timeout=330,
)
ads = [r for r in res.json() if r["type"] == "ad"]
```

### Changelog

See the Changelog tab. 0.1: first release.

### More data tools by Automation Craft

- [Kijiji Scraper: Listings, Cars, Rentals & Prices](https://apify.com/automation_craft/kijiji-scraper)
- [Kleinanzeigen Scraper & API: Ads, Prices, Places](https://apify.com/automation_craft/kleinanzeigen-scraper)
- [OfferUp Scraper: Local Listings, Prices, Sellers](https://apify.com/automation_craft/offerup-scraper)
- [Facebook Marketplace Scraper with Sold Tracker](https://apify.com/automation_craft/facebook-marketplace-scraper)

# Changelog

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

# Actor input Schema

## `keywords` (type: `array`):

Search words as you would type them on Leboncoin, for example velo electrique, appartement T3 or clio 4. Up to 100 characters each. One row per ad, whatever keyword found it.

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

A town (Paris, Lyon, Saint-Étienne), a town with its postal code (Lyon 69003), a postal code (33000), a department by name or number (Rhône, 69, 2A), a region (Bretagne, Rhône-Alpes, or a region of today such as Auvergne-Rhône-Alpes), or coordinates (48.8566, 2.3522). Towns and postal codes are looked up with Leboncoin's own place search; a town it answers with another spelling or another town is a free row naming what it found, and its searches are not read.

## `radiusKm` (type: `integer`):

Search around a town, a postal code or coordinates (1 to 200 km). Without it a town is searched over its own area and coordinates over 10 km. A department or region is always searched over its own area.

## `categories` (type: `array`):

Leboncoin categories by id (2), French name (Voitures, Ventes immobilières, Locations, Ameublement) or slug (voitures, ventes_immobilieres). A parent category (Immobilier, Véhicules) searches every category under it. Leave empty to search every category.

## `searchUrls` (type: `array`):

Links of Leboncoin search results pages, https://www.leboncoin.fr/recherche?... (paste the first page). Every parameter of the link is read (text, category, locations, price, sort, owner_type and every category filter); a parameter the Actor cannot read refuses that link with a free row. A link is a complete search on its own: the filter settings below apply only to keyword searches, except the row filters (excluded words, shippable, posted within).

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

Single ads: https://www.leboncoin.fr/ad/voitures/3286935748, the older .htm links, or the id alone. Each is read by id and billed as an Ad by URL. A removed, sold or expired ad, or an id that never existed, is never charged: the summary counts it, with a free status row while the run's free row budget lasts.

## `sellerIds` (type: `array`):

Read every active ad of a seller: the seller id shown on every row (sellerUserId, such as 7b9577d5-4a8d-4e60-8f0d-4444aeeb1021) or the seller's profile link https://www.leboncoin.fr/profile/<id>.

## `searchInTitleOnly` (type: `boolean`):

Match the keywords in ad titles only, as Leboncoin's own "search in title" option does.

## `excludeKeywords` (type: `array`):

Words that leave an ad out when its title holds them as a whole word (case does not matter, accents do). Checked on every ad of every search; ads left out are free and counted on the coverage row.

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

Ads at or above this price in euros. An ad without a price never passes a price filter.

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

Ads at or below this price in euros.

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

Private sellers or professionals only.

## `adType` (type: `string`):

Leboncoin's "Offres" or "Demandes".

## `urgentOnly` (type: `boolean`):

Ads marked urgent by their seller.

## `freeItemsOnly` (type: `boolean`):

Ads given away for free.

## `shippableOnly` (type: `boolean`):

Ads Leboncoin can ship. Checked on each ad (applies to every search).

## `withPhotosOnly` (type: `boolean`):

Ads with at least one photo. Checked on each ad (applies to every search).

## `postedWithinDays` (type: `integer`):

Ads first published within this many days of the run's start (applies to every search). A newest first search stops once it passes the window.

## `postedWithinHours` (type: `integer`):

Ads first published within this many hours of the run's start (Leboncoin's first publication date, not a repost date; applies to every search). Give this, the days or the date, not several.

## `postedAfter` (type: `string`):

Ads first published on or after this day (Paris time), written YYYY-MM-DD. Give this or the number of days, not both.

## `minDaysOnMarket` (type: `integer`):

Ads first published at least this many days before the run's start (every ad row carries daysOnMarket and longOnMarket, 90 days or more). Checked on each ad. Leboncoin orders ads by their last update and an ad renewed after about two months keeps its first publication date, so older ads are spread through every order: a large minimum leaves many ads out, and the oldest first order reaches about two months back first.

## `excludeAdIds` (type: `array`):

Ad links or ids skipped free on every search (up to 5,000), such as the listId values of an earlier run. Ad links in Ad links are read as given.

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

The order Leboncoin returns ads in. Newest first, oldest first and the price orders are walked with Leboncoin's own cursor to the end of a search, past the 3,500 ads its page numbers stop at; the relevance order is read page by page, up to 3,500 ads.

## `propertyTypes` (type: `array`):

Leboncoin's property type.

## `roomsMin` (type: `integer`):

Number of rooms (pièces), at least.

## `roomsMax` (type: `integer`):

Number of rooms, at most.

## `bedroomsMin` (type: `integer`):

Number of bedrooms, at least.

## `bedroomsMax` (type: `integer`):

Number of bedrooms, at most.

## `surfaceMin` (type: `integer`):

Living area in square metres, at least.

## `surfaceMax` (type: `integer`):

Living area in square metres, at most.

## `landSurfaceMin` (type: `integer`):

Land area in square metres, at least.

## `landSurfaceMax` (type: `integer`):

Land area in square metres, at most.

## `energyClasses` (type: `array`):

The energy performance class (DPE).

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

Furnished or unfurnished rentals.

## `carBrands` (type: `array`):

Makes as Leboncoin writes them, in capitals: RENAULT, PEUGEOT, CITROEN, VOLKSWAGEN, MERCEDES-BENZ. A make Leboncoin does not have finds nothing.

## `fuelTypes` (type: `array`):

Leboncoin's fuel types.

## `gearbox` (type: `array`):

Manual or automatic.

## `yearMin` (type: `integer`):

First registration year, at least.

## `yearMax` (type: `integer`):

First registration year, at most.

## `mileageMin` (type: `integer`):

Kilometres, at least.

## `mileageMax` (type: `integer`):

Kilometres, at most.

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

Any other Leboncoin filter by its own key: a list of values or {"min": n, "max": n}. Examples: {"floor_property": \["upper_floor"], "elevator": \["1"], "capacity": {"min": 6}, "bookable": \["1"], "condition": \["etatneuf"], "vehicle_type": \["4x4"]}. Keys and values are Leboncoin's (they appear in the attributes of every row); an unknown key or value finds nothing, and every row is checked against each filter (a row that does not carry the key is left out).

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

The most ad rows the run delivers (searches and links together). Default 100.

## `maxItemsPerSearch` (type: `integer`):

The most ad rows one search, search link or seller may deliver.

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

The most results pages read per search (35 to 100 ads each). Without it a search is read to its end or to the caps. A monitor reads 3 pages of 35 ads per search unless you set it.

## `includeAdDetails` (type: `boolean`):

Read each search row's own ad record: adds how many users saved the ad (favorites) and its newest state. Billed as Ad detail per row, only when read.

## `includeSellerProfiles` (type: `boolean`):

Add each seller's public profile: member since, reply rate and time, ratings, badges, number of ads; for professionals also the company name, SIREN, SIRET, address, shop description, opening hours, website, the shop's phone and the shop's Google rating as Leboncoin shows it. A private seller's name, picture, description and last activity only with Personal data on. Billed once per seller per run.

## `includePersonalData` (type: `boolean`):

Off (default): a private seller's shown name (sellerName) and profile picture are not delivered, their name is replaced with \[nom masqué] in their own title and description, phone numbers and e-mail addresses written into any text of their ad are replaced with \[numéro masqué] and \[e-mail masqué], their address level coordinates are rounded to about 1 km and the street view link is left out. On: all of these as Leboncoin shows them logged out, plus, with Seller profiles, the private seller's name, picture, profile description and last activity. A professional's row is never masked. Phone numbers that Leboncoin shows only to signed in users are never read. You are responsible for a lawful use of personal data, GDPR included.

## `skipSellerIds` (type: `array`):

Seller ids (sellerUserId) whose profile is not read again (needs Seller profiles on).

## `monitorName` (type: `string`):

A short name of your choice (letters, digits, spaces and . \_ , - : # ( ), up to 60 characters). One name belongs to one set of settings.

## `trackChanges` (type: `boolean`):

With a monitor: a known ad whose price changed is delivered again with its change (previous price, first seen price, price history, drop in percent, number of changes) as an Ad update, and when every search of a run was read to its end, each ad the monitor delivered that the run no longer met gets a removed row (sold, withdrawn, expired, or changed out of your searches), also an Ad update. Raise Maximum pages per search so each search is read to its end.

## `webhookUrl` (type: `string`):

An https address that receives the ads of each run as JSON (batches of 100, up to 1,000 a run). Free.

## `webhookSecret` (type: `string`):

Signs each webhook call: header x-signature-sha256 is the HMAC SHA-256 of the body with this secret.

## `telegramBotToken` (type: `string`):

Your own bot's token from BotFather: each run sends its new ads to the chat below (up to 30 messages a run). Free.

## `telegramChatId` (type: `string`):

The chat that receives the messages: your chat id (a number) or a channel name starting with @ where your bot can post.

## `failIfIncomplete` (type: `boolean`):

Mark the run as failed when a search or an ad link could not be read to its end (Leboncoin refused, a page failed, the work allowance ran out). Rows delivered stay delivered. Your own caps (maximum ads, pages) never count as incomplete.

## `requestsPerSecond` (type: `number`):

The pace of requests to Leboncoin (0.2 to 1, default 0.8). Slower is gentler; faster is not offered.

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

Apify residential proxies in France are used by default and included in the price. Leboncoin answers French residential addresses only, so other Apify groups or countries are refused; your own proxy links (http://user:password@host:port) can be given instead.

## Actor input object example

```json
{
  "keywords": [
    "velo"
  ],
  "locations": [
    "Paris"
  ],
  "searchInTitleOnly": false,
  "sellerType": "any",
  "adType": "offer",
  "urgentOnly": false,
  "freeItemsOnly": false,
  "shippableOnly": false,
  "withPhotosOnly": false,
  "sort": "newest",
  "maxItems": 20,
  "includeAdDetails": false,
  "includeSellerProfiles": false,
  "includePersonalData": false,
  "trackChanges": false,
  "failIfIncomplete": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}
```

# Actor output Schema

## `items` (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 = {
    "keywords": [
        "velo"
    ],
    "locations": [
        "Paris"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "FR"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation_craft/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 = {
    "keywords": ["velo"],
    "locations": ["Paris"],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "FR",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("automation_craft/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 '{
  "keywords": [
    "velo"
  ],
  "locations": [
    "Paris"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "FR"
  }
}' |
apify call automation_craft/leboncoin-scraper --silent --output-dataset

```

## MCP server setup

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