# Leboncoin — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search and retrieve detailed listings from Leboncoin across cars, real estate, jobs, and other categories with advanced filtering options. Access seller profiles, pricing analytics, and comprehensive listing details to find exactly what you're looking for on France's leading classifieds platform.

**Category:** Marketplaces | **Website:** [leboncoin.fr/](https://leboncoin.fr/) | **Docs:** [parse.bot/marketplace/2e838c0f-8303-449d-882c-e7d16a48f29d/leboncoin-fr-api](https://parse.bot/marketplace/2e838c0f-8303-449d-882c-e7d16a48f29d/leboncoin-fr-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_average_price

Calculate average, minimum, and maximum prices for listings matching a search query within a category. Computes statistics from the first page of results (up to 35 listings).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category ID to search within (e.g., '2' for cars, '9' for real estate sales, '15' for electronics) |
| `query` | string | Yes | Search keywords (e.g., 'Porsche GT3', 'iPhone 13', 'vélo') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/get_average_price \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","query":"<string>"}'
```

### get_listing_detail

Get full details of a listing including description, images, attributes, and seller info.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `url` | string | Yes | Full listing URL (e.g., https://www.leboncoin.fr/ad/voitures/3192824845) or numeric listing ID |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/get_listing_detail \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"<string>"}'
```

### get_seller_profile

Get seller public profile.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `user_id` | string | Yes | User ID from listing details |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/get_seller_profile \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id":"<string>"}'
```

### search_cars

Search for car listings on leboncoin.fr with optional make and model filters. Automatically filters to the cars category. When both make and model are specified, the model filter uses MAKE_MODEL format internally.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `make` | string | No | Car make filter in uppercase (e.g., 'PEUGEOT', 'RENAULT', 'BMW') |
| `model` | string | No | Car model filter (e.g., '208', 'Clio', '320'). Requires make to be specified for correct filtering. |
| `page` | integer | No | Page number (1-100) |
| `query` | string | No | Search keyword (e.g., 'peugeot 208', 'berline') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/search_cars \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"make":"<string>","model":"<string>","page":"<integer>","query":"<string>"}'
```

### search_listings

Search for listings on leboncoin.fr with optional filters. Returns paginated results up to 100 pages. Location uses leboncoin codes: d_XX for departments (e.g., d_39 for Jura, d_75 for Paris), r_XX for regions (e.g., r_12 for Ile-de-France).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category ID (e.g., '2' for cars, '9' for real estate sales, '15' for electronics, '33' for jobs) |
| `location` | string | No | Location code: d_XX for department (e.g., d_39 for Jura, d_75 for Paris), r_XX for region (e.g., r_12 for Ile-de-France) |
| `page` | integer | No | Page number (1-100) |
| `price_max` | integer | No | Maximum price filter in euros |
| `price_min` | integer | No | Minimum price filter in euros |
| `query` | string | No | Search keyword (e.g., 'iphone', 'voiture') |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-leboncoin-fr-api-2e838c0f/search_listings \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","location":"<string>","page":"<integer>","price_max":"<integer>","price_min":"<integer>","query":"<string>"}'
```
