Piloterr

Leboncoin Search

GET
/v2/leboncoin/search

Scrape Leboncoin search results or category pages by URL, returning paginated listings with price, location, and attributes. Returns structured JSON by default, or raw HTML on demand.

Credit cost: 1 credit per call

Authentification

ApiKeyAuth
x-api-key<token>

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

In: header

Paramètres de requête

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?boolean

Controls the response format.

  • false (default): returns a structured JSON object with parsed search results, including the list of ads, totals, and pagination.
  • true: returns the raw HTML source of the search results page as a string. Useful for advanced extraction or debugging.
Default"false"

Corps de la réponse

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v2/leboncoin/search?query=string"
{  "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": "Sophie",        "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  }}
{  "error": "Bad Request"}
{  "error": "Invalid API Key"}
{  "error": "Payment required"}
{  "error": "Rate limit exceeded for the API key: quota monthly"}
{  "error": "Internal Error"}