# Poland Statistics API
> Official Polish statistics from Statistics Poland (Główny Urząd Statystyczny, GUS) via its Local Data Bank (BDL) as a clean, keyless JSON API. Get the latest Polish consumer price index and inflation — the annual index where the previous year = 100, so a value above 100 is the inflation rate — fetch any BDL variable's national time-series by its id, search the bank's 170,000+ variables by name, and browse the subject tree (prices, labour, population, national accounts, industry, trade and far more). A thin gateway over the GUS BDL REST API: you supply a variable id and how many recent years you want, we return tidy year/value observations. Ideal for inflation trackers, Polish and Central-European 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/poland-stats-api/..."
```

## Pricing
- **Free** (Free) — 2,900 calls/Mo, 3 req/s
- **Basic** ($12/Mo) — 52,000 calls/Mo, 10 req/s
- **Pro** ($31/Mo) — 201,000 calls/Mo, 25 req/s
- **Mega** ($68/Mo) — 832,000 calls/Mo, 60 req/s

## Endpoints

### Inflation

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

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

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

**Response:**
```json
{
    "data": {
        "note": "Annual index where the previous year = 100; a value above 100 indicates inflation.",
        "unit": "POLAND",
        "latest": {
            "year": "2025",
            "value": 103.6
        },
        "series": [
            {
                "year": "2025",
                "value": 103.6
            },
            {
                "year": "2024",
                "value": 103.6
            },
            {
                "year": "2023",
                "value": 111.4
            },
            {
                "year": "2022",
                "value": 114.4
            },
            {
                "year": "2021",
                "value": 105.1
            },
            {
                "year": "2020",
                "value": 103.4
            },
            {
                "year": "2019",
                "value": 102.3
            },
            {
                "year": "2018",
                "value": 101.6
            },
            {
                "year": "2017",
                "value": 102
            },
            {
                "year": "2016",
                "value": 99.4
            },
            {
                "year": "2015",
                "value": 99.1
            },
            {
                "year": "2014",
                "value": 100
            }
        ],
        "source": "Statistics Poland (GUS) — Local Data Bank (BDL)",
        "measure": "Consumer price index (previous year = 100)",
      
…(truncated, see openapi.json for full schema)
```

### Data

#### `GET /v1/variable` — National time-series for any BDL variable

**Parameters:**
- `variable` (query, required, string) — BDL variable id Example: `217230`
- `periods` (query, optional, string) — Recent years (1-240) Example: `12`

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

**Response:**
```json
{
    "data": {
        "unit": "POLAND",
        "count": 12,
        "series": [
            {
                "year": "2025",
                "value": 103.6
            },
            {
                "year": "2024",
                "value": 103.6
            },
            {
                "year": "2023",
                "value": 111.4
            },
            {
                "year": "2022",
                "value": 114.4
            },
            {
                "year": "2021",
                "value": 105.1
            },
            {
                "year": "2020",
                "value": 103.4
            },
            {
                "year": "2019",
                "value": 102.3
            },
            {
                "year": "2018",
                "value": 101.6
            },
            {
                "year": "2017",
                "value": 102
            },
            {
                "year": "2016",
                "value": 99.4
            },
            {
                "year": "2015",
                "value": 99.1
            },
            {
                "year": "2014",
                "value": 100
            }
        ],
        "variable_id": 217230,
        "measure_unit_id": 1
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:31.989Z",
        "request_id": "589efdb4-1fdf-4f34-b980-be32ae03d394"
    },
    "status": "ok",
    "message": "Variable retrieved successfully",
    "success": true
}
```

### Catalog

#### `GET /v1/search` — Search BDL variables by name

**Parameters:**
- `q` (query, required, string) — Search term Example: `unemployment`
- `limit` (query, optional, string) — Max results (1-100) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/poland-stats-api/v1/search?q=unemployment&limit=25"
```

**Response:**
```json
{
    "data": {
        "count": 25,
        "query": "unemployment",
        "total": 172563,
        "variables": [
            {
                "id": 6,
                "name": "total",
                "level": 6,
                "subject_id": "P1312",
                "measure_unit_id": 26
            },
            {
                "id": 7,
                "name": "males",
                "level": 6,
                "subject_id": "P1312",
                "measure_unit_id": 26
            },
            {
                "id": 8,
                "name": "females",
                "level": 6,
                "subject_id": "P1312",
                "measure_unit_id": 26
            },
            {
                "id": 34032,
                "name": "total — total",
                "level": 6,
                "subject_id": "P1313",
                "measure_unit_id": 26
            },
            {
                "id": 9,
                "name": "total — under 25 years",
                "level": 6,
                "subject_id": "P1313",
                "measure_unit_id": 26
            },
            {
                "id": 10,
                "name": "total — 25-29",
                "level": 6,
                "subject_id": "P1313",
                "measure_unit_id": 26
            },
            {
                "id": 11,
                "name": "total — 30-39",
                "level": 6,
                "subject_id": "P1313",
                "measure_unit_id":
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/subjects` — Browse the BDL subject tree

**Parameters:**
- `parent` (query, optional, string) — Parent subject id (omit for root) Example: `K15`
- `limit` (query, optional, string) — Max results (1-200) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/poland-stats-api/v1/subjects?parent=K15&limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "total": 5,
        "parent": "K15",
        "subjects": [
            {
                "id": "G186",
                "name": "PRICES IN AGRICULTURE",
                "children": [
                    "P1458",
                    "P1459",
                    "P1460",
                    "P2967",
                    "P2968",
                    "P3155",
                    "P3156",
                    "P3183",
                    "P3415"
                ],
                "has_variables": false
            },
            {
                "id": "G188",
                "name": "AVERAGE RETAIL PRICES OF GOODS AND CONSUMER SERVICES",
                "children": [
                    "P1466",
                    "P1467",
                    "P1468",
                    "P1469",
                    "P1470",
                    "P1471",
                    "P1472",
                    "P1473",
                    "P2917"
                ],
                "has_variables": false
            },
            {
                "id": "G189",
                "name": "AVERAGE RETAIL PRICES OF NON-CONSUMER GOODS",
                "children": [
                    "P1474"
                ],
                "has_variables": false
            },
            {
                "id": "G187",
                "name": "AVERAGE PRODUCER'S PRICES ON DOMESTIC MARKET",
                "children": [
                    "P1461",
                    "P1462",
    
…(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/poland-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "variable takes a BDL variable id (e.g. 217230); subjects parent takes a subject id (e.g. K15 = Prices).",
        "source": "Statistics Poland (Główny Urząd Statystyczny, GUS) — Local Data Bank (BDL)",
        "upstream": "https://bdl.stat.gov.pl/api/v1",
        "endpoints": [
            "/v1/cpi",
            "/v1/variable",
            "/v1/search",
            "/v1/subjects",
            "/v1/meta"
        ],
        "description": "Keyless gateway over GUS's BDL REST API. /v1/cpi gives the latest Polish consumer price index (previous year = 100); /v1/variable fetches any BDL variable's national series; /v1/search finds variables by name; /v1/subjects browses the subject tree.",
        "cpi_variable": 217230,
        "documentation": "https://poland-stats-api.oanor.dev"
    },
    "meta": {
        "timestamp": "2026-06-15T11:14:32.249Z",
        "request_id": "59f32ddd-2b21-4b39-9ac9-8aacc3dc347d"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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