Autocomplete
Autocomplete locations
Auto complete the location search
Query Parameters
apiToken?string | null
Header Parameters
x-api-token?string | null
querystring
Beginning of the location
Example
"londo"limit?integer
Number of locations to return. Default is 5 if not specified, maximum is 15.
Default
5Example
5Range
1 <= value <= 15Response Body
curl -X POST "https://api.ocean.io/v2/autocomplete/locations?apiToken=string" \
-H "x-api-token: string" \
-H "Content-Type: application/json" \
-d '{
"query": "londo"
}'{
"locations": [
{
"countryCode": "us",
"filterCode": "us-CA",
"name": "California",
"parentCode": "us",
"parentName": "United States",
"type": "2-region"
}
]
}{
"detail": "Conflicting API tokens provided in query parameters and headers"
}{
"detail": "Insufficient credits"
}{
"detail": "API token should be provided in headers or query parameters"
}Empty
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}