A free REST API to get location information for IP addresses.
3.137.183.14
Country | United States (US) |
Latitute | 37.751 |
Longitude | -97.822 |
All requests have to be HTTP GET requests in the following schema:
https://geoip.ximi.se/api/{ip}/{language}/{type}
ip | optional | Valid IP address in IPv4 or IPv6 format. |
language | optional | Two character language code like en or de. |
type | optional | Possible values are short to get a response conataining only most relevant data or full to get a response containing all available data. |
By default all responses are JSON encoded strings.
It is also possible to get JSONP responses for direct usage in javascripts. To get a JSONP response a callback function has to be provided within the request using the ?callback= parameter.
https://geoip.ximi.se/api
https://geoip.ximi.se/api/8.8.8.8
https://geoip.ximi.se/api/2a00:a200:0:f::888
https://geoip.ximi.se/api/8.8.8.8/full
https://geoip.ximi.se/api/87.79.99.25/de
<script> function foo(data) { document.write("City: ", data.city); document.write("Country: ", data.country.name); document.write("Latitude: ", data.location.latitude); document.write("Longitude: ", data.location.longitude); } </script> <script src="https://geoip.ximi.se/api?callback=foo"></script>
This service is only available via https.
The API follows a fair use policy. There are no limits by default but if the service is abused your IP may get blocked.
This API is totally free.
This software is totally free, however there are a few expenses to run the servers at geoip.nekudo.com. In case you like this project and use it regularly please consider donating a small amount using PayPal to the developers.
This software/project is open source. Setup your own instance if you like.