ipapi.co is a tidy IP geolocation API, but the free tier is capped to a small number of lookups per day and nudges you toward a paid plan. countries.dev resolves IP-to-country with no key and no per-day quota.
IP → country, no quota
curl https://countries.dev/ip # the caller's own IP
curl https://countries.dev/ip/8.8.8.8 # any IP{ "ip": "8.8.8.8", "countryCode": "US", "country": { "name": "United States of America", "flag": "🇺🇸" } }No key, no sign-up; responses are cached and CORS is open. Beyond the code you get the full country record — name, flag, currency, languages, calling code — and you can POST up to 100 IPs in one call.
Being straight about scope
countries.dev is country level — no city, region or ASN. For those, ipapi.co's paid tiers (or a city-level provider) fit. For country-level localization, routing and compliance, countries.dev covers it without a key or a daily cap.
Switching over
ipapi.co returns country_code; countries.dev returns countryCode plus the country object. Remap the field and go.
See the IP geolocation API live, read the docs, or compare with the country.is and ipinfo alternatives.
Written by
Dov Azencot
At
Fri Jun 26 2026