GeoNames API alternative

GeoNames is a genuinely impressive free resource — millions of place names under a CC BY license, no cost to use within its request limits (10,000 credits/day, 1,000/hour per account). The tradeoff is an API surface that shows its age: dozens of separate endpoints (searchJSON, citiesJSON,findNearbyJSON...), inconsistent parameter naming between them, and no single "give me this city's name in my preferred language, falling back in priority order" parameter — you assemble that yourself from separate alternate-names calls.

To be fair to GeoNames: its sheer breadth (not just cities — postal codes, hydrography, administrative divisions down to obscure levels) and its permissive license make it a legitimate first stop, especially for one-off scripts or research. If you need that breadth and don't mind assembling it yourself, it's hard to beat for free.

Feature comparison

FeatureGeoNamesGeomelon
LicenseCC BY (attribution required)Data sourced from Wikidata (CC0); API access per RapidAPI terms
Free autocomplete without a keyNo — all endpoints require a username parameterYes — oneshot.geomelon.dev prefix search, no key, no auth
API surfaceDozens of task-specific endpointsOne /cities/search endpoint with filters
Language preference handlingSeparate alternate-names lookups, assembled client-sideSingle preferredLanguages parameter, priority-ordered
Response formatJSON or XML, varies by endpointJSON only, consistent shape
Static dataset downloadFull country dumps (large, unfiltered)Free population-ranked JSON per country, sized for quick use

Migration example

Searching for cities by name:

GeoNames:

curl --request GET \
  --url 'http://api.geonames.org/searchJSON?name_startsWith=Lon&featureClass=P&maxRows=10&username=YOUR_USERNAME'

Geomelon equivalent:

curl --request GET \
  --url 'https://geomelon.p.rapidapi.com/cities/search?name=lon&sort=population_desc&limit=10' \
  --header 'x-rapidapi-host: geomelon.p.rapidapi.com' \
  --header 'x-rapidapi-key: YOUR_API_KEY'

Both are fine choices depending on what you're building: reach for GeoNames when you need breadth (postal codes, hydrography, obscure administrative levels) and don't mind assembling the pieces yourself; reach for Geomelon when cities are the whole job and you want one endpoint, one response shape, and a language parameter that just works.

Try Geomelon free on RapidAPI Browse free city datasets