A lighter GeoNames alternative for country data

GeoNames needs a username on every request and rate-limits its free server. If you only need country data, countries.dev is keyless and focused.

Back

GeoNames is a workhorse — millions of place names, postal codes, geocoding, elevation. If you need any of that, use it; there's no real substitute.

But plenty of people pull in GeoNames for one thing: country data. For that, it asks more of you than it needs to.

What GeoNames asks of you

  • A username on every request (?username=you). That's a signup, and it rides in the query string, so it lands in server logs and browser history.
  • The free server is rate-limited10,000 credits a day and 1,000 an hour per username. Fine until a crawler or a traffic spike burns the quota for everyone sharing it.
  • And the free server is, politely, not quick.

If you only need countries

curl https://countries.dev/alpha/BR

No username, nothing in the query string, no daily credit budget — and you get the whole record: capital, region, currencies, languages, calling codes, flag.

{ "name": "Brazil", "alpha2Code": "BR", "capital": "Brasília",
  "region": "Americas", "flag": "🇧🇷",
  "currencies": [{ "code": "BRL", "name": "Brazilian real", "symbol": "R$" }] }

Filter by region, currency, or language, and trim to the fields you actually use.

When to stick with GeoNames

Cities, postal codes, lat/long geocoding, "nearest place to these coordinates" — that's GeoNames' job, not ours. countries.dev stops at the country. If country-level is your ceiling, you don't need the username.

Written by

Dov Azencot

At

Tue Jun 23 2026