If you want to determine your public (external) IP address programmatically, you can use the following request : https://ipapi.co/ip
Suppose you want to redirect your visitors to country-specific subdomains or pages on your website. If you visitor's IP address is 8.8.8.8, you can fetch the country with the following request:
https://ipapi.co/8.8.8.8/country
Your application can then redirect the visitors based on the country code fetched above.

Similarly for city, you can use:
https://ipapi.co/8.8.8.8/city

If you omit the IP address 8.8.8.8 from the requests above, the response will show your country / city respectively.
Get the latitude & longitude : https://ipapi.co/8.8.8.8/latlong & plug it into a maps API (e.g. Google Maps or OpenStreetMaps)


The above map image can be dispalyed with the following piece of code :
<img src="https://maps.googleapis.com/maps/api/staticmap?center=37.384500,-122.088100&zoom=9&size=280x200&scale=1">
Timezone in IANA format i.e. "Area/Location", e.g. "America/Los_Angeles" :
https://ipapi.co/8.8.8.8/timezone
We aggregate data from multiple sources to provide an accurate & up-to date location information. This website includes location data available from db-ip, IP2Location LITE data available from IP2Location and GeoLite2 data created by MaxMind, available from MaxMind. In addition, we also partner with network service providers to provide a one stop comprehensive solution.
Please refer to the API Docs & developer page for usage examples in ruby, python, php, Node.js, jQuery & java
We offer a free tier which is great for developing / testing your product. However we recommend a paid plan for any production code / public facing deployment.
We use Stripe, a secure online payment gateway to handle online payments. Stripe meets and exceeds the most stringent industry standards for security. Stripe has been audited by a PCI-certified auditor, and is certified to PCI Service Provider Level 1. This is the most stringent level of certification available.
Plans can be upgraded any time. Monthly plans can be downgraded / canceled at the end of your billing month. Annual plans can be downgraded / canceled at the end of your billing year. Please contact us to make any changes to your plan or payment method.