Piloterr

Leboncoin Search

Usar en masa con DataflowEjecuta este endpoint sobre un archivo o una lista, una vez o con una programación.

GET
/v2/leboncoin/search

Scrape Leboncoin search results or category pages by URL, returning paginated listings with price, location, and attributes. Returns structured JSON. return_page_source is deprecated and returns 400.

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

query*string

Full Leboncoin search or category URL. Both keyword searches and category browse URLs are supported.

Supported URL types:

  • Category page: https://www.leboncoin.fr/c/offres_d_emploi?locations=Paris_75015__48.84105_2.29926_2747
  • Keyword search: https://www.leboncoin.fr/recherche?text=iphone+15&category=38
  • Map view: https://www.leboncoin.fr/carte/...

Examples:

https://www.leboncoin.fr/c/offres_d_emploi?locations=Paris_75015__48.84105_2.29926_2747
https://www.leboncoin.fr/recherche?text=macbook&category=15

Note: Pagination can be added by appending &page=2 to the URL.

return_page_source?booleanDeprecated

Deprecated. Sending true returns 400.

Defaultfalse
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
pagination?
Example Request
curl -X GET 'https://api.piloterr.com/v2/leboncoin/search?query=string'
Example Response
{
  "ads": [
    {
      "url": "https://www.leboncoin.fr/voitures/2718234567.htm",
      "body": "Renault Megane IV Estate diesel, CT valable 2 ans, révision à jour, non fumeur.",
      "owner": {
        "name": "Alex Martin",
        "type": "private"
      },
      "price": [
        9900
      ],
      "images": {
        "nb_images": 8,
        "small_url": "https://img.leboncoin.fr/api/cdn/thumbs/xyz12345.jpg"
      },
      "status": "active",
      "list_id": 2718234567,
      "subject": "Renault Megane IV Estate 1.5 DCI 110 Business",
      "location": {
        "city": "Versailles",
        "zipcode": "78000",
        "region_name": "Île-de-France",
        "department_name": "Yvelines"
      },
      "attributes": [
        {
          "key": "brand",
          "value": "renault",
          "value_label": "Renault"
        },
        {
          "key": "model",
          "value": "Megane IV Estate",
          "value_label": "Megane IV Estate"
        },
        {
          "key": "regdate",
          "value": "2018",
          "value_label": "2018"
        },
        {
          "key": "mileage",
          "value": "89000",
          "value_label": "89 000 km"
        },
        {
          "key": "fuel",
          "value": "diesel",
          "value_label": "Diesel"
        },
        {
          "key": "gearbox",
          "value": "manual",
          "value_label": "Manuelle"
        },
        {
          "key": "critair",
          "value": "2",
          "value_label": "Crit'Air 2"
        }
      ],
      "category_id": "2",
      "category_name": "Voitures",
      "creation_date": "2024-09-18T09:30:00+02:00"
    }
  ],
  "total": 12481,
  "pagination": {
    "page": 1,
    "total_pages": 100
  }
}