Skip to main content
GET
/
api
/
v1
/
metrics
Query numeric data
curl --request GET \
  --url https://data.kushiro.app/api/v1/metrics
{
  "metrics": [
    {
      "id": 1,
      "source_id": "kushiro_population_households_monthly",
      "metric": "population_total",
      "value": 163000,
      "unit": "persons",
      "period": {
        "granularity": "month",
        "start_date": "2026-04-01",
        "end_date": "2026-04-30",
        "label": "2026-04"
      },
      "town": null,
      "age_bucket": null,
      "category": null,
      "fetched_at": "2026-04-29T00:00:00.000Z",
      "raw_blob_key": "raw/kushiro_population_households_monthly/2026-04-29T00-00-00.000Z/file.xlsx"
    }
  ],
  "total": 1,
  "limit": 1000,
  "offset": 0
}

Query Parameters

source
string
required

Source ID to query.

Minimum string length: 1
metric
string[]

Metric name exact match, for example population_total or households_total. Repeat the parameter (?metric=a&metric=b) to match any of several metrics (IN/OR). Takes precedence over metric_prefix when both are given.

Maximum array length: 20
Minimum string length: 1
metric_prefix
string

Metric name prefix match, for example water_ to fetch every metric of one business line in a source that namespaces metrics by prefix. Ignored when metric is also supplied.

Minimum string length: 1
from
string

Inclusive lower bound for period.start_date in YYYY-MM-DD format.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-04-01"

to
string

Inclusive upper bound for period.end_date in YYYY-MM-DD format.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-04-01"

town
string

Exact match for a town name.

Minimum string length: 1
age
string

Exact match for an age label, for example 0歳 or 100歳以上.

Minimum string length: 1
category_kind
string

Exact match for a categorical axis kind (dim_category.kind), for example industry. Combine with category_code.

Minimum string length: 1
category_code
string

Exact match for a categorical axis code (dim_category.code), for example the major industry code E. Used together with category_kind.

Minimum string length: 1
limit
integer
default:1000

Maximum number of items to return. Defaults to 1000.

Required range: 1 <= x <= 10000
offset
integer
default:0

Number of items to skip. Defaults to 0.

Required range: x >= 0

Response

Metric query result.

metrics
object[]
required
total
integer
required
Required range: x >= 0
limit
integer
required
Required range: 1 <= x <= 10000
offset
integer
required
Required range: x >= 0