Public APIs
Country favicon

Country

Geocoding

Get your visitor's country from their IP.

Country's website screenshot

About Country

Country is an IP-to-country geolocation API accessible at api.country.is without requiring an API key. Given an IP address, it returns the corresponding country, and can optionally return additional fields such as city, continent, subdivision, postal code, coordinates, and ASN via query parameters. It supports single lookups by GET request, either for the caller's own IP or a specified IPv4/IPv6 address, as well as batch lookups of up to 100 addresses via a POST request with a JSON array.

The underlying data comes from MaxMind GeoLite2, refreshed daily, with Cloudflare geolocation used when available. The service applies a rate limit of 10 requests per second per IP and returns standard HTTP status codes for errors such as invalid input, no data found, or rate limiting exceeded. It is free for commercial use and does not log requests.

The project is open source and available on GitHub, and can be self-hosted via Docker using a MaxMind account ID and license key. It has been running since 2015, and the documentation suggests self-hosting for high-volume server-side use or critical applications requiring full control.

Key features

  • Maps IP addresses to country, city, continent, subdivision, postal code, coordinates, and ASN
  • Single IP lookup via GET /{ip} for IPv4 or IPv6 addresses
  • Batch lookup of up to 100 IPs in one POST request
  • Optional extra fields via ?fields= query parameter
  • Self-hostable via Docker using MaxMind GeoLite2 credentials
  • Metadata endpoint (/info) shows when data was last updated

Frequently asked questions

Is it free to use?

Yes, api.country.is is free and requires no API key, including for commercial use.

Are there rate limits?

There are no quotas, but the infrastructure rate-limits to 10 requests per second per IP to prevent abuse.

Where does the geolocation data come from?

Data comes from MaxMind GeoLite2, updated daily, with Cloudflare geolocation used when available.

Can I self-host it?

Yes, the app is open source and can be self-hosted via Docker using your own MaxMind account credentials.

Does the service log requests?

No, the service does not log requests.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product