Geoinformation services
July 6

Geolocation APIs: IP or W3C Geolocation?

For any webmaster interested to know where his users came from there are two methods available:

  • compare users IP address to a database of longitude/latitude or use an online API for this purpose;
  • or use a W3C HTML Geolocation API.

HTML Geolocation API (Request from user using JS) provides scripted access to geographical location information associated with the hosting device. This is the most powerful and precise method of user's geolocation available.

Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. Although W3C Geolocation API doesn't guarantee that the API returns the device's actual location it will try it's best for sure.

But it is more complicated to implement and it will require user to explicitly allow to use his location data:

image

List of the most reliable IP Geolocation APIs


IPData.co
API Key: Required
API Latency: 65ms
Their smallest plan is $10 a month for 2500 requests daily or 75,000 requests a month.

Maxmind.com
API Key: Required
API Latency: 44ms
For basic city level geolocation via the City endpoint, it'll cost $400 per million calls or $0.0004 per request.

IPInfo.io
API Key: Not Required
API Latency: 165ms
Their Basic Plan  including  250,000 requests a month for a $49 monthly.

ipapi.com
API Key: Not Required
It's free for small projects up to 10,000 requests per month.

ipapi.co
API Key: Not Required
API Latency: 270ms
It's free up to 1000 requests a day, than it'll cost starting from $15 monthly depending from a daily volume of requests.

db-ip.com
API Key: Required
API Latency: 225ms
It'll cost from €15.90 for 50,000 requests daily

ipwhois.io
API Key: Not Required
API Latency: 75ms
It's free for small projects up to 10,000 requests per month (IP and Referer identification). You can use ipwhois.io to filter out bot traffic, customize content based on visitor's location, display full country names, perform bulk IP geolocation, and more.

+10
612 1
Support the author
Leave a comment
Top of the day