# imoti.net Agencies API Documentation

Scrappa's `GET /api/imoti-net/agencies` lists the companies on imoti.net: agencies, builders, banks, investors and legal offices.

## What you get

Each agency has `id` (pass it to the agency endpoint), `name`, `type`, `url`, `logo`, `website`, the company `phone`, `city` and `offers_count`.

## Filters

`search` matches the company name, `city_id` takes a location id from `/api/imoti-net/locations`, `type` is `agency`, `construction`, `legal`, `bank` or `investor`, and `sort` is `offers` (default), `alphabetical`, `type` or `recommended`. imoti.net applies every filter itself, and `applied_filters` echoes them.

## Pagination

`limit` is 15 (default), 30 or 45 agencies per page. `page` is 1-based. A page past the last page returns an empty list, and `pages_count` is `null` there.

- **Documentation:** [https://scrappa.co/docs/imoti-net-api/imoti_net_agencies](https://scrappa.co/docs/imoti-net-api/imoti_net_agencies)
- **API group:** imoti.net API
- **Endpoint:** `GET https://scrappa.co/api/imoti-net/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 |
| --- | --- | --- | --- |
| `search` | string | No | Part of a company name. |
| `city_id` | integer | No | Location id from /api/imoti-net/locations. |
| `type` | string | No | agency, construction, legal, bank or investor. |
| `sort` | string | No | offers (default), alphabetical, type or recommended. |
| `limit` | integer | No | Agencies per page: 15 (default), 30 or 45. |
| `page` | integer | No | Result page, 1-based. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/imoti-net/agencies?city_id=2&limit=15"
```

## Example response

```json
{
    "success": true,
    "returned": 1,
    "pagination": {
        "page": 1,
        "limit": 15,
        "pages_count": 4,
        "has_next_page": true,
        "has_previous_page": false
    },
    "applied_filters": {
        "search": null,
        "city_id": 2,
        "type": null,
        "sort": "offers"
    },
    "agencies": [
        {
            "id": "xnvdbgplovdiv",
            "name": "\u0415\u041a\u0421 \u041d\u0412\u0414 \u041f\u041b\u041e\u0412\u0414\u0418\u0412",
            "type": "\u0410\u0433\u0435\u043d\u0446\u0438\u044f \u0437\u0430 \u043d\u0435\u0434\u0432\u0438\u0436\u0438\u043c\u0438 \u0438\u043c\u043e\u0442\u0438",
            "url": "https://xnvdbgplovdiv.imoti.net",
            "logo": "https://www.imoti.net/web/files/siteusers/24891/agency_main_image/thumb_200x75_logo.png?ver=1792994655",
            "website": "https://example.bg",
            "description": null,
            "phone": "032 600 600",
            "city": "\u041f\u043b\u043e\u0432\u0434\u0438\u0432",
            "offers_count": 4807
        }
    ],
    "meta": {
        "endpoint_family": "agencies",
        "billable": true,
        "attempts": 1
    }
}
```

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