# Kosovo Statistics API
> Official Kosovo economic statistics straight from the Kosovo Agency of Statistics (ASK) via its ASKdata open-data service — no key, read live. The cpi endpoint returns the headline Harmonised Index of Consumer Prices (HICP, all items, base 2015=100) for the latest month with the index level plus month-on-month and year-on-year inflation, computed from the official series. The cpi/series endpoint returns the historical monthly HICP index and year-on-year rate over the last N months, ready to chart. The cpi/groups endpoint breaks the latest HICP down across all twelve COICOP main groups (food, housing, transport and so on) with index and annual change for each. The cpi/annual endpoint gives the annual-average HICP and average inflation for every year since 2002. The meta endpoint documents the source. Live data from ASKdata PxWeb, lightly cached. Live. 5 endpoints. This serves Kosovo national price statistics; for the euro exchange rate use an FX API (Kosovo uses the euro).

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

## Pricing
- **Free** (Free) — 260 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 18,300 calls/Mo, 6 req/s
- **Pro** ($30/Mo) — 93,500 calls/Mo, 22 req/s
- **Mega** ($67/Mo) — 431,000 calls/Mo, 55 req/s

## Endpoints

### Inflation

#### `GET /v1/cpi` — Kosovo HICP (latest month): index, MoM and YoY

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

**Response:**
```json
{
    "data": {
        "base": "2015 = 100",
        "index": 142.6,
        "period": "2026M03",
        "source": "Kosovo Agency of Statistics (ASK, table cpi08)",
        "country": "Kosovo",
        "indicator": "Harmonised Index of Consumer Prices (HICP, all items)",
        "period_iso": "2026-03",
        "change_mom_pct": 1.42,
        "change_yoy_pct": 6.66
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:34.338Z",
        "request_id": "a91ec759-8aae-4fc4-acca-3ae0e3f3d9d9"
    },
    "status": "ok",
    "message": "Kosovo HICP retrieved",
    "success": true
}
```

#### `GET /v1/cpi/annual` — Annual-average HICP + inflation since 2002

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

**Response:**
```json
{
    "data": {
        "base": "2015 = 100",
        "count": 25,
        "years": [
            {
                "year": "2002",
                "months": 8,
                "average_index": 78.12
            },
            {
                "year": "2003",
                "months": 12,
                "average_index": 79.05,
                "annual_avg_change_pct": 1.19
            },
            {
                "year": "2004",
                "months": 12,
                "average_index": 78.21,
                "annual_avg_change_pct": -1.06
            },
            {
                "year": "2005",
                "months": 12,
                "average_index": 77.13,
                "annual_avg_change_pct": -1.38
            },
            {
                "year": "2006",
                "months": 12,
                "average_index": 77.62,
                "annual_avg_change_pct": 0.64
            },
            {
                "year": "2007",
                "months": 12,
                "average_index": 80.98,
                "annual_avg_change_pct": 4.33
            },
            {
                "year": "2008",
                "months": 12,
                "average_index": 88.55,
                "annual_avg_change_pct": 9.35
            },
            {
                "year": "2009",
                "months": 12,
                "average_index": 86.41,
                "annual_avg_change_pct": -2.42
            },
            {
                "year": "2010
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/cpi/groups` — Latest HICP across all 12 COICOP groups

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

**Response:**
```json
{
    "data": {
        "base": "2015 = 100",
        "count": 12,
        "groups": [
            {
                "group": "1",
                "index": 164.2,
                "label": "01 Food & non-alcoholic beverages",
                "change_yoy_pct": 6.49
            },
            {
                "group": "2",
                "index": 151.2,
                "label": "02 Alcoholic beverages & tobacco",
                "change_yoy_pct": 4.06
            },
            {
                "group": "3",
                "index": 113.8,
                "label": "03 Clothing & footwear",
                "change_yoy_pct": 1.7
            },
            {
                "group": "4",
                "index": 143.4,
                "label": "04 Housing, water, electricity, gas & fuels",
                "change_yoy_pct": 15.18
            },
            {
                "group": "5",
                "index": 128.9,
                "label": "05 Furnishings & household equipment",
                "change_yoy_pct": 2.96
            },
            {
                "group": "6",
                "index": 126.4,
                "label": "06 Health",
                "change_yoy_pct": 4.64
            },
            {
                "group": "7",
                "index": 130.9,
                "label": "07 Transport",
                "change_yoy_pct": 10.56
            },
            {
                "group": "8",
                "index": 111.7,
                "label": "08 Communi
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/cpi/series` — Historical HICP index + YoY series

**Parameters:**
- `months` (query, optional, string) — Number of recent months (default 24, max 240) Example: `24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/kosovo-stats-api/v1/cpi/series?months=24"
```

**Response:**
```json
{
    "data": {
        "base": "2015 = 100",
        "count": 24,
        "series": [
            {
                "index": 130.1,
                "period": "2024M04",
                "period_iso": "2024-04",
                "change_yoy_pct": 2.44
            },
            {
                "index": 129.6,
                "period": "2024M05",
                "period_iso": "2024-05",
                "change_yoy_pct": 2.37
            },
            {
                "index": 129.6,
                "period": "2024M06",
                "period_iso": "2024-06",
                "change_yoy_pct": 2.37
            },
            {
                "index": 129.9,
                "period": "2024M07",
                "period_iso": "2024-07",
                "change_yoy_pct": 2.12
            },
            {
                "index": 130.2,
                "period": "2024M08",
                "period_iso": "2024-08",
                "change_yoy_pct": 1.4
            },
            {
                "index": 129.8,
                "period": "2024M09",
                "period_iso": "2024-09",
                "change_yoy_pct": 0.23
            },
            {
                "index": 130,
                "period": "2024M10",
                "period_iso": "2024-10",
                "change_yoy_pct": 0.39
            },
            {
                "index": 130.3,
                "period": "2024M11",
                "period_iso": "2024-11",
                "change_yoy_pct": 0.7
        
…(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/kosovo-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "api": "Statistics Kosovo (ASK) API",
        "notes": "Live data from ASKdata PxWeb (json-stat2); year-on-year and month-on-month computed from the HICP index series.",
        "source": "Kosovo Agency of Statistics — ASKdata PxWeb API (askdata.rks-gov.net)",
        "country": "Kosovo",
        "endpoints": [
            "/v1/cpi",
            "/v1/cpi/series",
            "/v1/cpi/groups",
            "/v1/cpi/annual",
            "/v1/meta"
        ],
        "documentation": "https://kosovo-stats-api.oanor.dev",
        "primary_indicator": "HICP — Harmonised Index of Consumer Prices (table cpi08, 2015=100, total + 12 COICOP groups)"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:34.659Z",
        "request_id": "035ccb8e-a91c-4451-ba68-07c2249c0c3f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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