The Modern GeoNames Replacement
A developer-friendly JSON API for countries, regions, cities, postal codes, timezones, and IP geolocation. Cursor pagination, field selection, filtering, and spatial queries built in.
Live results from the same search index /v1/autocomplete uses. No API key needed.
- Countries & territories
- 250+
- Cities & towns
- 5.2M
- Postal codes
- 1.8M
- Multilingual names
- 19M
- API endpoints
- 25
One key, one header, clean JSON
{
"data": {
"iso2": "US",
"name": "United States",
"capital": "Washington",
"population": 331002651,
"area_km2": 9833520.0,
"currency_code": "USD",
"continent": "NA"
}
}
Everything an app needs from geography
Complete Geographic Data
Countries, regions, cities, postal codes, and timezones from GeoNames with structured JSON responses.
IP Geolocation
Look up any IP address for location data powered by MaxMind GeoLite2. Supports both IPv4 and IPv6.
Developer-First API
JSON responses, cursor-based pagination, field selection with ?fields=, and powerful filtering on every endpoint.
Blazing Fast
PostGIS-powered spatial queries, trigram search for fuzzy matching, and optimized indexes for sub-millisecond lookups.
Simple Pricing
Generous free tier with 5,000 requests/month. Transparent paid plans with no hidden fees or surprises.
API Key Auth
Secure, simple authentication via X-API-Key header. Create and manage keys from your dashboard.
25 endpoints, one consistent API
Every endpoint speaks the same envelope, pagination, and field selection.
Core data
Reference data for every place on Earth.
- GET/v1/countries
- GET/v1/regions
- GET/v1/cities
- GET/v1/postal-codes
- GET/v1/timezones
Search & autocomplete
Fuzzy, typo-tolerant, ranked by population.
- GET/v1/search
- GET/v1/autocomplete
Spatial
PostGIS-backed proximity and reverse geocoding.
- GET/v1/cities/nearby
- GET/v1/postal-codes/nearest
- GET/v1/reverse
Hierarchy & relations
Walk up, down, and across the place graph.
- GET/v1/cities/{id}/hierarchy
- GET/v1/regions/{id}/children
- GET/v1/countries/{code}/neighbors
Batch
Many lookups in one request — quota charged per entity.
- POST/v1/batch/cities
- POST/v1/batch/countries
- POST/v1/batch/regions
IP geolocation
IPv4 and IPv6, powered by MaxMind GeoLite2.
- GET/v1/ip/{address}
- GET/v1/ip/me
Official SDKs in five languages
Generated from the OpenAPI spec and published on every release, so they never drift from the API.
npm i @geoapi/client
pip install geoapi-python
go get github.com/brscimen/geoapi-sdks/go
gem install geoapi
composer require geoapi/geoapi-php
Why not just GeoNames?
GeoNames is a fantastic dataset — it's where much of our data comes from. GeoAPI is what its web services would look like designed today.
| GeoAPI | GeoNames free web services | |
|---|---|---|
| Response format | Structured JSON, everywhere | XML-first, JSON on some endpoints |
| Pagination | Cursor-based, stable | Offset (startRow) |
| Field selection | ?fields= on every endpoint | — |
| Batch lookups | POST /v1/batch/* | One request per lookup |
| IP geolocation | Built in | — |
| SDKs | 5 languages, spec-generated | Community wrappers |
| Rate limits | Clear per-second + monthly tiers | Hourly and daily credits |
Ready to get started?
Sign up for free and start making API calls in minutes.