Best API for Geolocating an IP Address

GeoIP Location tracking help website owner to serve users better way. GeoIP helps to locate and identify website visitor’s Location by IP address.

There are many GeoIP Location API in market which have global IP database services worldwide, but they have some limitations on number of API call per website or user.

IP Geolocation API must be fast, accurate, reliable, free, easy to integrate, available in JSON. It must help to pin your users locations, customize user experiences, prevent fraud browsing..

I have better option to find GeoIP Location for website’s user using NodeJS

*Serverless Geoip*
https://github.com/sbstjn/serverless-geoip
https://github.com/bluesmoon/node-geoip

*Basic Installations*

# npm install geoip-lite
# npm run-script updatedb

# /usr/bin/nodejs geoip.js [IP-Address]

*geoip.js*

var geoip = require('geoip-lite');

const args = process.argv;

var ip = args[2];
var geo = geoip.lookup(ip);

console.log(geo.country);

OutPut

# nodejs geoip.js [IP-Address]
{ country: ‘IN’ }

I am just getting user’s country from GeoIP module “geoip-lite”