A free IP geolocation API with no key

Most IP geolocation APIs need a token or cap you fast. countries.dev resolves an IP to its full country record over HTTPS — no key, no signup.

Back

If you only need a visitor's country from their IP, the popular options make you work for it:

  • ipinfo.io — free, but you need an access token, which means an account.
  • ipapi.co — about 1,000 lookups a day on the free trial, then a key.
  • ip-api.comno key, but it's HTTP-only on the free plan, capped at 45 requests a minute, and non-commercial only.

They're all fine for what they are — and they do city, ISP, and ASN, which is more than "what country is this." But if country is all you're after, that's a lot of signup for a two-letter code.

The keyless option

curl https://countries.dev/ip/8.8.8.8

No token, no account, HTTPS — and you get the full country record, not just "US":

{ "ip": "8.8.8.8", "countryCode": "US",
  "country": { "name": "United States of America", "flag": "🇺🇸",
               "currencies": [{ "code": "USD", "symbol": "$" }] } }

Omit the IP to geolocate the caller, or POST an array to look up to 100 at once. It's all in the docs.

Where it stops

countries.dev is country-level only — no city, no ISP, no ASN. That's the trade for keyless and free. Need street-level accuracy or network data? Use one of the above. Need the visitor's country and everything about it? You're set.

Written by

Dov Azencot

At

Sun Jun 21 2026