PAP Autocomplete API turns a place name into the numeric location id that the search endpoint needs. It finds regions, departments, cities and postal codes in France. Each result has the id, the full label such as Courbevoie (92400), the name and the code in brackets. Pass the id as location_id and the label as location_name to the search endpoint.
Run this endpoint
Endpoint
Parameters
Start with the required fields, then add optional filters only when your use case needs them.
Runnable path
1 required parameter needed before sending a request.
1 optional filter available.
string
Required
Place name or postal code, 2 to 100 characters. Example: lyon.
coffee shops
integer
Optional
Number of results, 1 to 25, default 10.
10
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"items": [
{
"id": 43590,
"code": "69",
"name": "Lyon",
"label": "Lyon (69)"
}
],
"query": "lyon"
},
"meta": {
"billable": true,
"endpoint_family": "autocomplete"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A parameter is missing or outside its allowed values. This response is not billable.
{
"errors": {
"location_id": [
"The location id field is required."
]
},
"message": "The request validation failed"
}Upstream Unavailable
PAP could not be reached, or the page could not be confirmed as the requested one. Retry shortly. This response is not billable.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "autocomplete"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "PAP could not be reached. Please retry shortly."
},
"success": false
}Generate Code with AI
Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.
Try It Live
Test this endpoint in our interactive playground with real data.