Site icon TheDevCouple

IPWhoIs.io Review – Get User Location Data In An Instant

ipwhois.io-review-thedevcouple

It is extremely important for some developers to know from which part of the world people are accessing their products. The products might be a course platform that provides discount depending upon the visitor’s location. It can also be a region-restricted website.

There are a lot of products in the market that provides you the location data of your visitor. One of them is the ipwhois.io that not only provides you the geolocation information but also the timezone, currency information, and then some.

Today, I am also going to show you how you can use the ipwhois.io to get the information you require. Also, I am going to test its performance and discuss its features along with a couple of other things. So without any further ado, let’s jump in!

IPWhoIs.io

As I said earlier, it is a geolocation API. It provides you the location data of your website’s visitor. You can also get information about a particular IP address with this API.

When you make the API call to ipwhois.io, you have the option to get receive information in one of the three formats. These formats include JSON, XML, and Newline. You need to specify your format of choice in the API URL.

Experimenting With The API

Now I am going to show you how this API works and how you can use it to get the geolocation data. Just follow the steps below and you will be alright.

→ Step #1

We need the API first. So for that, head over to the ipwhois.io website, and then from there, the documentation page. Now scroll down and in the example section, you will see an API endpoint. Go ahead and copy it.

→ Step #2

I am going to use JavaScript specifically Node.js to make the API call. I am going to write a simple program that will hit the API and log the results on the console.

I am not going to provide the API any IP address so it can detect where I am coming from automatically. Just copy-paste the following code inside a JavaScript file and run it using node yourfile.js. I have also added the response I received in the gist below.


const axios = require('axios');

// Fetch IP Who Is data.
axios
  .get('http://ipwhois.app/json/')
  .then(({ data }) => console.log(data))


// Sample Response:
{
  "ip": "8.8.4.4",
  "success": true,
  "type": "IPv4",
  "continent": "North America",
  "continent_code": "NA",
  "country": "United States",
  "country_code": "US",
  "country_flag": "https://cdn.ipwhois.io/flags/us.svg",
  "country_capital": "Washington",
  "country_phone": "+1",
  "country_neighbours": "CA,MX,CU",
  "region": "New Jersey",
  "city": "Newark",
  "latitude": 40.735657,
  "longitude": -74.1723667,
  "asn": "AS15169",
  "org": "Google LLC",
  "isp": "Google LLC",
  "timezone": "America/New_York",
  "timezone_name": "Eastern Standard Time",
  "timezone_dstOffset": 0,
  "timezone_gmtOffset": -18000,
  "timezone_gmt": "GMT -5:00",
  "currency": "US Dollar",
  "currency_code": "USD",
  "currency_symbol": "$",
  "currency_rates": 1,
  "currency_plural": "US dollars",
  "completed_requests": 0
}

API Features

I get a lot of information back when I hit the API. Since I didn’t provide any IP address, all of the information is related to where I am right now. Let’s take a look at some of the information it provided us in detail:

These are some of the features that this API provides.

💰 Pricing

ipwhois.io currently provides three paid plans and one free plan. With a free plan, you get up to 10,000 requests per month.

The three paid plans are Pro, Business, and Platinum. As you upgrade your plan, you get more and more API requests per month. For instance, with the Platinum plan, you get almost 10 million requests per month.

🙌 Wrapping Up

If you are in the market for a geolocation API, I would recommend that you should give ipwhois.io a shot. You can try it for free before buying any of its plans. And try it out and see if it is what you are looking for in your product.

It provides you a detailed location data of any IP address. You can use it to get all sorts of information about your visitor including the timezone and the city they are living in.

Have you used ipwhois.io or any similar service to get the user’s geolocation data? Which service did you use and how was your experience? Let us know your thoughts in the comments section below.

Exit mobile version