countriesnow.space is a free, keyless source of country, state and city data. If you'd rather pull full country records over plain GET requests — flags, ISO codes, currencies, languages and dial codes in one object — countries.dev covers that and the wider geo stack.
One country, one GET
curl https://countries.dev/alpha/US{ "name": "United States of America", "alpha2Code": "US", "flag": "🇺🇸", "capital": "Washington, D.C.", "currencies": [{ "code": "USD" }], "callingCodes": ["1"] }No key, no POST body, no data wrapper to unpack — the record comes back directly.
Build a country dropdown
curl "https://countries.dev/countries?fields=name,alpha2Code,flag&sort=name"That's everything a country dropdown needs, sorted and ready to map to <option>s.
More than countries
The same keyless API also covers cities (/cities), postal codes (/postal) and IP geolocation (/ip).
Switching over
countriesnow nests results under a data field and uses POST; countries.dev returns the records directly from a GET. Drop the request body and read the response straight. See the docs.
Written by
Dov Azencot
At
Fri Jun 26 2026