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 | GeoNames | Geomelon |
|---|---|---|
| License | CC BY (attribution required) | Data sourced from Wikidata (CC0); API access per RapidAPI terms |
| Free autocomplete without a key | No — all endpoints require a username parameter | Yes — oneshot.geomelon.dev prefix search, no key, no auth |
| API surface | Dozens of task-specific endpoints | One /cities/search endpoint with filters |
| Language preference handling | Separate alternate-names lookups, assembled client-side | Single preferredLanguages parameter, priority-ordered |
| Response format | JSON or XML, varies by endpoint | JSON only, consistent shape |
| Static dataset download | Full country dumps (large, unfiltered) | Free population-ranked JSON per country, sized for quick use |
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.