Get locations typeahead suggestions scoped by country code (v1)
https://api.casafari.com/api/v1/references/locations/typeaheadOn the existing API at https://api.casafari.com (contract clients): send Authorization: Bearer $CASAFARI_TOKEN; see how to get a token. New users: the platform's REST API, platform API keys.
Over MCP: no tool does this. MCP and REST compared.
Description
Returns location typeahead suggestions within the given country (ES or PT).
Request body
Content type application/json. Optional. Type: object.
country_codesstring[]requiredES PTnamestringrequiredsizeintegerlangstringen pt es deExample request
Placeholders only: replace the token and the values with your own.
curl -X POST "https://api.casafari.com/api/v1/references/locations/typeahead" \
-H "Authorization: Bearer $CASAFARI_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"country_codes": [
"PT"
],
"name": "lisboa",
"lang": "en",
"size": 30
}'Responses
200 OK
Type: object.
Show the response shape (8 fields)
typeaheadobject[]required5 properties
location_idintegerrequirednamestringrequiredmatched_namestringrequiredadministrative_levelstringrequiredbreadcrumbsobject[]required2 properties
location_idintegerrequirednamestringrequiredExample from the API description
{
"typeahead": [
{
"location_id": 1296,
"name": "Lisboa",
"matched_name": "Lisboa",
"administrative_level": "Distrito",
"breadcrumbs": [
{
"location_id": 499,
"name": "Portugal"
},
{
"location_id": 1296,
"name": "Lisboa"
}
]
}
]
}401 Unauthorized
Type: object.
Show the response shape (1 fields)
detailstring403 Forbidden
Type: object.
Show the response shape (1 fields)
detailstring