Loft Brazil Autocomplete API matches a term against cities (the 1000 with the most listings) or, when city is sent, against that city's neighborhoods (the 100 with the most listings). Matches that start with the term come first, then the busiest places. Pass filter.city or filter.neighborhood to the search route as returned. A city with no neighborhoods answers 404 and is not billed.
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
Text to match, for example pin. Matching ignores accents and case.
electric vehicles
string
Optional
City value such as São Paulo, SP. When sent, the route matches that city's neighborhoods instead of cities.
example
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"term": "pin",
"type": "neighborhood",
"returned": 1,
"locations": [
{
"count": 14415,
"value": "Pinheiros, S\u00e3o Paulo, SP",
"filter": {
"neighborhood": "Pinheiros, S\u00e3o Paulo, SP"
}
}
]
},
"meta": {
"attempts": 0,
"billable": true,
"endpoint_family": "autocomplete"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Not Found
No neighborhoods exist for that city. This response is not billed.
{
"meta": {
"billable": false,
"retryable": false,
"endpoint_family": "autocomplete"
},
"error": {
"code": "not_found",
"message": "No neighborhoods exist for that city."
},
"success": false
}Rejected Request
A parameter is missing, unknown or out of range. This response is not billed.
{
"errors": {
"bedrooms": [
"The bedrooms field must be at least 1."
]
},
"message": "The request validation failed"
}Upstream Unavailable
Loft could not be reached or returned data that did not match the filters. Retry shortly. This response is not billed.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "autocomplete"
},
"error": {
"code": "upstream_unavailable",
"message": "Loft is temporarily unavailable. Please retry."
},
"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.