Oikotie Autocomplete API turns text into Oikotie places: cities, districts, streets, regions, postcodes and countries. Finnish and Swedish names work. Each result has an id, a type, a name, coordinates when known and the parent place. The search block holds the exact location_id, location_type and location_name to pass to the search route. An empty list is a valid answer and is 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.
string
Required
Search text, 2 to 100 characters. Example: tampere.
coffee shops
Response Schema
Example response fields are illustrative; inspect the JSON before integrating.
Example response fields
Scan these fields before integrating.
data
meta
success
{
"data": {
"query": "tamp",
"results": [
{
"id": 386,
"name": "Tampere",
"type": "city",
"parent": {
"id": 7,
"name": "Pirkanmaa",
"type": "region"
},
"search": {
"location_id": 386,
"location_name": "Tampere",
"location_type": "city"
},
"coordinates": {
"latitude": 61.497856,
"longitude": 23.762255
}
},
{
"id": 14711153,
"name": "Ranta-Tampella",
"type": "district",
"parent": {
"id": 386,
"name": "Tampere",
"type": "city"
},
"search": {
"location_id": 14711153,
"location_name": "Ranta-Tampella",
"location_type": "district"
},
"coordinates": null
},
{
"id": 335222,
"name": "Tampella",
"type": "district",
"parent": {
"id": 386,
"name": "Tampere",
"type": "city"
},
"search": {
"location_id": 335222,
"location_name": "Tampella",
"location_type": "district"
},
"coordinates": {
"latitude": 61.504612,
"longitude": 23.761225
}
}
]
},
"meta": {
"billable": true,
"endpoint_family": "autocomplete"
},
"success": true
}
Errors
Handle these documented responses before retrying or showing customer-facing failures.
Validation Error
A required parameter or a value is invalid. This response is not billable.
{
"errors": {
"query": [
"The query field is required."
]
},
"message": "The request validation failed"
}Upstream Unavailable
Oikotie could not be reached or returned data that does not match the request. This response is not billable and is retryable.
{
"meta": {
"billable": false,
"retryable": true,
"endpoint_family": "autocomplete"
},
"error": {
"code": "UPSTREAM_UNAVAILABLE",
"message": "Oikotie 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.