# imoti.net Location Autocomplete API Documentation

Scrappa's `GET /api/imoti-net/locations` finds the location ids that the search accepts in `location` and the agency directory accepts in `city_id`, by the start of a name.

## What you get

Each suggestion has an `id`, the Bulgarian `name`, the same name in Latin letters (`name_latin`), `is_region` (`true` for a region such as `София област`) and the `slug` when it is known. Pass the `id` as `location`.

## Matching

`q` matches the start of the name in Bulgarian or in Latin letters, so `sof` and `Соф` both find Sofia. `total_matches` counts all matches and `limit` (1-50, default 10) caps the list.

## Source

imoti.net publishes its location list inside the search page. The list is cached for one day.

- **Documentation:** [https://scrappa.co/docs/imoti-net-api/imoti_net_locations](https://scrappa.co/docs/imoti-net-api/imoti_net_locations)
- **API group:** imoti.net API
- **Endpoint:** `GET https://scrappa.co/api/imoti-net/locations`

## 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 |
| --- | --- | --- | --- |
| `q` | string | Yes | Start of a place name, at least 2 characters. |
| `limit` | integer | No | Suggestions to return, 1-50 (default 10). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/imoti-net/locations?q=sof&limit=5"
```

## Example response

```json
{
    "success": true,
    "query": "sof",
    "total_matches": 2,
    "returned": 2,
    "locations": [
        {
            "id": 1,
            "name": "\u0421\u043e\u0444\u0438\u044f",
            "name_latin": "Sofiya",
            "is_region": false,
            "slug": "sofia"
        },
        {
            "id": 60,
            "name": "\u0421\u043e\u0444\u0438\u044f \u043e\u0431\u043b\u0430\u0441\u0442",
            "name_latin": "Sofiya oblast",
            "is_region": true,
            "slug": null
        }
    ],
    "meta": {
        "endpoint_family": "locations",
        "billable": true,
        "attempts": 0
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | imoti.net could not be reached after retries, answered with an error, or returned an unexpected answer (`upstream_unavailable`, `upstream_blocked`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

## 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)
