# Estonia Statistics API
> Official Estonian statistics from Statistics Estonia (Statistikaamet) as a clean, keyless JSON API. Get the latest Estonian consumer price index and inflation — the monthly index (base 1997 = 100) with the year-on-year change computed for you — pull any table in the Statistics Estonia PxWeb catalogue as a tidy time-series (economy, prices, population, social life, environment and more), inspect a table's variables and value codes, and browse the subject tree. A thin gateway over the Statistics Estonia PxWeb API: you supply a table code (e.g. IA02) with optional dimension selection, we return tidy period/value observations. Ideal for inflation trackers, Baltic and Eurozone macro research and economic dashboards.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/estonia-stats-api/..."
```

## Pricing
- **Free** (Free) — 2,500 calls/Mo, 3 req/s
- **Basic** ($11/Mo) — 48,000 calls/Mo, 10 req/s
- **Pro** ($28/Mo) — 193,000 calls/Mo, 25 req/s
- **Mega** ($65/Mo) — 818,000 calls/Mo, 60 req/s

## Endpoints

### Inflation

#### `GET /v1/cpi` — Latest Estonian CPI and inflation

**Parameters:**
- `periods` (query, optional, string) — Number of recent months (1-120) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/estonia-stats-api/v1/cpi?periods=12"
```

**Response:**
```json
{
    "data": {
        "base": "1997 = 100",
        "table": "IA02",
        "latest": {
            "year": 2025,
            "month": 12,
            "month_name": "December",
            "index_value": 315.36,
            "change_annual_pct": 4.1
        },
        "series": [
            {
                "year": 2025,
                "month": 12,
                "month_name": "December",
                "index_value": 315.36,
                "change_annual_pct": 4.1
            },
            {
                "year": 2025,
                "month": 11,
                "month_name": "November",
                "index_value": 317.26,
                "change_annual_pct": 4.9
            },
            {
                "year": 2025,
                "month": 10,
                "month_name": "October",
                "index_value": 317.76,
                "change_annual_pct": 4.6
            },
            {
                "year": 2025,
                "month": 9,
                "month_name": "September",
                "index_value": 317.8,
                "change_annual_pct": 5.2
            },
            {
                "year": 2025,
                "month": 8,
                "month_name": "August",
                "index_value": 321.41,
                "change_annual_pct": 6.1
            },
            {
                "year": 2025,
                "month": 7,
                "month_name": "July",
                "index_value": 318.12,
                "change
…(truncated, see openapi.json for full schema)
```

### Data

#### `GET /v1/series` — Any Statistics Estonia table as a time-series

**Parameters:**
- `table` (query, required, string) — Table code Example: `IA02`
- `select` (query, optional, string) — Dimension constraints "Code:Value;Code:Value" Example: `Kaubagrupp:1;Kuu:12`
- `periods` (query, optional, string) — Recent periods (1-240) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/estonia-stats-api/v1/series?table=IA02&select=Kaubagrupp%3A1%3BKuu%3A12&periods=12"
```

**Response:**
```json
{
    "data": {
        "count": 12,
        "table": "IA02",
        "title": "IA02: CONSUMER PRICE INDEX, 1997 = 100 by Year, Commodity group and Month",
        "series": [
            {
                "value": 315.36,
                "period": "2025",
                "period_label": "2025"
            },
            {
                "value": 303.01,
                "period": "2024",
                "period_label": "2024"
            },
            {
                "value": 291.59,
                "period": "2023",
                "period_label": "2023"
            },
            {
                "value": 280.28,
                "period": "2022",
                "period_label": "2022"
            },
            {
                "value": 238.35,
                "period": "2021",
                "period_label": "2021"
            },
            {
                "value": 212.5,
                "period": "2020",
                "period_label": "2020"
            },
            {
                "value": 214.22,
                "period": "2019",
                "period_label": "2019"
            },
            {
                "value": 210.5,
                "period": "2018",
                "period_label": "2018"
            },
            {
                "value": 203.54,
                "period": "2017",
                "period_label": "2017"
            },
            {
                "value": 196.76,
                "period": "2016",
                "period_label"
…(truncated, see openapi.json for full schema)
```

### Catalog

#### `GET /v1/catalog` — Browse the subject tree

**Parameters:**
- `path` (query, optional, string) — Sub-path to list (omit for root) Example: `majandus`
- `limit` (query, optional, string) — Max items (1-400) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/estonia-stats-api/v1/catalog?path=majandus&limit=100"
```

**Response:**
```json
{
    "data": {
        "path": "majandus",
        "count": 19,
        "items": [
            {
                "id": "pellumajandus",
                "text": "Agriculture",
                "type": "folder"
            },
            {
                "id": "ehitus",
                "text": "Construction",
                "type": "folder"
            },
            {
                "id": "majandusuksused",
                "text": "Economic units",
                "type": "folder"
            },
            {
                "id": "energeetika",
                "text": "Energy",
                "type": "folder"
            },
            {
                "id": "rahandus",
                "text": "Finance",
                "type": "folder"
            },
            {
                "id": "ettevetete-majandusnaitajad",
                "text": "Financial statistics of enterprises",
                "type": "folder"
            },
            {
                "id": "kalandus",
                "text": "Fishing",
                "type": "folder"
            },
            {
                "id": "valiskaubandus",
                "text": "Foreign trade",
                "type": "folder"
            },
            {
                "id": "metsamajandus",
                "text": "Forestry",
                "type": "folder"
            },
            {
                "id": "toostus",
                "text": "Industry",
                "type": "folder"
            },
            {
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/table` — Table metadata (variables and value codes)

**Parameters:**
- `table` (query, required, string) — Table code Example: `IA02`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/estonia-stats-api/v1/table?table=IA02"
```

**Response:**
```json
{
    "data": {
        "table": "IA02",
        "title": "IA02: CONSUMER PRICE INDEX, 1997 = 100 (1998–2025, MONTHS)",
        "variables": [
            {
                "code": "Aasta",
                "text": "Year",
                "n_values": 28,
                "sample_values": [
                    {
                        "code": "1998",
                        "text": "1998"
                    },
                    {
                        "code": "1999",
                        "text": "1999"
                    },
                    {
                        "code": "2000",
                        "text": "2000"
                    },
                    {
                        "code": "2001",
                        "text": "2001"
                    },
                    {
                        "code": "2002",
                        "text": "2002"
                    },
                    {
                        "code": "2003",
                        "text": "2003"
                    }
                ]
            },
            {
                "code": "Kaubagrupp",
                "text": "Commodity group",
                "n_values": 13,
                "sample_values": [
                    {
                        "code": "1",
                        "text": "Total"
                    },
                    {
                        "code": "2",
                        "text": "Food and non-alcoholic beverages"
                    },

…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/estonia-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "table takes a Statistics Estonia table code, e.g. IA02 (consumer prices).",
        "source": "Statistics Estonia (Statistikaamet)",
        "upstream": "https://andmed.stat.ee/api/v1/en/stat",
        "cpi_table": "IA02",
        "endpoints": [
            "/v1/cpi",
            "/v1/series",
            "/v1/table",
            "/v1/catalog",
            "/v1/meta"
        ],
        "description": "Keyless gateway over Statistics Estonia's PxWeb API. /v1/cpi gives the latest Estonian consumer price index (1997 = 100) with computed year-on-year inflation; /v1/series pulls any table as a clean time-series; /v1/table inspects a table's variables; /v1/catalog lists/searches the tables.",
        "documentation": "https://estonia-stats-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:21.415Z",
        "request_id": "26f826a6-9238-42e5-b467-df96593be576"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/estonia-stats-api
OpenAPI spec: https://www.oanor.com/api/estonia-stats-api/openapi.json
