# Slovenia Statistics API
> Official Slovenian statistics from the Statistical Office of the Republic of Slovenia (SURS) as a clean, keyless JSON API. Get the latest Slovenian consumer price index and inflation — the monthly index (2025 average = 100) with both the year-on-year and month-on-month change derived for you — pull any of the 4,700+ matrices in the SURS SiStat catalogue as a tidy time-series (economy, prices, population, labour market, trade and far more), inspect a matrix's variables and value codes, and search the catalogue. A thin gateway over the SURS PxWeb API: you supply a matrix id (e.g. 0400608S) with optional dimension selection, we return tidy period/value observations. Ideal for inflation trackers, Eurozone and Balkan 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/slovenia-stats-api/..."
```

## Pricing
- **Free** (Free) — 2,650 calls/Mo, 3 req/s
- **Basic** ($12/Mo) — 49,500 calls/Mo, 10 req/s
- **Pro** ($30/Mo) — 192,000 calls/Mo, 25 req/s
- **Mega** ($66/Mo) — 821,000 calls/Mo, 60 req/s

## Endpoints

### Inflation

#### `GET /v1/cpi` — Latest Slovenian 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/slovenia-stats-api/v1/cpi?periods=12"
```

**Response:**
```json
{
    "data": {
        "base": "2025 average = 100",
        "table": "0400608S.px",
        "latest": {
            "period": "2026M05",
            "index_value": 103.45,
            "change_annual_pct": 3.6,
            "change_monthly_pct": 0.5
        },
        "series": [
            {
                "period": "2026M05",
                "index_value": 103.45,
                "change_annual_pct": 3.6,
                "change_monthly_pct": 0.5
            },
            {
                "period": "2026M04",
                "index_value": 102.93,
                "change_annual_pct": 3.1,
                "change_monthly_pct": 1.9
            },
            {
                "period": "2026M03",
                "index_value": 101.01,
                "change_annual_pct": 2.5,
                "change_monthly_pct": 0.2
            },
            {
                "period": "2026M02",
                "index_value": 100.84,
                "change_annual_pct": 2.9,
                "change_monthly_pct": 0.6
            },
            {
                "period": "2026M01",
                "index_value": 100.23,
                "change_annual_pct": 2.6,
                "change_monthly_pct": -0.5
            },
            {
                "period": "2025M12",
                "index_value": 100.77,
                "change_annual_pct": 2.7,
                "change_monthly_pct": 0
            },
            {
                "period": "2025M11",
                "index_value": 100.
…(truncated, see openapi.json for full schema)
```

### Data

#### `GET /v1/series` — Any SURS matrix as a time-series

**Parameters:**
- `table` (query, required, string) — SURS matrix id Example: `0400608S`
- `select` (query, optional, string) — Dimension constraints "Code:Value;Code:Value" Example: `MERITVE:33`
- `periods` (query, optional, string) — Recent periods (1-240) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/slovenia-stats-api/v1/series?table=0400608S&select=MERITVE%3A33&periods=12"
```

**Response:**
```json
{
    "data": {
        "count": 12,
        "table": "0400608S.px",
        "title": "Consumer price indices (ECOICOP ver. 2) by CONSUMER PRODUCT, MONTH and MEASURES",
        "series": [
            {
                "value": 103.45,
                "period": "2026M05",
                "period_label": "2026M05"
            },
            {
                "value": 102.93,
                "period": "2026M04",
                "period_label": "2026M04"
            },
            {
                "value": 101.01,
                "period": "2026M03",
                "period_label": "2026M03"
            },
            {
                "value": 100.84,
                "period": "2026M02",
                "period_label": "2026M02"
            },
            {
                "value": 100.23,
                "period": "2026M01",
                "period_label": "2026M01"
            },
            {
                "value": 100.77,
                "period": "2025M12",
                "period_label": "2025M12"
            },
            {
                "value": 100.72,
                "period": "2025M11",
                "period_label": "2025M11"
            },
            {
                "value": 100.75,
                "period": "2025M10",
                "period_label": "2025M10"
            },
            {
                "value": 100.79,
                "period": "2025M09",
                "period_label": "2025M09"
            },
            {
                "value": 101
…(truncated, see openapi.json for full schema)
```

### Catalog

#### `GET /v1/catalog` — Search the SiStat matrix catalogue

**Parameters:**
- `q` (query, optional, string) — Search term (title or matrix id) Example: `consumer price`
- `limit` (query, optional, string) — Max results (1-200) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/slovenia-stats-api/v1/catalog?q=consumer+price&limit=30"
```

**Response:**
```json
{
    "data": {
        "count": 10,
        "query": "consumer price",
        "total": 4765,
        "tables": [
            {
                "id": "0400600S",
                "text": "Consumer price indices by ECOICOP ver. 1 classification, Slovenia, 2000M01 - 2025M12",
                "updated": "2026-02-13T09:48:42"
            },
            {
                "id": "0400601S",
                "text": "Consumer price indices by COICOP/HICP by groups and subgroups, Slovenia, 2000M01 - 2016M12",
                "updated": "2022-01-20T11:52:08"
            },
            {
                "id": "0400606S",
                "text": "Harmonised index of consumer prices by ECOICOP ver. 1 classification, Slovenia, 2001M01 - 2025M12",
                "updated": "2026-02-13T09:48:28"
            },
            {
                "id": "0400607S",
                "text": "Harmonised index of consumer prices at constant tax rates by ECOICOP ver. 1 classification, Slovenia, 2003M01 - 2025M12",
                "updated": "2026-02-13T09:44:04"
            },
            {
                "id": "0400608S",
                "text": "Consumer price indices (ECOICOP ver. 2), Slovenia, monthly",
                "updated": "2026-06-02T13:20:27"
            },
            {
                "id": "0400609S",
                "text": "Harmonised index of consumer prices (ECOICOP ver. 2), Slovenia, monthly",
                "updated": "2026-06-02T13:09:23"
            },
            {
            
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `table` (query, required, string) — SURS matrix id Example: `0400608S`

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

**Response:**
```json
{
    "data": {
        "table": "0400608S.px",
        "title": "Consumer price indices (ECOICOP ver. 2) by CONSUMER PRODUCT, MONTH and MEASURES",
        "variables": [
            {
                "code": "ŽIVLJENJSKA POTREBŠČINA",
                "text": "CONSUMER PRODUCT",
                "n_values": 435,
                "sample_values": [
                    {
                        "code": "TOT",
                        "text": "TOTAL"
                    },
                    {
                        "code": "01",
                        "text": "01 FOOD AND NON-ALCOHOLIC BEVERAGES"
                    },
                    {
                        "code": "011",
                        "text": "01.1 Food"
                    },
                    {
                        "code": "0111",
                        "text": "01.1.1 Cereals and cereal products"
                    },
                    {
                        "code": "01111",
                        "text": "01.1.1.1 Cereals"
                    },
                    {
                        "code": "01112",
                        "text": "01.1.1.2 Flour of cereals"
                    }
                ]
            },
            {
                "code": "MESEC",
                "text": "MONTH",
                "n_values": 317,
                "sample_values": [
                    {
                        "code": "2000M01",
                        "text": "2000M01"
                    
…(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/slovenia-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "table takes a SURS matrix id, e.g. 0400608S (consumer prices).",
        "source": "Statistical Office of the Republic of Slovenia (SURS)",
        "upstream": "https://pxweb.stat.si/SiStatData/api/v1/en/Data",
        "cpi_table": "0400608S.px",
        "endpoints": [
            "/v1/cpi",
            "/v1/series",
            "/v1/table",
            "/v1/catalog",
            "/v1/meta"
        ],
        "description": "Keyless gateway over the SURS SiStat PxWeb API. /v1/cpi gives the latest Slovenian consumer price index and inflation (index + year-on-year + monthly change); /v1/series pulls any matrix as a clean time-series; /v1/table inspects a matrix's variables; /v1/catalog searches the 4,700+ matrix catalogue.",
        "documentation": "https://slovenia-stats-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:16.570Z",
        "request_id": "07531152-36fc-41f1-87b8-cf990a33ad48"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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