Fast, accurate geolocation data with IPWHOIS.io


In a world of marketing and content targeting, having accurate geolocation data can be the difference between a thriving business and a disappearing business. Accurate data is everything, especially in targeted marketing. When you need reliable geolocation data, IPWHOIS.io is a great source: fast, reliable and accurate!

Quick hits

  • Start for free, very competitive prices
  • Provides location, currency, language and more information
  • Useful documentation and code examples
  • Fast and safe delivery of payload
  • Delivers data in CSV, JSON and XML formats

To use IPWHOIS, make a request to their API with the desired return format and the user’s IP address as part of the URL:

curl http://ipwhois.app/json/8.8.4.4

Your payload will look like this:

{“ip”: “8.8.4.4”, “success”: true, “type”: “IPv4”, “continent”: “North America”, “continent_code”: “NA”, “country”: “USA”, ” country_code “:” US “,” country_flag “:” https: / / cdn.ipwhois.io / flags /us.svg “,” country_capital “:” Washington “,” country_phone “:” + 1 “, “country_neighbours”: “CA, MX, CU”, “region”: “California”, “by”: “Mountain View”, “latitude”: 37.3860517, “longitude”: – 122.0838511, “asn”: “AS15169”, “org”: “Google LLC”, “isp”: “Google LLC”, “timezone”: “America / Los_Angeles”, “timezone_name”: “Pacific Standard Time”, “timezone_dstOffset”: 0, “timezone_gmtOffset”: – 28800, “timezone_gmt”: “GMT -8: 00”, “currency”: “US Dollar”, “currency_code”: “USD”, “currency_symbol”: “$”, “currency_rates”: 1, “currency_plural”: ” US dollars “,” completed_requests “: 3}

The XML endpoint provides a brilliant XML payload:

<?xml version="1.0" encoding="UTF-8"?>
<query>
   <ip>8.8.4.4</ip>
   <success>1</success>
   <type>IPv4</type>
   <continent>North America</continent>
   <continent_code>NA</continent_code>
   <country>United States</country>
   <country_code>US</country_code>
   <country_flag>https://cdn.ipwhois.io/flags/us.svg</country_flag>
   <country_capital>Washington</country_capital>
   <country_phone>+1</country_phone>
   <country_neighbours>CA,MX,CU</country_neighbours>
   <region>California</region>
   <city>Mountain View</city>
   <latitude>37.3860517</latitude>
   <longitude>-122.0838511</longitude>
   <asn>AS15169</asn>
   <org>Google LLC</org>
   <isp>Google LLC</isp>
   <timezone>America/Los_Angeles</timezone>
   <timezone_name>Pacific Standard Time</timezone_name>
   <timezone_dstOffset>0</timezone_dstOffset>
   <timezone_gmtOffset>-28800</timezone_gmtOffset>
   <timezone_gmt>GMT -8:00</timezone_gmt>
   <currency>US Dollar</currency>
   <currency_code>USD</currency_code>
   <currency_symbol>$</currency_symbol>
   <currency_rates>1</currency_rates>
   <currency_plural>US dollars</currency_plural>
   <completed_requests>8</completed_requests>
</query>

You can also specify a selected collection of fields you want in the payload:

// http://ipwhois.app/json/8.8.4.4?objects=country,city,timezone
{
  "country": "United States",
  "city": "Mountain View",
  "timezone": "America/Los_Angeles"
}

User lang parameter, you can locate location information:

http://ipwhois.app/json/8.8.4.4?lang=es

Another great bonus is the ability to use JSONP:

$.ajax({
	method: 'GET',
	contentType: 'application/json',
	url: 'http://ipwhois.app/json/' + ip,
	dataType: 'json',
	success: function(json) {
	    // Country code output, field "country_code"
	    console.log(json.country_code);
	}
});

IPWHOIS.io is a super simple, useful service that can help you tailor your advertising and content to the user’s ranking, which in turn can significantly improve your chances of conversion and user satisfaction. Give IPWHOIS.io a look when you need accurate, fast geolocation information!

Leave a Comment