> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapeunblocker.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrape Leboncoin search

> Searches Leboncoin (France) for `query` and returns the ads as JSON: `id`, `title`, `price` and `currency`, `location` (city + postcode), `category`, publication `date`, `image`, listing `url`, `sellerType` (pro/private) and the ad's `attributes`. Narrow with `category`, `location` and `min_price`/`max_price`, order with `sort`, and collect up to `max_results` across pages. Paid 'a la une' placements (`sponsored: true`) are left out unless `include_sponsored=true`.



## OpenAPI

````yaml /api-reference/openapi.json post /marketplace/leboncoin-search
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /marketplace/leboncoin-search:
    post:
      tags:
        - Plugins
      summary: Scrape Leboncoin search
      description: >-
        Searches Leboncoin (France) for `query` and returns the ads as JSON:
        `id`, `title`, `price` and `currency`, `location` (city + postcode),
        `category`, publication `date`, `image`, listing `url`, `sellerType`
        (pro/private) and the ad's `attributes`. Narrow with `category`,
        `location` and `min_price`/`max_price`, order with `sort`, and collect
        up to `max_results` across pages. Paid 'a la une' placements
        (`sponsored: true`) are left out unless `include_sponsored=true`.
      operationId: leboncoin_search_marketplace_leboncoin_search_post
      parameters:
        - name: query
          in: query
          required: true
          schema:
            type: string
            description: What to search, e.g. 'velo electrique' or 'iphone 13'.
            title: Query
          description: What to search, e.g. 'velo electrique' or 'iphone 13'.
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Category: vehicles, cars, motorcycles, vans, car_parts,
              real_estate, real_estate_sale, rentals, flatshare,
              holiday_rentals, commercial_property, electronics, computers,
              photo_audio_video, phones, consoles, video_games,
              computer_accessories, home_garden, furniture, appliances, diy,
              decoration, garden, fashion, clothing, shoes, bags_accessories,
              watches_jewelry, baby_equipment, leisure, books, sports, bikes,
              toys, music_instruments, collectibles, antiques, animals, jobs,
              job_offers, or a numeric Leboncoin category id.
            title: Category
          description: >-
            Category: vehicles, cars, motorcycles, vans, car_parts, real_estate,
            real_estate_sale, rentals, flatshare, holiday_rentals,
            commercial_property, electronics, computers, photo_audio_video,
            phones, consoles, video_games, computer_accessories, home_garden,
            furniture, appliances, diy, decoration, garden, fashion, clothing,
            shoes, bags_accessories, watches_jewelry, baby_equipment, leisure,
            books, sports, bikes, toys, music_instruments, collectibles,
            antiques, animals, jobs, job_offers, or a numeric Leboncoin category
            id.
        - name: location
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Where to search: a city ('Bordeaux'), a city with postcode
              ('Toulouse 31000'), a department code ('75') or a region
              ('Ile-de-France').
            title: Location
          description: >-
            Where to search: a city ('Bordeaux'), a city with postcode
            ('Toulouse 31000'), a department code ('75') or a region
            ('Ile-de-France').
        - name: min_price
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: Lowest price to include (EUR).
            title: Min Price
          description: Lowest price to include (EUR).
        - name: max_price
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: Highest price to include (EUR).
            title: Max Price
          description: Highest price to include (EUR).
        - name: sort
          in: query
          required: false
          schema:
            type: string
            description: 'Ordering: relevance, newest, price_low, price_high.'
            default: relevance
            title: Sort
          description: 'Ordering: relevance, newest, price_low, price_high.'
        - name: max_results
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            description: How many listings to collect across pages.
            default: 35
            title: Max Results
          description: How many listings to collect across pages.
        - name: page
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: 1-based page to start from (35 per page).
            default: 1
            title: Page
          description: 1-based page to start from (35 per page).
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Exit-IP country (ISO-2). Optional.
            title: Proxy Country
          description: Exit-IP country (ISO-2). Optional.
        - name: include_sponsored
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              Also return Leboncoin's paid 'a la une' placements (`sponsored:
              true`). Off by default: they ignore the query, category and sort.
            default: false
            title: Include Sponsored
          description: >-
            Also return Leboncoin's paid 'a la une' placements (`sponsored:
            true`). Off by default: they ignore the query, category and sort.
      responses:
        '200':
          description: JSON with a `listings` array plus `totalResults`.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: Blocked by Leboncoin or no results page returned.
        '504':
          description: Fetch timed out.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.