# Croatia Statistics API
> Official Croatian statistics from the Croatian Bureau of Statistics (Državni zavod za statistiku, DZS) as a clean, keyless JSON API. Get the latest Croatian consumer price index and inflation — the monthly index (2025 = 100) with both the annual and monthly rate of change — pull any table in the DZS PxWeb catalogue as a tidy time-series (prices, industry, national accounts, energy, construction, environment and more), inspect a table's variables and value codes, and browse the database tree. A thin gateway over the DZS PxWeb API: you supply a table path (segments auto URL-encoded) 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/croatia-stats-api/..."
```

## Pricing
- **Free** (Free) — 2,350 calls/Mo, 3 req/s
- **Basic** ($12/Mo) — 50,500 calls/Mo, 10 req/s
- **Pro** ($29/Mo) — 195,000 calls/Mo, 25 req/s
- **Mega** ($64/Mo) — 812,000 calls/Mo, 60 req/s

## Endpoints

### Inflation

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

**Response:**
```json
{
    "data": {
        "base": "2025 = 100",
        "table": "ME_PS09",
        "latest": {
            "period": "2026M05",
            "index_value": 104.8,
            "change_annual_pct": 5.2,
            "change_monthly_pct": -0.3
        },
        "series": [
            {
                "period": "2026M05",
                "index_value": 104.8,
                "change_annual_pct": 5.2,
                "change_monthly_pct": -0.3
            },
            {
                "period": "2026M04",
                "index_value": 105.1,
                "change_annual_pct": 5.8,
                "change_monthly_pct": 1.6
            },
            {
                "period": "2026M03",
                "index_value": 103.4,
                "change_annual_pct": 4.8,
                "change_monthly_pct": 1.4
            },
            {
                "period": "2026M02",
                "index_value": 102,
                "change_annual_pct": 3.8,
                "change_monthly_pct": 0.3
            },
            {
                "period": "2026M01",
                "index_value": 101.7,
                "change_annual_pct": 3.4,
                "change_monthly_pct": 0.3
            },
            {
                "period": "2025M12",
                "index_value": 101.4,
                "change_annual_pct": 3.3,
                "change_monthly_pct": -0.4
            },
            {
                "period": "2025M11",
                "index_value": 101.9,
              
…(truncated, see openapi.json for full schema)
```

### Data

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

**Parameters:**
- `path` (query, required, string) — PxWeb table path (slash-separated, auto-encoded) Example: `Cijene/Indeksi potrošačkih cijena/Indeksi potrošačkih cijena – ECOICOP, ver. 2/ME_PS09.px`
- `select` (query, optional, string) — Dimension constraints "Code:Value;Code:Value" Example: `Indikatori:4`
- `periods` (query, optional, string) — Recent periods (1-240) Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/croatia-stats-api/v1/series?path=Cijene%2FIndeksi+potro%C5%A1a%C4%8Dkih+cijena%2FIndeksi+potro%C5%A1a%C4%8Dkih+cijena+%E2%80%93+ECOICOP%2C+ver.+2%2FME_PS09.px&select=Indikatori%3A4&periods=12"
```

**Response:**
```json
{
    "data": {
        "path": "Cijene/Indeksi potrošačkih cijena/Indeksi potrošačkih cijena – ECOICOP, ver. 2/ME_PS09.px",
        "count": 12,
        "title": "Table 1.2 Consumer price indices by ECOICOP ver. 2 classification, monthly by ECOICOP ver. 2, Indicators and Month",
        "series": [
            {
                "value": 104.8,
                "period": "2026M05",
                "period_label": "2026M05"
            },
            {
                "value": 105.1,
                "period": "2026M04",
                "period_label": "2026M04"
            },
            {
                "value": 103.4,
                "period": "2026M03",
                "period_label": "2026M03"
            },
            {
                "value": 102,
                "period": "2026M02",
                "period_label": "2026M02"
            },
            {
                "value": 101.7,
                "period": "2026M01",
                "period_label": "2026M01"
            },
            {
                "value": 101.4,
                "period": "2025M12",
                "period_label": "2025M12"
            },
            {
                "value": 101.9,
                "period": "2025M11",
                "period_label": "2025M11"
            },
            {
                "value": 101.3,
                "period": "2025M10",
                "period_label": "2025M10"
            },
            {
                "value": 100.7,
                "period": "20
…(truncated, see openapi.json for full schema)
```

### Catalog

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

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

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

**Response:**
```json
{
    "data": {
        "path": "Cijene",
        "count": 2,
        "items": [
            {
                "id": "Indeksi potrošačkih cijena",
                "text": "Consumer Price Indices\n",
                "type": "folder"
            },
            {
                "id": "Indeksi cijena stambenih objekata",
                "text": "House Price Indices\n",
                "type": "folder"
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:12.721Z",
        "request_id": "a91e7bc3-96cf-4e64-ac6a-66ba242297bb"
    },
    "status": "ok",
    "message": "Catalog retrieved successfully",
    "success": true
}
```

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

**Parameters:**
- `path` (query, required, string) — PxWeb table path (slash-separated) Example: `Cijene/Indeksi potrošačkih cijena/Indeksi potrošačkih cijena – ECOICOP, ver. 2/ME_PS09.px`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/croatia-stats-api/v1/table?path=Cijene%2FIndeksi+potro%C5%A1a%C4%8Dkih+cijena%2FIndeksi+potro%C5%A1a%C4%8Dkih+cijena+%E2%80%93+ECOICOP%2C+ver.+2%2FME_PS09.px"
```

**Response:**
```json
{
    "data": {
        "path": "Cijene/Indeksi potrošačkih cijena/Indeksi potrošačkih cijena – ECOICOP, ver. 2/ME_PS09.px",
        "title": "Table 1.2 Consumer price indices by ECOICOP ver. 2 classification, monthly by ECOICOP ver. 2, Indicators and Month",
        "variables": [
            {
                "code": "ECOICOP, ver. 2",
                "text": "ECOICOP ver. 2",
                "n_values": 522,
                "sample_values": [
                    {
                        "code": "00",
                        "text": "00  CONSUMER PRICE INDEX – 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": "Indikatori",
                "text": "Indicators",
                "n_values": 4,
                
…(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/croatia-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "path is the slash-separated PxWeb path (segments auto URL-encoded); browse with /v1/catalog starting from a database like 'Cijene'.",
        "source": "Croatian Bureau of Statistics (Državni zavod za statistiku, DZS)",
        "upstream": "https://web.dzs.hr/PXWeb/api/v1/en",
        "cpi_table": "Cijene/.../ME_PS09.px",
        "endpoints": [
            "/v1/cpi",
            "/v1/series",
            "/v1/table",
            "/v1/catalog",
            "/v1/meta"
        ],
        "description": "Keyless gateway over the Croatian Bureau of Statistics PxWeb API. /v1/cpi gives the latest Croatian consumer price index and inflation (index + annual + monthly rate); /v1/series pulls any table as a clean time-series; /v1/table inspects a table's variables; /v1/catalog browses the database tree.",
        "documentation": "https://croatia-stats-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T20:41:12.972Z",
        "request_id": "f1fba812-1fa4-4cea-8c01-4f0a57517875"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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