GET /geo/place/{id}/children
Returns the immediate children of a place — one level down in the administrative hierarchy. Useful for building drill-down navigation (e.g. listing all states in a country, or all cities in a state).
IDs are returned by /geo/resolve and /geo/search.
Costs 1 credit per request.
Request
Section titled “Request”GET /geo/place/{id}/childrenAuthorization: Bearer gaz_<api-key>Path Parameters
Section titled “Path Parameters”| Parameter | Type | Description |
|---|---|---|
id | integer | Numeric place ID |
Response
Section titled “Response”An array of direct children, ordered by population descending then name. Returns an empty array [] for leaf places (cities).
[ { "id": 3457419, "name": "Mato Grosso", "type": "state", "lat": -12.5, "lon": -55.5, "population": 3526220 }, { "id": 3448433, "name": "São Paulo", "type": "state", "lat": -22.25, "lon": -48.5, "population": 44396484 }]Fields
Section titled “Fields”| 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 | null | Population count |
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 |
Examples
Section titled “Examples”List all countries in the world:
curl https://api.gazetteer.dev/geo/place/1/children \ -H "Authorization: Bearer gaz_..."[ { "id": 1269750, "name": "India", "type": "country", "lat": 20.0, "lon": 77.0, "population": 1380004385 }, { "id": 1814991, "name": "China", "type": "country", "lat": 35.0, "lon": 105.0, "population": 1439323776 }, { "id": 3469034, "name": "Brazil", "type": "country", "lat": -10.0, "lon": -55.0, "population": 214300000 }]List all states in Brazil:
curl https://api.gazetteer.dev/geo/place/3469034/children \ -H "Authorization: Bearer gaz_..."[ { "id": 3448433, "name": "São Paulo", "type": "state", "lat": -22.25, "lon": -48.5, "population": 44396484 }, { "id": 3453280, "name": "Minas Gerais", "type": "state", "lat": -18.5, "lon": -44.5, "population": 21292666 }, { "id": 3457419, "name": "Mato Grosso", "type": "state", "lat": -12.5, "lon": -55.5, "population": 3526220 }]Call /geo/place/{id} on any child to get its full ancestor chain.