# North Macedonia Statistics API
> Official North Macedonian inflation statistics straight from the State Statistical Office (MAKStat) via its ASKdata-style PxWeb open-data service — no key, read live. The cpi endpoint returns the headline Consumer Price Index inflation for the latest month — the month-on-month and year-on-year percentage changes (ECOICOP version 2 classification) — derived from the official ratio table. The cpi/series endpoint returns the historical monthly MoM and YoY series over the last N months, ready to chart. The cpi/groups endpoint breaks the latest year-on-year inflation down across all thirteen COICOP main groups (food, housing, transport and so on). The cpi/group endpoint returns the full MoM and YoY history for any single COICOP group by its code. The meta endpoint documents the COICOP group codes and source. Live data from MAKStat PxWeb, lightly cached. Live. 5 endpoints. This serves North Macedonian national price statistics; for the denar exchange rate use an FX / central-bank 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/macedonia-stats-api/..."
```

## Pricing
- **Free** (Free) — 260 calls/Mo, 2 req/s
- **Basic** ($12/Mo) — 18,700 calls/Mo, 6 req/s
- **Pro** ($31/Mo) — 95,500 calls/Mo, 22 req/s
- **Mega** ($69/Mo) — 433,000 calls/Mo, 55 req/s

## Endpoints

### Inflation

#### `GET /v1/cpi` — North Macedonia CPI (latest month): MoM and YoY

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

**Response:**
```json
{
    "data": {
        "note": "Index 2015=100 base table publishes month-on-month and year-on-year ratios; values are percentage changes.",
        "period": "2026M05",
        "source": "State Statistical Office of North Macedonia (MAKStat, table 121)",
        "country": "North Macedonia",
        "indicator": "Consumer Price Index (Total, ECOICOP v2)",
        "period_iso": "2026-05",
        "change_mom_pct": 0.64,
        "change_yoy_pct": 4.75
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:33.375Z",
        "request_id": "fb2b6c64-54bb-4172-bf14-955c448906c3"
    },
    "status": "ok",
    "message": "North Macedonia CPI retrieved",
    "success": true
}
```

#### `GET /v1/cpi/group` — Full MoM + YoY history for one COICOP group

**Parameters:**
- `group` (query, optional, string) — COICOP code: 001 Total, 002 Food .. 014 (see /v1/meta) Example: `001`
- `months` (query, optional, string) — Number of recent months (default 24, max 120) Example: `24`

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

**Response:**
```json
{
    "data": {
        "count": 24,
        "group": "001",
        "label": "Total",
        "series": [
            {
                "period": "2024M06",
                "period_iso": "2024-06",
                "change_mom_pct": -0.27,
                "change_yoy_pct": 3.24
            },
            {
                "period": "2024M07",
                "period_iso": "2024-07",
                "change_mom_pct": 0.74,
                "change_yoy_pct": 2.95
            },
            {
                "period": "2024M08",
                "period_iso": "2024-08",
                "change_mom_pct": 0.5,
                "change_yoy_pct": 2.24
            },
            {
                "period": "2024M09",
                "period_iso": "2024-09",
                "change_mom_pct": 0.28,
                "change_yoy_pct": 2.59
            },
            {
                "period": "2024M10",
                "period_iso": "2024-10",
                "change_mom_pct": -0.7,
                "change_yoy_pct": 3.46
            },
            {
                "period": "2024M11",
                "period_iso": "2024-11",
                "change_mom_pct": 0.96,
                "change_yoy_pct": 4.3
            },
            {
                "period": "2024M12",
                "period_iso": "2024-12",
                "change_mom_pct": 0.31,
                "change_yoy_pct": 4.39
            },
            {
                "period": "2025M01",
                "period_iso": "2025-01",

…(truncated, see openapi.json for full schema)
```

#### `GET /v1/cpi/groups` — Latest YoY inflation across all 13 COICOP groups

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

**Response:**
```json
{
    "data": {
        "count": 13,
        "groups": [
            {
                "group": "002",
                "label": "01 Food & non-alcoholic beverages",
                "change_yoy_pct": 4.74
            },
            {
                "group": "003",
                "label": "02 Alcoholic beverages & tobacco",
                "change_yoy_pct": 9.33
            },
            {
                "group": "004",
                "label": "03 Clothing & footwear",
                "change_yoy_pct": 2.16
            },
            {
                "group": "005",
                "label": "04 Housing, water, electricity, gas & fuels",
                "change_yoy_pct": 2.88
            },
            {
                "group": "006",
                "label": "05 Furnishings & household equipment",
                "change_yoy_pct": 4.64
            },
            {
                "group": "007",
                "label": "06 Health",
                "change_yoy_pct": 1.82
            },
            {
                "group": "008",
                "label": "07 Transport",
                "change_yoy_pct": 11.03
            },
            {
                "group": "009",
                "label": "08 Information & communication",
                "change_yoy_pct": 2.79
            },
            {
                "group": "010",
                "label": "09 Recreation, sport & culture",
                "change_yoy_pct": 5.52
            },
            {
                "gro
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/cpi/series` — Historical monthly MoM + YoY series

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

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

**Response:**
```json
{
    "data": {
        "count": 24,
        "series": [
            {
                "period": "2024M06",
                "period_iso": "2024-06",
                "change_mom_pct": -0.27,
                "change_yoy_pct": 3.24
            },
            {
                "period": "2024M07",
                "period_iso": "2024-07",
                "change_mom_pct": 0.74,
                "change_yoy_pct": 2.95
            },
            {
                "period": "2024M08",
                "period_iso": "2024-08",
                "change_mom_pct": 0.5,
                "change_yoy_pct": 2.24
            },
            {
                "period": "2024M09",
                "period_iso": "2024-09",
                "change_mom_pct": 0.28,
                "change_yoy_pct": 2.59
            },
            {
                "period": "2024M10",
                "period_iso": "2024-10",
                "change_mom_pct": -0.7,
                "change_yoy_pct": 3.46
            },
            {
                "period": "2024M11",
                "period_iso": "2024-11",
                "change_mom_pct": 0.96,
                "change_yoy_pct": 4.3
            },
            {
                "period": "2024M12",
                "period_iso": "2024-12",
                "change_mom_pct": 0.31,
                "change_yoy_pct": 4.39
            },
            {
                "period": "2025M01",
                "period_iso": "2025-01",
                "change_mom_pct": 0.16,
          
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — API metadata + COICOP group codes

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

**Response:**
```json
{
    "data": {
        "api": "Statistics North Macedonia (MAKStat) API",
        "notes": "Live data from MAKStat PxWeb (json-stat2); MoM = (current/previous month -1), YoY = (current/same month previous year -1), derived from the official ratio table.",
        "source": "State Statistical Office of North Macedonia — MAKStat PxWeb API (makstat.stat.gov.mk)",
        "country": "North Macedonia",
        "endpoints": [
            "/v1/cpi",
            "/v1/cpi/series",
            "/v1/cpi/groups",
            "/v1/cpi/group",
            "/v1/meta"
        ],
        "coicop_groups": {
            "001": "Total",
            "002": "01 Food & non-alcoholic beverages",
            "003": "02 Alcoholic beverages & tobacco",
            "004": "03 Clothing & footwear",
            "005": "04 Housing, water, electricity, gas & fuels",
            "006": "05 Furnishings & household equipment",
            "007": "06 Health",
            "008": "07 Transport",
            "009": "08 Information & communication",
            "010": "09 Recreation, sport & culture",
            "011": "10 Education services",
            "012": "11 Restaurants & accommodation",
            "013": "12 Insurance & financial services",
            "014": "13 Personal care, social protection & misc"
        },
        "documentation": "https://macedonia-stats-api.oanor.dev",
        "primary_indicator": "Consumer Price Index by ECOICOP v2 (table 121) — month-on-month and year-on-year changes, To
…(truncated, see openapi.json for full schema)
```


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