Count

Count: Area

GET/v1/count/area

Exact published count for one area: all places, or the places in one category (Any membership).

Authentication
Workspace API key: Authorization: Bearer YOUR_API_KEY
Price
1,000 credits ($0.001 per request)1,000 credits per successful request.

Try in PlaygroundOpens the request in the Playground. Nothing runs until you choose Run.

Parameters

ParameterType and limitsDescription
countryrequiredstringISO 3166-1 alpha-2 country code.
stateoptionalstringAdmin1 name (Admin1 area).
cityoptionalstringAdmin2 name; requires state (Admin2 area).
h3_celloptionalstringOne H3 resolution 8 cell (15 hex characters); not combined with state/city.
poi_validityoptionalstringOne of all, valid, uncertain, invalid, unknowndefault allValidity bucket; unknown is places without an assessment.
category_idoptionalstringExactly one category ID; counts places whose category_ids contain it.

Response

JSON. The example on the right shows the shape with illustrative values.

  • X-Request-Id: Server-generated ID of this request; quote it to support.
  • X-Credits-Charged: Credits actually debited for this request (0 when nothing was charged).
  • Retry-After: 429 only: seconds until the rate window ends.

Errors

StatusMeaning
401Missing, invalid or revoked API key (WWW-Authenticate: Bearer). Not charged.
402Insufficient credits: the wallet cannot cover the operation's base price before the call, or the actual price of the result at debit time (for example a large page). Nothing is charged; top up and retry.
404Country dataset or place not found. Not charged.
422Invalid parameter or combination, or an invalid cursor. Not charged.
429Workspace rate limit exceeded; retry after Retry-After seconds. Not charged.
502Upstream error or unexpected response. Not charged.
504Upstream timeout. Not charged.

Errors are JSON, {"detail": "..."}. See Errors and rate limits.