Piloterr

Leboncoin Search API

POST
/v2/leboncoin/search_api

Search Leboncoin listings via structured POST API with advanced filters for category, location, price range, seller type, and sorting.

Credit cost: 1 credit per call

Autorización

ApiKeyAuth
headerx-api-key<token>

Your API key. Include it in the x-api-key header for every request.

Parámetros de consulta

fields?string

Comma-separated list of response fields to return, with dot notation for nested fields (e.g. name,location.city).

is_async?boolean

Run the request as a background job: the API answers 202 with a job_id to poll on GET /v1/jobs/{id}.

Defaultfalse
soft_fail?boolean

Return HTTP 200 even when the request fails; the error is in the error field of the body.

Defaultfalse

Cuerpo de la respuesta

Successful response

application/json
  1. response
ads?array<>
total?integer
max_pages?integer
total_all?integer
total_pro?integer
total_private?integer
Example Request
curl -X POST 'https://api.piloterr.com/v2/leboncoin/search_api'
Example Response
{
  "ads": [
    {
      "url": "https://www.leboncoin.fr/voitures/2712345678.htm",
      "body": "Bonjour, je vends ma Golf 7 en parfait état, CT valable, aucun défaut.",
      "owner": {
        "name": "Alex Martin",
        "type": "private",
        "siren": null
      },
      "price": [
        11500
      ],
      "images": {
        "urls": [
          "https://img.leboncoin.fr/api/cdn/thumbs/abcdef1.jpg"
        ],
        "nb_images": 6,
        "small_url": "https://img.leboncoin.fr/api/cdn/thumbs/abcdef1.jpg",
        "thumb_url": "https://img.leboncoin.fr/api/cdn/thumbs/abcdef1_thumb.jpg"
      },
      "status": "active",
      "ad_type": "classified",
      "list_id": 2712345678,
      "subject": "Volkswagen Golf VII 1.6 TDI 110 Confortline Business",
      "currency": "EUR",
      "location": {
        "lat": 45.75,
        "lng": 4.85,
        "city": "Lyon",
        "zipcode": "69003",
        "region_id": "22",
        "country_id": "FR",
        "region_name": "Auvergne-Rhône-Alpes",
        "department_id": "69",
        "department_name": "Rhône"
      },
      "attributes": [
        {
          "key": "regdate",
          "value": "2017",
          "value_label": "2017"
        },
        {
          "key": "mileage",
          "value": "112000",
          "value_label": "112 000 km"
        },
        {
          "key": "fuel",
          "value": "diesel",
          "value_label": "Diesel"
        },
        {
          "key": "gearbox",
          "value": "manual",
          "value_label": "Manuelle"
        },
        {
          "key": "brand",
          "value": "volkswagen",
          "value_label": "Volkswagen"
        },
        {
          "key": "model",
          "value": "Golf VII",
          "value_label": "Golf VII"
        },
        {
          "key": "critair",
          "value": "2",
          "value_label": "Crit'Air 2"
        }
      ],
      "brand_name": null,
      "category_id": "2",
      "price_cents": [
        1150000
      ],
      "category_name": "Voitures",
      "creation_date": "2024-09-10T11:00:00+02:00",
      "expiration_date": "2024-10-10T11:00:00+02:00"
    }
  ],
  "total": 4821,
  "max_pages": 100,
  "total_all": 4821,
  "total_pro": 1203,
  "total_private": 3618
}