# BPS Statistics



Statistics Indonesia's own indicator register — browse the series the bureau publishes for the nation or a province, then read any indicator's observations.



## BPS Indicators

Browse Statistics Indonesia's indicator register — every series the bureau publishes for the nation or any province, with the id the data endpoint reads.

- Method: `GET`
- Path: `/v1/bps/indicators`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `domain` | string | optional | Four-digit BPS domain code — `0000` for national, `3100` for DKI Jakarta, and so on per province. |
| `page` | integer | optional | Indicator list page. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/bps/indicators \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "domain": "0000",
    "page": 1,
    "total": 1172,
    "indicators": [
      {
        "id": 1,
        "title": "Indeks Harga Konsumen",
        "definition": "Indeks yang menggambarkan perubahan harga dari suatu paket barang dan jasa yang dikonsumsi masyarakat dalam suatu periode tertentu.",
        "subject": "Harga Konsumen",
        "unit": "Indeks"
      }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T01:05:00.000Z",
    "age_seconds": 3600,
    "next_update_at": "2026-08-23T01:05:00.000Z"
  }
}
```

## BPS Indicator Data

One indicator's observations — the series behind an id from the indicator list, national or by province, from Statistics Indonesia's own API.

- Method: `GET`
- Path: `/v1/bps/data`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `var` | integer | required | Indicator id from the indicator list, e.g. `1` for the consumer price index. |
| `domain` | string | optional | Four-digit BPS domain code — `0000` for national, `3100` for DKI Jakarta. |
| `year` | integer | optional | One year to read, e.g. `2025`. Omit for the full series. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/bps/data \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "variable_id": 1,
    "title": "Indeks Harga Konsumen",
    "domain": "0000",
    "observations": [
      { "year": 2025, "value": 106.21 },
      { "year": 2024, "value": 100.59 }
    ]
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-22T01:05:00.000Z",
    "age_seconds": 3600,
    "next_update_at": "2026-08-23T01:05:00.000Z"
  }
}
```