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 is free to use. In other words, no API keys or usage quotas.

Country is open-source.


Country has a minimal :fire: interface.

Let your browser or application query its own IP address.

Or query any IP address.

The API also works with IPv6 addresses.

Check the age of the underlying data file.

Country automatically checks for new data every 24 hours.


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


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.