# Leboncoin Ad ## Overview | Property | Value | |----------|-------| | **Status** | active | | **Method** | `GET` | | **Endpoint** | `/v2/leboncoin/ad` | | **Base URL** | `https://api.piloterr.com` | | **Credit Cost** | 1 credit per call | | **Documentation** | https://www.piloterr.com/library/leboncoin-ad | ## Description Extract full details from a Leboncoin ad including price, location, attributes, seller info, and images. Returns structured JSON by default, or raw HTML on demand. ## Authentication - **Key Name:** `x-api-key` - **Location:** HTTP Header - **Get an API key:** https://app.piloterr.com/register ## Example Request ```bash curl --location --request GET 'https://api.piloterr.com/v2/leboncoin/ad' \ --header 'Content-Type: application/json' \ --header 'x-api-key: YOUR_API_KEY' ``` ## Example Response ### Lookup car listing on Leboncoin ```json { "url": "https://www.leboncoin.fr/voitures/2715494476.htm", "body": "Renault Clio IV 1.5 DCI 90. Carnet d'entretien complet, CT OK, première main.", "owner": { "name": "Jean-Marc", "type": "private", "siren": null, "user_id": "abc123456" }, "price": [ 8500 ], "images": { "urls": [ "https://img.leboncoin.fr/api/cdn/thumbs/abcdef1234567890.jpg" ] }, "status": "active", "list_id": 2715494476, "subject": "Renault Clio IV 1.5 DCI 90 Energy SL Rip Curl", "category": { "id": "2", "label": "Voitures" }, "location": { "lat": 44.8378, "lng": -0.5792, "city": "Bordeaux", "zipcode": "33000", "region_id": "14", "region_name": "Nouvelle-Aquitaine", "department_id": "33", "department_name": "Gironde" }, "attributes": [ { "key": "regdate", "value": "2015", "value_label": "2015" }, { "key": "mileage", "value": "95000", "value_label": "95 000 km" }, { "key": "fuel", "value": "diesel", "value_label": "Diesel" }, { "key": "gearbox", "value": "manual", "value_label": "Manuelle" }, { "key": "horsepower", "value": "8", "value_label": "8 CV" }, { "key": "brand", "value": "renault", "value_label": "Renault" }, { "key": "model", "value": "Clio IV", "value_label": "Clio IV" }, { "key": "vehicle_damage", "value": "no_damage", "value_label": "Non endommagé" }, { "key": "seats", "value": "5", "value_label": "5 places" }, { "key": "doors", "value": "5", "value_label": "5 portes" }, { "key": "critair", "value": "2", "value_label": "Crit'Air 2" }, { "key": "color", "value": "silver", "value_label": "Gris" }, { "key": "vehicle_type", "value": "berline", "value_label": "Berline" } ], "price_cents": [ 850000 ], "creation_date": "2024-09-15T14:22:00+02:00", "expiration_date": "2024-10-15T14:22:00+02:00" } ``` ## Documentation ## Overview Extract complete data from any active Leboncoin ad. Accepts both a numeric ad ID and a full Leboncoin URL, and returns structured JSON by default. Switch to raw HTML via `return_page_source=true`. ## Quickstart ``` GET https://api.piloterr.com/v2/leboncoin/ad?query=https://www.leboncoin.fr/ad/equipement_auto/3012186547 ``` ## Parameters | Parameter | Type | Required | Default | Description | |---|---|---|---|---| | `query` | string | yes | - | Ad ID or full Leboncoin URL | | `return_page_source` | boolean | no | `false` | `false` = parsed JSON, `true` = raw HTML | ## Status codes - `200` Ad found - `404` Ad does not exist or has been removed (applies to both JSON and HTML modes) - `400` Invalid input ## Main use cases - Benchmark used vehicle prices from Leboncoin - Monitor classifieds categories for pricing trends - Enrich CRM with seller contact details - Aggregate classifieds data for market intelligence