Skip to main content
GET
/
api
/
v1
/
points
/
facets
Aggregate facility/location data
curl --request GET \
  --url https://data.kushiro.app/api/v1/points/facets
{
  "source": "kushiro_council_decisions",
  "group_by": "bill_type",
  "buckets": [
    {
      "value": "予算",
      "count": 423
    }
  ],
  "total": 4523,
  "truncated": false
}

Query Parameters

source
string
required

Source ID to query.

Minimum string length: 1
group_by
string
required

Aggregation axis: category or an attribute key whitelisted for the source.

Minimum string length: 1
category
string

Pre-filter by exact point category.

Minimum string length: 1
name_contains
string

Pre-filter by name substring (same semantics as on /api/v1/points).

Minimum string length: 1
address_contains
string

Pre-filter by address substring (same semantics as on /api/v1/points).

Minimum string length: 1
bbox_south
number

South edge latitude of the bounding box (supply all four bbox parameters).

Required range: -90 <= x <= 90
bbox_north
number

North edge latitude of the bounding box.

Required range: -90 <= x <= 90
bbox_west
number

West edge longitude of the bounding box.

Required range: -180 <= x <= 180
bbox_east
number

East edge longitude of the bounding box.

Required range: -180 <= x <= 180
limit
integer
default:100

Maximum number of buckets to return. Defaults to 100.

Required range: 1 <= x <= 1000

Response

Point facet aggregation result.

source
string
required
group_by
string
required
buckets
object[]
required
total
integer
required

Total matching rows after filtering (independent of bucket truncation).

Required range: x >= 0
truncated
boolean
required

True when bucket cardinality exceeded limit.