# Sweden Municipal Statistics API
> Swedish municipal and regional statistics straight from Kolada — the open database run by the Council for the Promotion of Municipal Analyses (RKA) — no key, read live. Kolada holds roughly 6,000 key performance indicators tracking the finances and service quality of all 290 Swedish municipalities and 21 regions: personnel costs, school results, elderly care, waiting times, environment, demographics and much more. The kpis endpoint lists and searches the indicator catalogue by title. The kpi endpoint returns the full metadata of a single indicator (its definition, operating area and source). The municipalities endpoint lists every municipality and region with its official code. The data endpoint returns a chosen indicator's full annual value series for a given municipality, with the latest value highlighted. The meta endpoint documents the API. Live data from Kolada v3, lightly cached. Live. 5 endpoints. This serves Swedish public-sector statistics; for the krona exchange rate or national CPI use an FX / national-statistics API.

## 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/kolada-api/..."
```

## Pricing
- **Free** (Free) — 280 calls/Mo, 2 req/s
- **Basic** ($10/Mo) — 17,900 calls/Mo, 6 req/s
- **Pro** ($27/Mo) — 93,000 calls/Mo, 22 req/s
- **Mega** ($62/Mo) — 420,000 calls/Mo, 55 req/s

## Endpoints

### Catalogue

#### `GET /v1/kpi` — Single KPI metadata

**Parameters:**
- `id` (query, optional, string) — Kolada KPI id (default N00003) Example: `N00003`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kolada-api/v1/kpi?id=N00003"
```

**Response:**
```json
{
    "data": {
        "id": "N00003",
        "title": "Personalkostnader, kr/inv",
        "source": "Kolada (Sweden)",
        "auspice": "E",
        "description": "Personalkostnader kommunen totalt, dividerat med antal invånare totalt 31/12. Avser egen regi. Källa: SCB.",
        "operating_area": "Kommunen, övergripande",
        "has_gender_split": false,
        "municipality_type": "K"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:30.237Z",
        "request_id": "1ae5063e-4532-4e2b-aef9-76c073e7538f"
    },
    "status": "ok",
    "message": "Kolada KPI retrieved",
    "success": true
}
```

#### `GET /v1/kpis` — List/search the KPI catalogue

**Parameters:**
- `search` (query, optional, string) — Filter KPIs by title text
- `page` (query, optional, string) — Page number (default 1) Example: `1`
- `per_page` (query, optional, string) — Results per page (default 30, max 100) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kolada-api/v1/kpis?page=1&per_page=30"
```

**Response:**
```json
{
    "data": {
        "kpis": [
            {
                "id": "N00003",
                "title": "Personalkostnader, kr/inv",
                "description": "Personalkostnader kommunen totalt, dividerat med antal invånare totalt 31/12. Avser egen regi. Källa: SCB.",
                "operating_area": "Kommunen, övergripande",
                "has_gender_split": false
            },
            {
                "id": "N00005",
                "title": "Utjämningssystemet enl resultaträkning, kr/inv",
                "description": "Kommunalekonomisk utjämning kommun, dividerat med antal invånare totalt 31/12 . Källa: SCB.",
                "operating_area": "Kommunen, övergripande",
                "has_gender_split": false
            },
            {
                "id": "N00009",
                "title": "Intäkter kommunen totalt, kr/inv",
                "description": "Externa intäkter exklusive intäkter från försäljning till andra kommuner och regioner för kommunen totalt, dividerat med antal invånare 31/12. Källa: SCB.",
                "operating_area": "Kommunen, övergripande",
                "has_gender_split": false
            },
            {
                "id": "N00011",
                "title": "Inkomstutjämning, bidrag/avgift, kr/inv 1 nov fg år",
                "description": "Inkomstutjämning, bidrag/avgift, i kronor per invånare den 1/11 fg år. Källa: SCB.",
                "operating_area": "Kommunen, övergripande",
  
…(truncated, see openapi.json for full schema)
```

### Reference

#### `GET /v1/municipalities` — List municipalities and regions

**Parameters:**
- `page` (query, optional, string) — Page number (default 1) Example: `1`
- `per_page` (query, optional, string) — Results per page (default 60, max 320) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kolada-api/v1/municipalities?page=1&per_page=60"
```

**Response:**
```json
{
    "data": {
        "page": 1,
        "count": 60,
        "source": "Kolada (Sweden)",
        "per_page": 60,
        "total_count": 60,
        "municipalities": [
            {
                "id": "0000",
                "type": "region",
                "title": "Riket"
            },
            {
                "id": "0001",
                "type": "region",
                "title": "Region Stockholm"
            },
            {
                "id": "0003",
                "type": "region",
                "title": "Region Uppsala"
            },
            {
                "id": "0004",
                "type": "region",
                "title": "Region Sörmland"
            },
            {
                "id": "0005",
                "type": "region",
                "title": "Region Östergötland"
            },
            {
                "id": "0006",
                "type": "region",
                "title": "Region Jönköpings län"
            },
            {
                "id": "0007",
                "type": "region",
                "title": "Region Kronoberg"
            },
            {
                "id": "0008",
                "type": "region",
                "title": "Region Kalmar"
            },
            {
                "id": "0009",
                "type": "region",
                "title": "Region Gotland"
            },
            {
                "id": "0010",
                "type": "region",
                "title
…(truncated, see openapi.json for full schema)
```

### Data

#### `GET /v1/data` — A KPI value series for a municipality

**Parameters:**
- `kpi` (query, optional, string) — KPI id (default N00003) Example: `N00003`
- `municipality` (query, optional, string) — 4-digit municipality id (default 0180 = Stockholm) Example: `0180`
- `year` (query, optional, string) — Optional single year

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kolada-api/v1/data?kpi=N00003&municipality=0180"
```

**Response:**
```json
{
    "data": {
        "kpi": "N00003",
        "count": 28,
        "latest": {
            "year": 2025,
            "value": 28995.84784,
            "status": ""
        },
        "series": [
            {
                "year": 1998,
                "value": 17464,
                "status": ""
            },
            {
                "year": 1999,
                "value": 18114.19921875,
                "status": ""
            },
            {
                "year": 2000,
                "value": 17641,
                "status": ""
            },
            {
                "year": 2001,
                "value": 18136,
                "status": ""
            },
            {
                "year": 2002,
                "value": 18603,
                "status": ""
            },
            {
                "year": 2003,
                "value": 19707,
                "status": ""
            },
            {
                "year": 2004,
                "value": 20714,
                "status": ""
            },
            {
                "year": 2005,
                "value": 21462.69921875,
                "status": ""
            },
            {
                "year": 2006,
                "value": 21876,
                "status": ""
            },
            {
                "year": 2007,
                "value": 21750,
                "status": ""
            },
            {
                "year": 2008,
                "value": 21486,
        
…(truncated, see openapi.json for full schema)
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "Sweden Municipal Statistics (Kolada) API",
        "notes": "Live data from Kolada v3; the data endpoint returns a KPI's value series for a municipality (gender total). Municipality ids are 4 digits (0180 = Stockholm).",
        "source": "Kolada — Council for the Promotion of Municipal Analyses (RKA), via api.kolada.se",
        "country": "Sweden",
        "coverage": "~6,000 key performance indicators across 290 municipalities and 21 regions (finance, schools, care, environment, demographics)",
        "endpoints": [
            "/v1/kpis",
            "/v1/kpi",
            "/v1/municipalities",
            "/v1/data",
            "/v1/meta"
        ],
        "documentation": "https://kolada-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:30.585Z",
        "request_id": "97fc59b4-055b-44d3-8d7a-45d98a5dcef4"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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