# Mongolia Statistics API
> Official Mongolian inflation statistics straight from the National Statistics Office of Mongolia (NSO) via its 1212.mn PxWeb open-data service — no key, read live. The cpi endpoint returns the headline national Consumer Price Index (Overall index, base 2023=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 CPI index and year-on-year rate over the last N months, ready to chart. The cpi/groups endpoint breaks the latest CPI down across all thirteen COICOP groups (food, housing, transport and so on) with index and annual change for each. The cpi/annual endpoint gives the annual-average CPI and average inflation for every year on record. The meta endpoint documents the source. Live data from Mongolia NSO PxWeb, lightly cached. Live. 5 endpoints. This serves Mongolian national price statistics; for the tugrik 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/mongolia-stats-api/..."
```

## Pricing
- **Free** (Free) — 250 calls/Mo, 2 req/s
- **Basic** ($11/Mo) — 18,100 calls/Mo, 6 req/s
- **Pro** ($29/Mo) — 94,500 calls/Mo, 22 req/s
- **Mega** ($65/Mo) — 427,000 calls/Mo, 55 req/s

## Endpoints

### Inflation

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

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

**Response:**
```json
{
    "data": {
        "base": "2023 = 100",
        "index": 127.1,
        "period": "2026-05",
        "source": "National Statistics Office of Mongolia (1212.mn, table DT_NSO_0600_001V3)",
        "country": "Mongolia",
        "indicator": "Consumer Price Index (Overall index)",
        "change_mom_pct": 1.19,
        "change_yoy_pct": 11.1
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:32.384Z",
        "request_id": "9176ce9f-8695-488a-92ad-66f93a605e4c"
    },
    "status": "ok",
    "message": "Mongolia CPI retrieved",
    "success": true
}
```

#### `GET /v1/cpi/annual` — Annual-average CPI + inflation per year

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

**Response:**
```json
{
    "data": {
        "base": "2023 = 100",
        "count": 17,
        "years": [
            {
                "year": "2010",
                "months": 12,
                "average_index": 35.52
            },
            {
                "year": "2011",
                "months": 12,
                "average_index": 38.63,
                "annual_avg_change_pct": 8.76
            },
            {
                "year": "2012",
                "months": 12,
                "average_index": 43.98,
                "annual_avg_change_pct": 13.85
            },
            {
                "year": "2013",
                "months": 12,
                "average_index": 48.65,
                "annual_avg_change_pct": 10.62
            },
            {
                "year": "2014",
                "months": 12,
                "average_index": 54.94,
                "annual_avg_change_pct": 12.93
            },
            {
                "year": "2015",
                "months": 12,
                "average_index": 58.67,
                "annual_avg_change_pct": 6.79
            },
            {
                "year": "2016",
                "months": 12,
                "average_index": 59.13,
                "annual_avg_change_pct": 0.78
            },
            {
                "year": "2017",
                "months": 12,
                "average_index": 61.66,
                "annual_avg_change_pct": 4.28
            },
            {
                "year": "201
…(truncated, see openapi.json for full schema)
```

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

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

**Response:**
```json
{
    "data": {
        "base": "2023 = 100",
        "count": 13,
        "groups": [
            {
                "group": "1",
                "index": 144.9,
                "label": "Food and non-alcoholic beverages",
                "change_yoy_pct": 23.32
            },
            {
                "group": "2",
                "index": 119.4,
                "label": "Alcoholic  beverages, tobacco",
                "change_yoy_pct": 11.48
            },
            {
                "group": "3",
                "index": 122.4,
                "label": "Clothing, footwear and cloth",
                "change_yoy_pct": 6.81
            },
            {
                "group": "4",
                "index": 128.6,
                "label": "Housing, water, electricity and fuels",
                "change_yoy_pct": 1.66
            },
            {
                "group": "5",
                "index": 120.1,
                "label": "Furnishings, household equipment",
                "change_yoy_pct": 7.91
            },
            {
                "group": "6",
                "index": 116.3,
                "label": "Health",
                "change_yoy_pct": 7.09
            },
            {
                "group": "7",
                "index": 108.5,
                "label": "Transport",
                "change_yoy_pct": 5.75
            },
            {
                "group": "8",
                "index": 103.1,
                "label": "Communication",
       
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/cpi/series` — Historical CPI index + 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/mongolia-stats-api/v1/cpi/series?months=24"
```

**Response:**
```json
{
    "data": {
        "base": "2023 = 100",
        "count": 24,
        "series": [
            {
                "index": 105.9,
                "period": "2024-06",
                "change_yoy_pct": 4.54
            },
            {
                "index": 106,
                "period": "2024-07",
                "change_yoy_pct": 5.05
            },
            {
                "index": 107,
                "period": "2024-08",
                "change_yoy_pct": 6.15
            },
            {
                "index": 107,
                "period": "2024-09",
                "change_yoy_pct": 6.36
            },
            {
                "index": 107.5,
                "period": "2024-10",
                "change_yoy_pct": 6.54
            },
            {
                "index": 109.2,
                "period": "2024-11",
                "change_yoy_pct": 7.37
            },
            {
                "index": 110.5,
                "period": "2024-12",
                "change_yoy_pct": 8.33
            },
            {
                "index": 111.8,
                "period": "2025-01",
                "change_yoy_pct": 8.75
            },
            {
                "index": 113.4,
                "period": "2025-02",
                "change_yoy_pct": 9.57
            },
            {
                "index": 113.8,
                "period": "2025-03",
                "change_yoy_pct": 9.11
            },
            {
                "index": 114.1,
   
…(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/mongolia-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "api": "Statistics Mongolia (NSO) API",
        "notes": "Live data from Mongolia NSO PxWeb (json-stat2); year-on-year and month-on-month computed from the index series.",
        "source": "National Statistics Office of Mongolia — 1212.mn PxWeb API (data.1212.mn)",
        "country": "Mongolia",
        "endpoints": [
            "/v1/cpi",
            "/v1/cpi/series",
            "/v1/cpi/groups",
            "/v1/cpi/annual",
            "/v1/meta"
        ],
        "documentation": "https://mongolia-stats-api.oanor.dev",
        "primary_indicator": "National base Consumer Price Index (table DT_NSO_0600_001V3, base 2023=100, Overall + 13 COICOP groups)"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:32.734Z",
        "request_id": "faa218e7-747b-4165-8ae9-8b8e7e1c3848"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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