Documentation navigation
Guides
Getting started Boundary searchAPI reference
Overview Health GET/v1/status Countries GET/v1/countries GET/v1/countries/{code} GET/v1/countries/{code}/regions GET/v1/countries/{code}/neighbors Regions GET/v1/regions GET/v1/regions/{id} GET/v1/regions/{id}/cities GET/v1/regions/{id}/children Cities GET/v1/cities GET/v1/cities/{id} GET/v1/cities/{id}/hierarchy GET/v1/cities/nearby Postal Codes GET/v1/postal-codes GET/v1/postal-codes/nearest Timezones GET/v1/timezones GET/v1/timezones/{tzId} IP Geolocation GET/v1/ip/{address} GET/v1/ip/me Search GET/v1/autocomplete GET/v1/reverse GET/v1/resolve GET/v1/search Boundaries GET/v1/boundaries/{geoname_id} Batch POST/v1/batch/cities POST/v1/batch/countries POST/v1/batch/regionsAPI reference
Geographic data REST API — modern replacement for GeoNames.
Serves countries, regions, cities, postal codes, timezones, and IP geolocation data through a fast, well-documented JSON API with cursor-based pagination and field selection.
Authentication
All endpoints (except health check) require an API key passed via the X-API-Key header.
Rate Limiting
Two independent limits apply to every authenticated request: a per-second
throttle and a monthly quota. They fail with different error codes because
they call for different client behaviour — rate_limit_exceeded means back
off for a moment, quota_exceeded means the plan's monthly allowance is
exhausted until the period resets.
Responses include rate limit headers:
X-RateLimit-Limit— requests per second allowedX-RateLimit-Remaining— requests remaining in current windowX-RateLimit-Reset— Unix epoch second at which the applicable limit resets. This is an absolute timestamp, not a duration. On aquota_exceededresponse it carries the end of the monthly quota period rather than the next second boundary.X-Monthly-RateLimit-Limit— monthly quotaX-Monthly-RateLimit-Remaining— monthly requests remainingX-RateLimit-Upgrade— advisory message, present only once monthly usage passes 80% of the plan's quotaRetry-After— seconds to wait before retrying. Present on both 429s and the unambiguous duration; prefer it over deriving one fromX-RateLimit-Reset.
Pagination
List endpoints use cursor-based pagination with cursor and limit parameters.
Maximum limit is 100. Responses include pagination metadata in the meta object.
Field Selection
Use ?fields=name,population on any endpoint to receive only the specified fields.
Endpoints by group
Countries
4 endpoints
- GET/v1/countries
- GET/v1/countries/{code}
- GET/v1/countries/{code}/regions
- GET/v1/countries/{code}/neighbors
Regions
4 endpoints
- GET/v1/regions
- GET/v1/regions/{id}
- GET/v1/regions/{id}/cities
- GET/v1/regions/{id}/children
Cities
4 endpoints
- GET/v1/cities
- GET/v1/cities/{id}
- GET/v1/cities/{id}/hierarchy
- GET/v1/cities/nearby