GeoNames API Alternative
GeoNames is an encyclopedic geographic database with 11 million place names — but it returns XML by default, uses username-based credits, and has no exchange rates or IP geolocation on the free tier. ApogeoAPI provides a clean, always-JSON REST API with countries, cities, states, IP geo, and live FX rates in one subscription.
Always JSON
No XML parsing, no format suffixes. ApogeoAPI returns clean JSON on every endpoint with ISO-standard country codes.
IP Geo included free
GeoNames IP geo requires a paid plan. ApogeoAPI includes IP geolocation on the free tier with 1,000 requests/month.
Exchange rates bundled
One API key covers countries, cities, IP geo, and live exchange rates for 161 currencies — GeoNames has no FX endpoint.
GeoNames vs ApogeoAPI
| Feature | GeoNames | ApogeoAPI |
|---|---|---|
| Data format | XML (default), JSON on some endpoints | ✅ Always JSON |
| Authentication | Username (free registration) | ✅ API key header |
| Countries database | ✅ ~250 countries | ✅ 250 countries, full details |
| Cities database | ✅ 11M+ place names | ✅ 150k+ cities (major cities) |
| States / regions | ✅ Administrative divisions | ✅ States + regions |
| IP Geolocation | ✅ Separate endpoint (paid) | ✅ Included in free tier |
| Live exchange rates | ❌ No | ✅ 161 currencies, refreshed 4 h |
| Free tier requests | 30,000 credits / day | 1,000 req / month (all endpoints) |
| HTTPS on free plan | ✅ Yes | ✅ Always HTTPS |
| Response schema | GeoNames-specific (geonameId) | ISO-standard codes (iso2, iso3) |
| Uptime SLA | ❌ Best-effort | 99% (Basic+) |
When GeoNames wins
- • You need exhaustive geographic data (11M+ place names, mountains, rivers, etc.)
- • You're building a geocoding or place-search feature with granular results
- • You need historical or alternative place names in many languages
- • Academic or research use cases where breadth > production reliability
When ApogeoAPI wins
- • You need a production REST API with SLA and JSON responses
- • Your app needs IP geolocation + country data + exchange rates together
- • You prefer ISO country codes (iso2, iso3) over GeoNames IDs
- • You want one API key, one bill, one consistent schema
Migrate from GeoNames cities search
// Before (GeoNames — XML by default, JSON suffix needed)
const res = await fetch(
'http://api.geonames.org/searchJSON?q=Berlin&maxRows=5&username=YOUR_USERNAME'
);
const { geonames } = await res.json();
// geonames[0].name, geonames[0].countryCode, geonames[0].geonameId
// After (ApogeoAPI — clean JSON, ISO codes)
const res = await fetch(
'https://api.apogeoapi.com/v1/cities?q=Berlin&limit=5',
{ headers: { 'X-API-Key': 'YOUR_KEY' } }
);
const { data } = await res.json();
// data[0].name, data[0].country_code, data[0].country_nameFrequently Asked Questions
Is GeoNames API free?
GeoNames provides free access with a registered username (required). The free tier allows 30,000 credits per day. The service returns XML by default; JSON is available on some endpoints with a suffix (e.g., /searchJSON). Commercial use beyond free limits requires a premium account.
What format does GeoNames return data in?
GeoNames defaults to XML responses. JSON is available on most endpoints by appending JSON to the endpoint name (e.g., /citiesJSON instead of /cities). The schema is verbose and includes GeoNames-specific identifiers (geonameId) that require mapping to standard country codes.
What does ApogeoAPI offer that GeoNames does not?
ApogeoAPI provides: (1) always-JSON responses with clean, predictable schemas; (2) IP geolocation endpoint; (3) live exchange rates for 161 currencies; (4) built-in rate limiting with an API key instead of username-based credits; (5) a 99% uptime SLA. GeoNames has broader geographic coverage (11 million place names) but is better suited to academic or enrichment use cases than production APIs.
Clean JSON API — free to start
1,000 requests/month free. Full-access 14-day trial on sign-up. No credit card needed.
Get your free API key