# imot.bg Autocomplete API Documentation

<p><strong>imot.bg Autocomplete API</strong> resolves a place name to a ready <code>location_id</code> for the search route. Type in Bulgarian or Latin letters. Results are cities, regions, neighbourhoods and villages with their number of listings. A query with no match returns an empty list. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/imot-bg-api/imot_bg_autocomplete](https://scrappa.co/docs/imot-bg-api/imot_bg_autocomplete)
- **API group:** imot.bg API
- **Endpoint:** `GET https://scrappa.co/api/imot-bg/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: Люлин or sofia. |
| `limit` | integer | No | Number of results, 1 to 25 (default 10). |

## Example response

```json
{
    "data": {
        "query": "\u041b\u044e\u043b\u0438\u043d",
        "results": [
            {
                "name": "\u041b\u044e\u043b\u0438\u043d - \u0446\u0435\u043d\u0442\u044a\u0440",
                "type": "neighbourhood",
                "label": "\u041b\u044e\u043b\u0438\u043d - \u0446\u0435\u043d\u0442\u044a\u0440, \u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f",
                "parent": "\u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f",
                "location_id": "\u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f~\u041b\u044e\u043b\u0438\u043d - \u0446\u0435\u043d\u0442\u044a\u0440",
                "listing_count": 161
            },
            {
                "name": "\u041b\u044e\u043b\u0438\u043d 1",
                "type": "neighbourhood",
                "label": "\u041b\u044e\u043b\u0438\u043d 1, \u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f",
                "parent": "\u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f",
                "location_id": "\u0433\u0440\u0430\u0434 \u0421\u043e\u0444\u0438\u044f~\u041b\u044e\u043b\u0438\u043d 1",
                "listing_count": 141
            }
        ]
    },
    "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 | imot.bg 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)
