Skip to content

GET /geo/place/{id}

Returns structured data for a single place by its numeric ID. IDs are returned by /geo/resolve and /geo/search.

Costs 1 credit per request.

GET /geo/place/{id}
Authorization: Bearer gaz_<api-key>
ParameterTypeDescription
idintegerNumeric place ID

The response includes the place itself plus its full administrative hierarchy as a nested parent chain, ending in parent: null at the root.

{
"id": 3457419,
"name": "Mato Grosso",
"type": "state",
"lat": -12.5,
"lon": -55.5,
"population": 3526220,
"parent": {
"id": 3469034,
"name": "Brazil",
"type": "country",
"parent": {
"id": 1,
"name": "World",
"type": "world",
"parent": null
}
}
}

The leaf (the requested place) has the full payload:

FieldTypeDescription
idintegerUnique place identifier
namestringOfficial place name
typestringworld | country | state | city
latfloat | nullLatitude
lonfloat | nullLongitude
populationintegerPopulation count
parentobject | nullNext level up in the hierarchy, or null at the root

Each ancestor in the chain has only the identification fields plus its own parent:

FieldTypeDescription
idintegerPlace identifier
namestringOfficial place name
typestringworld | country | state | city
parentobject | nullNext level up, or null at the root

To walk the chain in code, follow .parent until you hit null.

StatusDescription
401Missing or invalid API key
402Insufficient credits
404Place ID not found
429Rate limit exceeded
Terminal window
curl https://api.gazetteer.dev/geo/place/3469034 \
-H "Authorization: Bearer gaz_..."
{
"id": 3469034,
"name": "Brazil",
"type": "country",
"lat": -10.0,
"lon": -55.0,
"population": 214300000,
"parent": {
"id": 1,
"name": "World",
"type": "world",
"parent": null
}
}