# Spitogatos Autocomplete API Documentation

<p><strong>Spitogatos Autocomplete API</strong> resolves a place name in Greek or Latin letters to area ids. Pass the <code>id</code> of a result as <code>area_ids</code> to the search, count and map routes. Each result has its name, full name, level in the area tree, parent area and coordinates. A query with no match returns an empty list. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/spitogatos-api/spitogatos_autocomplete](https://scrappa.co/docs/spitogatos-api/spitogatos_autocomplete)
- **API group:** Spitogatos API
- **Endpoint:** `GET https://scrappa.co/api/spitogatos/autocomplete`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search text, 2 to 100 characters. Example: Κολωνάκι. |
| `limit` | integer | No | Number of results, 1 to 25 (default 10). |
| `locale` | string | No | Language of area names: el (default) or en. |

## Example response

```json
{
    "data": {
        "query": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9",
        "results": [
            {
                "id": 6009,
                "name": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9 - \u039b\u03c5\u03ba\u03b1\u03b2\u03b7\u03c4\u03c4\u03cc\u03c2",
                "slug": "kolonaki-lykavittos",
                "level": 4,
                "full_name": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9 - \u039b\u03c5\u03ba\u03b1\u03b2\u03b7\u03c4\u03c4\u03cc\u03c2 (\u0391\u03b8\u03ae\u03bd\u03b1 - \u039a\u03ad\u03bd\u03c4\u03c1\u03bf)",
                "parent_id": 100,
                "coordinates": null,
                "parent_name": "\u0391\u03b8\u03ae\u03bd\u03b1 - \u039a\u03ad\u03bd\u03c4\u03c1\u03bf"
            },
            {
                "id": 2019,
                "name": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9",
                "slug": "kolonaki-kolonaki-lykavittos",
                "level": 5,
                "full_name": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9 (\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9 - \u039b\u03c5\u03ba\u03b1\u03b2\u03b7\u03c4\u03c4\u03cc\u03c2)",
                "parent_id": 6009,
                "coordinates": null,
                "parent_name": "\u039a\u03bf\u03bb\u03c9\u03bd\u03ac\u03ba\u03b9 - \u039b\u03c5\u03ba\u03b1\u03b2\u03b7\u03c4\u03c4\u03cc\u03c2"
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "autocomplete"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A required parameter or a range is invalid. This response is not billable. |
| 503 | Upstream Unavailable | Spitogatos could not be reached or returned data that does not match the request. This response is not billable and is retryable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
