# Philippines Statistics API
> Official Philippine economic statistics straight from the Philippine Statistics Authority (PSA) via its OpenSTAT open-data service — no key, read live. The cpi endpoint returns the headline Consumer Price Index (all items, all income households, base 2018=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/divisions endpoint breaks the latest CPI down across all thirteen COICOP divisions (food, housing, transport and so on) with index and annual change for each. The cpi/regions endpoint gives the latest All-Items CPI for the National Capital Region and every administrative region and province, so you can see where prices bite hardest. The meta endpoint documents the source. Live data from PSA OpenSTAT, lightly cached. Live. 5 endpoints. This serves Philippine national statistics; for the peso exchange rate or PSE equities use an FX / stock-exchange 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/philippines-stats-api/..."
```

## Pricing
- **Free** (Free) — 270 calls/Mo, 2 req/s
- **Basic** ($11/Mo) — 19,200 calls/Mo, 6 req/s
- **Pro** ($30/Mo) — 97,500 calls/Mo, 22 req/s
- **Mega** ($66/Mo) — 442,000 calls/Mo, 55 req/s

## Endpoints

### Inflation

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

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

**Response:**
```json
{
    "data": {
        "base": "2018 = 100",
        "index": 135.8,
        "period": "2026 May",
        "source": "Philippine Statistics Authority (PSA OpenSTAT, 2018-based)",
        "country": "Philippines",
        "indicator": "Consumer Price Index, All Items (all income households)",
        "period_iso": "2026-05",
        "change_mom_pct": -0.51,
        "change_yoy_pct": 6.76
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:35.268Z",
        "request_id": "39a35483-2566-4074-a51a-bfb40aa1b800"
    },
    "status": "ok",
    "message": "Philippines CPI retrieved",
    "success": true
}
```

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

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

**Response:**
```json
{
    "data": {
        "base": "2018 = 100",
        "count": 13,
        "period": "2026 May",
        "source": "PSA OpenSTAT (2018-based)",
        "country": "Philippines",
        "divisions": [
            {
                "index": 137.2,
                "label": "01 Food & non-alcoholic beverages",
                "coicop": "01",
                "change_yoy_pct": 5.7
            },
            {
                "index": 193.5,
                "label": "02 Alcoholic beverages & tobacco",
                "coicop": "02",
                "change_yoy_pct": 5.45
            },
            {
                "index": 123.9,
                "label": "03 Clothing & footwear",
                "coicop": "03",
                "change_yoy_pct": 2.99
            },
            {
                "index": 132.2,
                "label": "04 Housing, water, electricity, gas & fuels",
                "coicop": "04",
                "change_yoy_pct": 7.83
            },
            {
                "index": 128.7,
                "label": "05 Furnishings & household equipment",
                "coicop": "05",
                "change_yoy_pct": 3.87
            },
            {
                "index": 130.8,
                "label": "06 Health",
                "coicop": "06",
                "change_yoy_pct": 4.06
            },
            {
                "index": 148.6,
                "label": "07 Transport",
                "coicop": "07",
                "change_yoy_pct": 16.18

…(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/philippines-stats-api/v1/cpi/series?months=24"
```

**Response:**
```json
{
    "data": {
        "base": "2018 = 100",
        "count": 24,
        "series": [
            {
                "index": 125.6,
                "period": "2024 Jun",
                "period_iso": "2024-06",
                "change_yoy_pct": 3.72
            },
            {
                "index": 126.5,
                "period": "2024 Jul",
                "period_iso": "2024-07",
                "change_yoy_pct": 4.37
            },
            {
                "index": 126.6,
                "period": "2024 Aug",
                "period_iso": "2024-08",
                "change_yoy_pct": 3.35
            },
            {
                "index": 126.3,
                "period": "2024 Sep",
                "period_iso": "2024-09",
                "change_yoy_pct": 1.94
            },
            {
                "index": 126.5,
                "period": "2024 Oct",
                "period_iso": "2024-10",
                "change_yoy_pct": 2.26
            },
            {
                "index": 127,
                "period": "2024 Nov",
                "period_iso": "2024-11",
                "change_yoy_pct": 2.5
            },
            {
                "index": 127.7,
                "period": "2024 Dec",
                "period_iso": "2024-12",
                "change_yoy_pct": 2.9
            },
            {
                "index": 128.4,
                "period": "2025 Jan",
                "period_iso": "2025-01",
                "change_yoy_pct": 2.88

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

### Regions

#### `GET /v1/cpi/regions` — Latest All-Items CPI by region/area

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

**Response:**
```json
{
    "data": {
        "base": "2018 = 100",
        "count": 29,
        "period": "2026 May",
        "source": "PSA OpenSTAT (2018-based)",
        "country": "Philippines",
        "regions": [
            {
                "index": 130.2,
                "region": "National Capital Region (NCR)"
            },
            {
                "index": 137.2,
                "region": "Areas Outside National Capital Region (AONCR)"
            },
            {
                "index": 135.4,
                "region": "Cordillera Administrative Region (CAR)"
            },
            {
                "index": 137.6,
                "region": "Abra"
            },
            {
                "index": 133.9,
                "region": "Benguet"
            },
            {
                "index": 137.3,
                "region": "Ifugao"
            },
            {
                "index": 135.3,
                "region": "Kalinga"
            },
            {
                "index": 144.3,
                "region": "Mountain Province"
            },
            {
                "index": 144.1,
                "region": "Apayao"
            },
            {
                "index": 132.8,
                "region": "City of Baguio"
            },
            {
                "index": 133,
                "region": "Region I (Ilocos Region)"
            },
            {
                "index": 130.4,
                "region": "Ilocos Norte"
            },
            {

…(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/philippines-stats-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "api": "Statistics Philippines (PSA) API",
        "notes": "Live data from PSA OpenSTAT (CSV format; json-stat2 is unreliable on this server). YoY and MoM computed from the index series.",
        "source": "Philippine Statistics Authority — OpenSTAT PxWeb API (openstat.psa.gov.ph)",
        "country": "Philippines",
        "endpoints": [
            "/v1/cpi",
            "/v1/cpi/series",
            "/v1/cpi/divisions",
            "/v1/cpi/regions",
            "/v1/meta"
        ],
        "documentation": "https://philippines-stats-api.oanor.dev",
        "primary_indicator": "CPI All Items (2018-based, table 0012M4ACP22, overall + 13 COICOP divisions + regions)"
    },
    "meta": {
        "timestamp": "2026-06-15T20:40:35.644Z",
        "request_id": "51dd0f4c-022d-4481-98c2-d99952a9c814"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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