# imot.bg Agencies API Documentation

<p><strong>imot.bg Agencies API</strong> without <code>query</code> returns the agency directory with name, address, phones, logo, years on imot.bg and the agency name to use with the agency route. With <code>query</code> it searches agencies by keyword and returns the agency id, name and number of ads. A keyword result carries no sub-site name, so the agency route needs the <code>id</code> from the directory. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/imot-bg-api/imot_bg_agencies](https://scrappa.co/docs/imot-bg-api/imot_bg_agencies)
- **API group:** imot.bg API
- **Endpoint:** `GET https://scrappa.co/api/imot-bg/agencies`

## 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 | No | Keyword in the agency name, for example imoti. Leave empty for the directory. |
| `sort` | string | No | Directory only: listings (default, by number of ads) or alphabetical. |

## Example response

```json
{
    "data": {
        "query": null,
        "source": "directory",
        "agencies": [
            {
                "id": "xnvd_burgas",
                "url": "https://xnvd_burgas.imot.bg",
                "logo": "https://www.imot.bg/images/logos/med/xnvd_burgas.pic",
                "name": "\u0415\u041a\u0421 \u041d\u0412\u0414 \u0411\u0423\u0420\u0413\u0410\u0421 \u041e\u041e\u0414",
                "phones": [
                    "0887779990"
                ],
                "address": "\u043e\u0431\u043b\u0430\u0441\u0442 \u0411\u0443\u0440\u0433\u0430\u0441, \u0433\u0440. \u0411\u0443\u0440\u0433\u0430\u0441, \u0443\u043b. \u0421\u0435\u0440\u0434\u0438\u043a\u0430 2, \u0435\u0442. 4, \u043e\u0444\u0438\u0441 3",
                "is_top_agency": false,
                "years_on_site": 3
            },
            {
                "id": "address",
                "url": "https://address.imot.bg",
                "logo": "https://www.imot.bg/images/logos/med/address.pic",
                "name": "\u0410\u0414\u0420\u0415\u0421 \u041d\u0415\u0414\u0412\u0418\u0416\u0418\u041c\u0418 \u0418\u041c\u041e\u0422\u0418",
                "phones": [
                    "088 21 21 450"
                ],
                "address": "\u043e\u0431\u043b\u0430\u0441\u0442 \u0421\u043e\u0444\u0438\u044f, \u0433\u0440. \u0421\u043e\u0444\u0438\u044f, \u043f\u043b. \u0421\u0432\u0435\u0442\u0430 \u041d\u0435\u0434\u0435\u043b\u044f No 4, \u0435\u0442. 6",
                "is_top_agency": true,
                "years_on_site": 22
            }
        ]
    },
    "meta": {
        "billable": true,
        "endpoint_family": "agencies"
    },
    "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)
