Skip to main content
GET
Look up locations

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

level
enum<string>

Scope the results to a single level of the taxonomy. Cannot be combined with parent_id. At least one of level, query, or parent_id is required.

Available options:
region,
subregion,
country,
state,
county,
city
query
string

A case-insensitive prefix match on the location name — cal matches "California", but ifornia does not. Must be at least 2 characters.

On its own, query searches all six levels. Combined with level or parent_id, it narrows those results instead.

Minimum string length: 2
parent_id
integer

Return only the direct children of this location — never grandchildren. Requires parent_level, because ids are unique only within a level. Cannot be combined with level. At least one of level, query, or parent_id is required.

parent_level
enum<string>

The level that parent_id belongs to. Required whenever parent_id is provided, and ignored otherwise.

Available options:
region,
subregion,
country,
state,
county,
city
limit
integer
default:100

How many results to return, from 1 to 500. A value outside that range is rejected rather than clamped, so the page size you asked for is always the page size you got.

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

How many results to skip. Combined with limit and the total reported in pagination, this walks the whole result set.

Required range: x >= 0

Response

A JSON object containing the matching locations.

name
string

The name of this result set.

Example:

"Locations"

pagination
object

Where this page sits in the full result set. total counts every match for the query, not just this page, so you can page through deterministically rather than requesting until a short page comes back.

results
object[]

The matching locations, capped at 500 entries and ordered coarsest level first, then cities by population descending.