Leboncoin APIleboncoin.fr ↗
Access leboncoin.fr listings via API. Search cars, real estate, jobs, and more with price filters, location codes, and seller profiles.
What is the Leboncoin API?
This API exposes 5 endpoints covering leboncoin.fr, France's largest classifieds platform, returning listing data across cars, real estate, electronics, and jobs. The search_listings endpoint accepts category IDs, price range filters, and department or region location codes to return paginated results including title, price, images, owner info, and listing attributes. Dedicated endpoints for car search and price analytics are also included.
curl -X GET 'https://api.parse.bot/scraper/e47ee25c-b3eb-449c-b65b-e512fd4cf897/search_listings?page=1&query=iphone&category=2&location=d_75&price_max=50000&price_min=100' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace leboncoin-fr-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Leboncoin marketplace SDK — search listings, drill into details, analyze prices."""
from parse_apis.leboncoin_scraper_api import Leboncoin, ListingNotFound
client = Leboncoin()
# Search general listings with price filter — limit= caps total items fetched.
for listing in client.listings.search(query="iphone", price_max=500, limit=3):
print(listing.title, listing.price, listing.location)
# Search cars by make, take the first result, then get full details.
car = client.listings.search_cars(make="PEUGEOT", model="208", limit=1).first()
if car:
detail = car.refresh()
print(detail.title, detail.price, detail.description[:80] if detail.description else "")
# Calculate average price for a car model in the cars category.
stats = client.prices.calculate(query="Porsche GT3", category="2")
print(stats.average, stats.min, stats.max, stats.count)
# Typed error handling for a missing listing.
try:
bad = client.listings.search(query="xyznonexistent999", location="d_75", limit=1).first()
if bad:
bad.refresh()
except ListingNotFound as exc:
print(f"Listing gone: {exc.url}")
print("exercised: listings.search / listings.search_cars / listing.refresh / prices.calculate")
Search for listings on leboncoin.fr with optional filters. Returns paginated results up to 100 pages. Location uses leboncoin codes: d_XX for departments (e.g., d_39 for Jura, d_75 for Paris), r_XX for regions (e.g., r_12 for Ile-de-France).
| Param | Type | Description |
|---|---|---|
| page | integer | Page number (1-100) |
| query | string | Search keyword (e.g., 'iphone', 'voiture') |
| category | string | Category ID (e.g., '2' for cars, '9' for real estate sales, '15' for electronics, '33' for jobs) |
| location | string | Location code: d_XX for department (e.g., d_39 for Jura, d_75 for Paris), r_XX for region (e.g., r_12 for Ile-de-France) |
| price_max | integer | Maximum price filter in euros |
| price_min | integer | Minimum price filter in euros |
{
"type": "object",
"fields": {
"page": "integer current page number",
"total": "integer total number of matching listings",
"results": "array of listing objects with id, title, price, url, date, category, location, images, owner, owner_type, attributes",
"max_pages": "integer maximum page number available",
"total_all": "integer total across all categories"
},
"sample": {
"data": {
"page": 1,
"total": 378045,
"results": [
{
"id": 3153786520,
"url": "https://www.leboncoin.fr/ad/telephones_objets_connectes/3153786520",
"date": "2026-05-15 17:55:26",
"owner": "DBC MARSEILLE",
"price": 170,
"title": "IPhone 12 Pro Max & iPhone 11 Pro Max avec garantie",
"images": [
"https://img.leboncoin.fr/api/v1/lbcpb1/images/29/79/2f/29792f8d772eaf523060f1329bd0a36cdfe661d5.jpg?rule=ad-image"
],
"category": "Téléphones & Objets connectés",
"location": "Marseille 13001",
"attributes": {
"condition": "Bon état",
"phone_brand": "Apple"
},
"owner_type": "pro"
}
],
"max_pages": 100,
"total_all": 378045
},
"status": "success"
}
}About the Leboncoin API
Search and Filter Listings
The search_listings endpoint returns paginated results (up to 100 pages) with fields including id, title, price, url, date, category, location, images, owner, owner_type, and attributes. You can narrow results using category (e.g., '2' for cars, '9' for real estate sales, '15' for electronics, '33' for jobs), price_min/price_max in euros, and location using leboncoin's own coding scheme: d_XX for departments (e.g., d_75 for Paris) and r_XX for regions (e.g., r_12 for Ile-de-France). The response also exposes total, max_pages, and total_all so you can page through result sets accurately.
Listing Details and Car Search
get_listing_detail accepts either a full listing URL or a numeric listing ID and returns the complete listing record: description, full images array, attributes object with listing-specific fields, seller owner name, location as city and postal code, and first publication date. The dedicated search_cars endpoint wraps car-category filtering with additional make and model parameters — pass uppercase make names like 'PEUGEOT' or 'BMW' alongside a model string to filter results without manually specifying the category.
Price Analytics and Seller Profiles
get_average_price computes average, min, max, and count of priced listings matching a keyword query, scoped to an optional category. Statistics are calculated from up to 35 listings from the first result page, so treat these as indicative market prices rather than exhaustive aggregations. get_seller_profile takes a user_id from listing detail responses and returns the seller's public name and an array of their active ads.
The Leboncoin API is a managed, monitored endpoint for leboncoin.fr — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when leboncoin.fr changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official leboncoin.fr API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Monitor used car prices for a specific make and model using
search_carswithmakeandmodelfilters - Track real estate listing volumes and price ranges in a French department using
search_listingswithcategory='9'and ad_XXlocation code - Build a price alert tool that compares a target price against the
averagereturned byget_average_pricefor a given query - Aggregate seller activity by fetching
get_seller_profilefor user IDs extracted from listing detail responses - Index new electronics listings by polling
search_listingswithcategory='15'and comparingdatefields - Estimate fair market value for second-hand goods using
min,max, andaveragefromget_average_price
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 100 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
One credit = one API call regardless of which marketplace API you call. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does leboncoin.fr have an official public developer API?+
What location codes does the `search_listings` endpoint use, and where do I find them?+
d_XX (e.g., d_75 for Paris, d_39 for Jura) and region codes follow r_XX (e.g., r_12 for Ile-de-France). These map directly to leboncoin's internal location taxonomy — use the two-digit French department number or region number after the prefix.How accurate is the data returned by `get_average_price`?+
average, min, max, and count. Because it samples only the first result page, it reflects the most recently listed or most relevant items rather than the full historical dataset. Use it as a directional pricing reference, not a statistical survey of all active listings.Does the API expose listing descriptions from `get_listing_detail`?+
get_listing_detail returns a description field along with attributes, images, price, location, owner, and publication date. The attributes object contains listing-specific fields that vary by category — for a car listing this typically includes mileage, fuel type, and year; for real estate it includes surface area and number of rooms.Does the API support searching for listings in categories beyond cars and real estate, such as services or rentals?+
search_listings endpoint accepts any valid leboncoin category ID as the category parameter, including categories like jobs ('33') and electronics ('15'). However, dedicated filtered endpoints only exist for cars via search_cars. There is no dedicated endpoint for real estate rentals, services, or other specific sub-categories with their own filter parameters. You can fork this API on Parse and revise it to add a specialized endpoint for any additional category.