# Statsnet API — company data over REST

The Statsnet REST API gives you programmatic access to the same data as the website: company profiles for Kazakhstan, Kyrgyzstan and Uzbekistan, contacts, government contracts, relations and risks. The API base is `https://statsnet.co/api/v1`; responses are JSON.

## Quick start

Public endpoints work without a key. Fetch a company profile by BIN with a single request:

```bash
curl "https://statsnet.co/api/v1/companies/kz/000740000728/meta/beta"
```

For paid data, create an API key in your [account](/en/me) and pass it in the `x-api-key` header:

```bash
curl "https://statsnet.co/api/v1/companies/123/contacts" \
  -H "x-api-key: sk_live_YOUR_KEY"
```

## Authentication and keys

Requests are signed with the `x-api-key` header carrying a value like `sk_live_...`. Keys are created in your [account](/en/me) — up to 10 keys per account.

A key inherits its owner's subscription: without an active paid plan the key only reaches public endpoints. Paid endpoints consume the report quota of your plan — the same way viewing profiles on the website does. Keep the key on your server and never ship it in client-side code or shared repositories.

## Public endpoints

Available without a key or subscription:

| Method and path | Description |
| --- | --- |
| `GET /companies/{id}/meta/beta` | Company profile by internal ID (JSON) |
| `GET /companies/{jurisdiction}/{identifier}/meta/beta` | Profile by BIN/IIN; jurisdictions: `kz`, `uz`, `kg` |
| `GET /companies/{jurisdiction}/{identifier}/md` | Company profile as Markdown — convenient for AI agents |
| `GET /companies/states/{jurisdiction}` | List of regions for a jurisdiction |

## Paid endpoints

Require a key with an active subscription. Requesting a full profile spends one report; repeat requests for the same company within 2 weeks are free.

| Method and path | Description |
| --- | --- |
| `GET /companies/{id}/paid` | Full company profile |
| `GET /companies/{id}/contacts` | Contacts (phones, emails, websites) |
| `GET /companies/{id}/gov-contracts` | Government contracts |
| `GET /companies/{id}/quasi_contracts` | Quasi-government sector contracts |
| `GET /companies/{id}/relations` | Relations graph: shareholders, officers, affiliated companies |
| `GET /individuals/{identifier}` | Individual profile by IIN |
| `POST /export` | Bulk company exports by filters (Excel) |

Company search by name and filters is available via `POST /business/search` (parameters `query`, `jurisdiction`, `limit` — from 1 to 500).

## Request accounting and limits

- One paid request per company = one report from your plan quota.
- A repeat request for the same company within 14 days does not spend quota.
- The number of reports depends on your plan — see [pricing](/en/plans).
- Public endpoints don't consume quota but are rate limited.

## Response codes

| Code | Meaning |
| --- | --- |
| `200` | Successful request |
| `401` | Key missing or invalid |
| `402` | Subscription inactive — paid endpoint unavailable |
| `403` | Resource not accessible on the current plan |
| `404` | Company or resource not found |
| `429` | Period quota exhausted or rate limit exceeded |

## SDKs and libraries

Official SDKs cover the main endpoints so you don't hand-roll HTTP:

- [Python SDK](https://github.com/statsnet/python-sdk) — `pip install statsnet-python-sdk`
- [JavaScript SDK](https://github.com/statsnet/js-sdk)
- [Go SDK](https://github.com/statsnet/gosdk)

Python example:

```python
from statsnet_python_sdk import Client

client = Client("sk_live_YOUR_KEY")
companies = client.search(query="kazpost", jurisdiction="kz", limit=5)
company = client.get_company("kz", companies[0]["id"])
```

## Specification and AI integrations

- Interactive Swagger specification: [statsnet.co/api/v1/swagger/index.html](https://statsnet.co/api/v1/swagger/index.html).
- Machine-readable version of this page: [statsnet.co/api.md](https://statsnet.co/api.md).
- For AI assistants (Claude, Cursor, ChatGPT) use the [Statsnet MCP server](/en/integrations/mcp) — the same data over the Model Context Protocol with the same API key.

### How much does API access cost?

There is no separate API plan: a key inherits your Statsnet subscription. Public endpoints are free; paid ones spend your plan's reports — prices and limits are on the [pricing page](/en/plans). For banks, fintech and high-volume use cases we offer bulk exports and custom limits — reach out via the [contact form](/en/contact).

### How do I get an API key?

Sign up on Statsnet, open your [account](/en/me) and create a key in the API section. One account can hold up to 10 keys — for example, separate keys for staging and production.

### Which jurisdictions are available through the API?

Kazakhstan (`kz`), Uzbekistan (`uz`) and Kyrgyzstan (`kg`). The data set depends on the jurisdiction: Kazakhstan has the richest coverage (financials, government contracts, risks, relations).

### How is the API different from the MCP server?

The API is classic REST for integrations with a predefined scenario: your system decides which endpoints to call and when. The [MCP server](/en/integrations/mcp) serves the same data to AI assistants, which pick tools themselves based on the user's question. The key and request accounting are shared.
