Country

Country is an open-source and privacy-conscious geolocation API that gets your users' country (and nothing else) from their IP.

Usage

The interface is minimal. Check it out by clicking on the examples below.

The root route queries the IP making the request.

GET https://api.country.is/ HTTP/1.1

Or query an IP explicitly.

GET https://api.country.is/9.9.9.9 HTTP/1.1

That's it!

Deployment

If you prefer not to use the hosted service, run Country privately with Docker.

docker run -d -p 3000:3000 hakanensari/country

Notes

Country uses GeoLite2 data created by MaxMind. The hosted service does not log requests.