Country is an open-source and privacy-conscious geolocation API that gets your users' country (and nothing else) from their IP.
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!
If you prefer not to use the hosted service, run Country privately with Docker.
docker run -d -p 3000:3000 hakanensari/country
Country uses GeoLite2 data created by MaxMind. The hosted service does not log requests.