Country

Country is a privacy-conscious geolocation API that finds a user's country (and nothing else) from their IP address.

The public service hosted here at api.country.is is free to use. In other words, no API keys or usage quotas.

Country is open-source.

Usage

Country has a minimal :fire: interface.

Let your browser or application query its own IP address.

https://api.country.is

Or query any IP address.

https://api.country.is/9.9.9.9

The API also works with IPv6 addresses.

https://api.country.is/::ffff:909:909

Check the age of the underlying data file.

https://api.country.is/version

Country automatically checks for new data every 24 hours.

Deployment

If you prefer not to use the hosted service, run your own private server with Docker.

Notes

Country uses GeoLite2 data created by MaxMind. Since 30 December 2019, you need to register for a license key to download their data if you're running a private instance.