Skip to the content
EnrichedNowDocs

    Type to search every page.

    Menu

    Scraper APILeboncoin

    leboncoin.search

    Listings on Leboncoin for a search: title, price, place, date, category, details and photo, a page at a time.

    Id
    leboncoin.search
    Version
    1
    Billed per
    request — 1 unit for a charged run
    Runs
    within one request

    Start it with POST /v1/scrapers/leboncoin.search/runs. How runs work is in Running a scraper; what a run costs is in Usage and units.

    Inputs

    The fields of input. A field that is not listed here is refused.

    Inputs of leboncoin.search
    FieldTypeDescription
    queryrequiredstringWords to search for, e.g. vélo or canapé cuir.Limit: at least 1 characters, at most 120 characters.
    pageintegerThe page of results, from 1 to 10.Limit: 1 to 10. Default: 1.

    Record fields

    Every record of a run has these fields. A value that is not known is null — never an empty string and never 0.

    Record fields of leboncoin.search
    FieldTypeNotes
    idstringLeboncoin's id of the listing, the digits at the end of its address.
    titlestringThe listing's title.
    urlstringThe listing's page on leboncoin.fr.
    categorystring or nullThe category it is listed in, e.g. Vélos or Voitures.
    category_idstring or nullLeboncoin's number of that category.
    pricenumber or nullThe price asked, in euros. Null where the listing states none.
    posted_atstring (date-time) or nullWhen the listing was first published, with Paris's offset.
    citystring or nullThe town the listing is in.
    zipcodestring or nullIts postcode.
    departmentstring or nullIts département, e.g. Gironde.
    regionstring or nullIts region, e.g. Aquitaine.
    latitudenumber or nullThe latitude of the place Leboncoin shows on the listing's map (the town, or the area the seller chose).
    longitudenumber or nullIts longitude.
    seller_typestring or nullprivate for a private person, pro for a business.
    shop_namestring or nullThe business's name, for a pro seller. Always null for a private seller: a person's name is not returned.
    imagestring or nullThe listing's first photo.
    image_countintegerHow many photos the listing has.
    shippableboolean or nullTrue when the seller offers to send the item; null where the listing does not say.
    attributesarray of objectThe details the listing shows with a label, in the page's order: brand, model, mileage, size, condition, rooms, surface, …
    key (in attributes[])string or nullLeboncoin's own name for the detail, e.g. mileage or condition.
    name (in attributes[])stringThe detail's label as the page shows it, e.g. Kilométrage or État.
    value (in attributes[])stringIts value as the page shows it, e.g. 128300 km or Bon état.
    fetched_atstring (date-time)When the page was read, in UTC.
    positionintegerThe listing's place on the page, from 1.
    promotedbooleanTrue for a listing the page shows as promoted ("à la une"), which can be outside the search's category.

    Example request

    # Start a run and wait up to 60 seconds for it to finish
    curl -X POST "https://api.enrichednow.com/v1/scrapers/leboncoin.search/runs?wait=60" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"input":{"query":"velo"}}'
    
    # Read its records, with the id the first call answered
    curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
      -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
    from enrichednow import EnrichedNow
    
    client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY
    
    # Start a run, wait for it to end, and get its records
    result = client.scrape("leboncoin.search", {"query": "velo"})
    print(result.run.id, result.run.status, result.run.record_count)
    
    # Read its records: pages are fetched as you go
    for record in result.records:
        print(record)

    Install it with pip install enrichednow, then save as run.py and run python3 run.py

    import EnrichedNow from "enrichednow";
    
    const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
    
    // Start a run, wait for it to end, and get its records
    const { run, records } = await client.scrape("leboncoin.search", { query: "velo" });
    console.log(run.id, run.status, run.record_count);
    
    // Read its records: pages are fetched as you go
    for await (const record of records) console.log(record);

    Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

    package main
    
    import (
    	"context"
    	"fmt"
    	"log"
    	"time"
    
    	enrichednow "github.com/enrichednow/enrichednow-go"
    )
    
    func main() {
    	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
    	if err != nil {
    		log.Fatal(err)
    	}
    	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
    	defer cancel()
    
    	// Start a run, wait for it to end, and get its records
    	run, records, err := client.Scrape(ctx, "leboncoin.search", map[string]any{"query": "velo"})
    	if err != nil {
    		log.Fatal(err)
    	}
    	fmt.Println(run.ID, run.Status, run.RecordCount)
    
    	// Read its records: pages are fetched as you go
    	for records.Next() {
    		fmt.Println(string(records.Current()))
    	}
    	if err := records.Err(); err != nil {
    		log.Fatal(err)
    	}
    }

    Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

    import com.enrichednow.EnrichedNowClient;
    import com.enrichednow.ScrapeResult;
    import java.util.Map;
    
    public class Run {
        public static void main(String[] args) {
            EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
    
            // Start a run, wait for it to end, and get its records
            ScrapeResult result = client.scrape("leboncoin.search", Map.of("query", "velo"));
            System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
    
            // Read its records: pages are fetched as you go
            for (Map<String, Object> record : result.records()) {
                System.out.println(record);
            }
        }
    }

    Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

    enrichednow run leboncoin.search --input query=velo

    Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

    It starts a run with this scraper’s example input, waits for it to finish and reads its records a page at a time. The key is read from ENRICHEDNOW_API_KEY.

    The body on its own:

    JSON
    {
      "input": {
        "query": "velo"
      }
    }

    Example response

    The run, once it has ended. A run that has not ended within wait comes back with 202 and the status queued or running.

    JSON
    {
      "id": "run_841742f37553189ff9c27ba1",
      "scraper_id": "leboncoin.search",
      "scraper_version": 1,
      "status": "ok",
      "reason": null,
      "input": {
        "query": "velo"
      },
      "record_count": 1,
      "units": 1,
      "units_per_request": 1,
      "units_per_record": null,
      "units_per_page": null,
      "diagnostics": {
        "requests": 1,
        "bytes": 259214,
        "wall_ms": 885,
        "facts": {}
      },
      "created_at": "2026-11-16T22:37:50.170950Z",
      "started_at": "2026-11-16T22:37:50.178331Z",
      "finished_at": "2026-11-16T22:37:51.066313Z"
    }

    Its records, from GET /v1/runs/{id}/records. The record is a real one: this scraper's own parser read it from a page recorded from the site.

    JSON
    {
      "records": [
        {
          "id": "3297659500",
          "title": "Vélo",
          "url": "https://www.leboncoin.fr/ad/sport_plein_air/3297659500",
          "category": "Sport & Plein air",
          "category_id": "29",
          "price": 55,
          "posted_at": "2026-10-29T15:27:56+01:00",
          "city": "Rosheim",
          "zipcode": "67560",
          "department": "Bas-Rhin",
          "region": "Alsace",
          "latitude": 48.496,
          "longitude": 7.468,
          "seller_type": "private",
          "shop_name": null,
          "image": "https://img.leboncoin.fr/api/v1/lbcpb1/images/e0/bb/fd/e0bbfd4405a5e2c24a07ed026b029e2c73afe16c.jpg?rule=ad-image",
          "image_count": 9,
          "shippable": false,
          "attributes": [
            {
              "key": "condition",
              "name": "État",
              "value": "Bon état"
            },
            {
              "key": "sports_hobbies_universe",
              "name": "Univers",
              "value": "Sports d’aventure et plein air"
            }
          ],
          "fetched_at": "2026-11-19T18:10:59.750669Z",
          "position": 3,
          "promoted": false
        }
      ],
      "next_cursor": null
    }

    What was done to the record for this page, and nothing else — the API returns every value whole. A text that was cut ends with … [truncated].

    • Shortened: attributes: 5 items, the first 2 shown.

    A run does not always end ok. Results and statuses lists every status and the reasons every scraper shares; the reasons of the Leboncoin scrapers are in their own section there.