Skip to content
Scrappa Get API key
Oikotie API 1 credit/request

Oikotie Autocomplete API Documentation

GET https://scrappa.co/api/oikotie/autocomplete

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.

Oikotie Autocomplete API Documentation 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/oikotie/autocomplete
Auth header
x-api-key
Cost
1 credit/request
query = coffee shops
Response preview
200 OK
{
    "data": {
        "query": "tamp",
        "results": [
            {
                "id": 386,
                "name": "Tampere",
                "type": "city",
                "parent": {
                    "id": 7,
                    "name": "Pirkanmaa",
                    "type": "region"
                },
                "search": {
...

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.

query string Required

Search text, 2 to 100 characters. Example: tampere.

Example value 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
JSON Response
200 OK
{
    "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.

422

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"
}
503

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.