ipstack is a popular IP geolocation API, but the free plan is small, HTTPS is reserved for paid tiers, and every call needs an access key. countries.dev resolves IP-to-country over HTTPS, with no key.
IP → country, no key
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 access key, HTTPS by default, no sign-up — and CORS is open for browser calls. The full country record is attached, and you can POST up to 100 IPs at once.
Being straight about scope
countries.dev is country level — no city, region or ASN like ipstack's richer fields. If you need those, ipstack's paid tiers cover them; for country-level over HTTPS, countries.dev is free and keyless.
Switching over
ipstack returns country_code; countries.dev returns countryCode plus the country object. Drop the access_key parameter and remap.
See the IP geolocation API page for a live demo, or read the docs. Also compare the ip-api and ipinfo alternatives.
Written by
Dov Azencot
At
Fri Jun 26 2026