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

# Search Locations

> Autocomplete a Leboncoin location by name, resolving it to region, department, and coordinates.

Resolve a free-text place name (city, department, or region) into structured location suggestions you can use with the [`city`](https://docs.scrapebadger.com/api-reference/endpoint/leboncoin/search-ads), `zipcode`, `region_id`, or `department_id` search parameters.

## Query Parameters

**q** `string` *required*

The location name to autocomplete (e.g. `Lyon`).

## Response

**query** `string`

The location query that was executed.

**suggestions** `array`

Array of matching location suggestions.

**LocationSuggestion object**

**label** `string`

Display label for the suggestion (e.g. `Lyon 69000`).

**city** `string`

City name (nullable).

**zipcode** `string`

Postal code (nullable).

**region\_id** `string`

French region id (nullable).

**region\_name** `string`

Region name (nullable).

**department\_id** `string`

Department id (nullable).

**department\_name** `string`

Department name (nullable).

**lat** `number`

Latitude (nullable).

**lng** `number`

Longitude (nullable).

**type** `string`

Suggestion type: `city`, `department`, or `region`.

### Example Response

```json theme={null}
{
  "query": "Lyon",
  "suggestions": [
    {
      "label": "Lyon (69000)",
      "city": "Lyon",
      "zipcode": "69000",
      "region_id": "20",
      "region_name": "Auvergne-Rhône-Alpes",
      "department_id": "69",
      "department_name": "Rhône",
      "lat": 45.7578,
      "lng": 4.832,
      "type": "city"
    },
    {
      "label": "Rhône (69)",
      "region_id": "20",
      "region_name": "Auvergne-Rhône-Alpes",
      "department_id": "69",
      "department_name": "Rhône",
      "type": "department"
    }
  ]
}
```

> [!NOTE]
>
> Each location-search request costs **3 credits**. Failed requests are not charged.


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