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 displayed 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 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.
Annual plans offer significant cost savings (over 20%) compared to monthly plans.
Both plans can be upgraded any time.
Both plans can be downgraded / canceled at the end of your billing cycle (i.e. monthly plans at the end of billing month & annual plans at the end of billing year).
See details here.
Yes. Please contact us for any changes.
Upgrades, once approved, are instant. No code changes are required on your part.
Downgrades / cancellation are applied at the end of your billing cycle.
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.
We've recently added support for Paypal but it's currently in beta and account setup takes a few hours. If you want instant account setup, please pay here via credit / debit card.
We offer a free tier which is suitable for developing / testing your product. However we recommend a paid plan for any production code / public facing deployment.
Usage of the free tier in a manner intended to circumvent the request limit may result in abrupt termination of the services.
If your daily usage approaches your request limit, you'll receive an e-mail alert with instructions on how to upgrade your plan before you run out of your quota.
Please refer to API Docs on specific error messages when your usage exceeds your plan limit.
Please refer to the API Docs & developer page for usage examples in ruby, python, php, Node.js, jQuery & java