# Finland Statistics API
> Official Finnish statistics from Statistics Finland (Tilastokeskus / StatFin) as a clean, keyless JSON API. Get the latest Finnish consumer price index and inflation — index level (base 2025 = 100) and year-on-year change, monthly back to 1995 — pull any table in the vast StatFin PxWeb catalogue as a tidy time-series (prices, population, labour market, national accounts, energy, housing and hundreds more) without wrestling with the json-stat2 format, inspect a table's variables and value codes, and browse the database tree. A thin gateway over Statistics Finland's public StatFin PxWeb API: you supply a table path (relative to StatFin, e.g. khi/15b5.px) and optional dimension selection, we return the latest periods as plain period/value rows. Ideal for inflation trackers, Nordic 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/finland-stats-api/..."
```

## Pricing
- **Free** (Free) — 2,600 calls/Mo, 3 req/s
- **Basic** ($12/Mo) — 51,500 calls/Mo, 10 req/s
- **Pro** ($31/Mo) — 204,000 calls/Mo, 25 req/s
- **Mega** ($70/Mo) — 838,000 calls/Mo, 60 req/s

## Endpoints

### Inflation

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

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

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

**Response:**
```json
{
    "data": {
        "base": "2025 = 100",
        "latest": {
            "month": "2026M05",
            "index_value": 102.14,
            "change_annual_pct": 2.1
        },
        "series": [
            {
                "month": "2026M05",
                "index_value": 102.14,
                "change_annual_pct": 2.1
            },
            {
                "month": "2026M04",
                "index_value": 101.68,
                "change_annual_pct": 1.5
            },
            {
                "month": "2026M03",
                "index_value": 101.56,
                "change_annual_pct": 1.3
            },
            {
                "month": "2026M02",
                "index_value": 100.83,
                "change_annual_pct": 0.6
            },
            {
                "month": "2026M01",
                "index_value": 99.78,
                "change_annual_pct": -0.2
            },
            {
                "month": "2025M12",
                "index_value": 99.93,
                "change_annual_pct": 0.2
            },
            {
                "month": "2025M11",
                "index_value": 99.71,
                "change_annual_pct": -0.1
            },
            {
                "month": "2025M10",
                "index_value": 99.95,
                "change_annual_pct": -0.2
            },
            {
                "month": "2025M09",
                "index_value": 100.11,
                "change_annual_pct": 0.5
          
…(truncated, see openapi.json for full schema)
```

### Data

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

**Parameters:**
- `path` (query, required, string) — StatFin table path (relative, ends in .px) Example: `khi/15b5.px`
- `select` (query, optional, string) — Dimension constraints "Code:Value;Code:Value" Example: `contentscode:ip_khi`
- `periods` (query, optional, string) — Recent periods (1-120) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finland-stats-api/v1/series?path=khi%2F15b5.px&select=contentscode%3Aip_khi&periods=12"
```

**Response:**
```json
{
    "data": {
        "path": "khi/15b5.px",
        "title": "Consumer Price Index (2025=100) by Month, Commodity and Information",
        "series": [
            {
                "value": 102.14,
                "period": "2026M05"
            },
            {
                "value": 101.68,
                "period": "2026M04"
            },
            {
                "value": 101.56,
                "period": "2026M03"
            },
            {
                "value": 100.83,
                "period": "2026M02"
            },
            {
                "value": 99.78,
                "period": "2026M01"
            },
            {
                "value": 99.93,
                "period": "2025M12"
            },
            {
                "value": 99.71,
                "period": "2025M11"
            },
            {
                "value": 99.95,
                "period": "2025M10"
            },
            {
                "value": 100.11,
                "period": "2025M09"
            },
            {
                "value": 99.77,
                "period": "2025M08"
            },
            {
                "value": 100.01,
                "period": "2025M07"
            },
            {
                "value": 99.82,
                "period": "2025M06"
            }
        ],
        "constrained": {
            "contentscode": {
                "pos": 0,
                "code": "ip_khi",
                "label": "Point figure, CPI"
     
…(truncated, see openapi.json for full schema)
```

### Catalog

#### `GET /v1/databases` — Browse the database tree

**Parameters:**
- `path` (query, optional, string) — Sub-path to list (omit for root) Example: `khi`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finland-stats-api/v1/databases?path=khi"
```

**Response:**
```json
{
    "data": {
        "path": "khi",
        "count": 17,
        "items": [
            {
                "id": "11xc.px",
                "text": "11xc -- Consumer Price Index (2015=100), yearly data, 2015-2025",
                "type": "t"
            },
            {
                "id": "11xl.px",
                "text": "11xl -- Cost-of-living index (1951:10=100), monthly data, 1951M01-2026M05",
                "type": "t"
            },
            {
                "id": "11xm.px",
                "text": "11xm -- Cost-of-living index (1951:10=100), annual data, 1951-2025",
                "type": "t"
            },
            {
                "id": "11xn.px",
                "text": "11xn -- Cost-of-living index (1938:8-1939:7=100), monthly data, 1939M01-2026M05",
                "type": "t"
            },
            {
                "id": "11xp.px",
                "text": "11xp -- Cost-of-living index (1938:8-1939:7=100), annual data, 1939-2025",
                "type": "t"
            },
            {
                "id": "11xs.px",
                "text": "11xs -- Consumer Price Indices, overall index, monthly data, 1972M01-2026M05",
                "type": "t"
            },
            {
                "id": "11xt.px",
                "text": "11xt -- Consumer Price Indices, overall index, yearly data, 1972-2025",
                "type": "t"
            },
            {
                "id": "11xx.px",
                "text": "11xx -- Average prices of
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `path` (query, required, string) — StatFin table path (relative, ends in .px) Example: `khi/15b5.px`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/finland-stats-api/v1/table?path=khi%2F15b5.px"
```

**Response:**
```json
{
    "data": {
        "path": "khi/15b5.px",
        "title": "Consumer Price Index (2025=100) by Month, Commodity and Information",
        "variables": [
            {
                "code": "timeperiod_m",
                "text": "Month",
                "time": true,
                "n_values": 377,
                "sample_values": [
                    {
                        "code": "1995M01",
                        "text": "1995M01"
                    },
                    {
                        "code": "1995M02",
                        "text": "1995M02"
                    },
                    {
                        "code": "1995M03",
                        "text": "1995M03"
                    },
                    {
                        "code": "1995M04",
                        "text": "1995M04"
                    },
                    {
                        "code": "1995M05",
                        "text": "1995M05"
                    }
                ]
            },
            {
                "code": "coicop_46_20231201",
                "text": "Commodity",
                "time": false,
                "n_values": 390,
                "sample_values": [
                    {
                        "code": "SSS",
                        "text": "0 Total"
                    },
                    {
                        "code": "01",
                        "text": "01 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/finland-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "For /v1/series and /v1/table, path is relative to StatFin, e.g. khi/15b5.px",
        "source": "Statistics Finland (Tilastokeskus / StatFin)",
        "upstream": "https://pxdata.stat.fi/PxWeb/api/v1/en/StatFin",
        "cpi_table": "khi/15b5.px",
        "endpoints": [
            "/v1/cpi",
            "/v1/series",
            "/v1/table",
            "/v1/databases",
            "/v1/meta"
        ],
        "description": "Keyless gateway over Statistics Finland's StatFin PxWeb API. /v1/cpi gives the latest Finnish consumer price index and annual inflation; /v1/series pulls any StatFin table as a clean time-series; /v1/table and /v1/databases discover the catalog.",
        "documentation": "https://finland-stats-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:41.596Z",
        "request_id": "2c06dba0-97ea-43a6-81f4-42b6ea023f44"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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