Fast, Accurate Geolocation Data with IPWHOIS.io
In the world of marketing and content targeting, having accurate geolocation data can be the difference between a thriving enterprise and a floundering business. Accurate data is everything, especially in the targeted marketing. When you need trustworthy geolocation data, IPWHOIS.io is a great source: fast, reliable, and accurate!
Quick Hits
- Start for free, very competitive pricing
- Provides information about location, currency, language, and more
- Helpful documentation and code samples
- Fast and secure payload delivery
- Provides data in CSV, JSON, and XML formats
To use IPWHOIS, make a request to their API with the desired return format and user IP address as part of the URL:
curl http://ipwhois.app/json/8.8.4.4
Your payload will look like:
{ "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":"California", "city":"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 select 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" }
Using the lang
parameter, you can get localized location information:
Another awesome 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 to customize your advertising and content to the user's location, which in turn can greatly improve your chances of conversion and user satisfaction. Give IPWHOIS.io a look when you need accurate, fast geolocation information!