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.
Request
Section titled “Request”GET /geo/place/{id}Authorization: Bearer gaz_<api-key>Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
id | integer | Numeric place ID |
Response
Section titled “Response”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 } }}Fields
Section titled “Fields”The leaf (the requested place) has the full payload:
| Field | Type | Description |
|---|---|---|
id | integer | Unique place identifier |
name | string | Official place name |
type | string | world | country | state | city |
lat | float | null | Latitude |
lon | float | null | Longitude |
population | integer | Population count |
parent | object | null | Next level up in the hierarchy, or null at the root |
Each ancestor in the chain has only the identification fields plus its own parent:
| Field | Type | Description |
|---|---|---|
id | integer | Place identifier |
name | string | Official place name |
type | string | world | country | state | city |
parent | object | null | Next level up, or null at the root |
To walk the chain in code, follow .parent until you hit null.
Error Responses
Section titled “Error Responses”| Status | Description |
|---|---|
401 | Missing or invalid API key |
402 | Insufficient credits |
404 | Place ID not found |
429 | Rate limit exceeded |
Example
Section titled “Example”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 }}