node package manager
Love JavaScript? Your insights can make it even better. Take the 2017 JavaScript Ecosystem Survey ¬Ľ



Get geolocation ūüĆź information about an IP ūüď≤

Build Status NPM Version NPM Download


  • No frills install ūüöÄ
  • Downloads databases automatically during installation ūüĒč
  • Run npm install to upgrade databases == automatic update on deployments ūüíé

How to use

  • Include package in your project
npm install --save geo-from-ip
# or, if you are using yarn 
yarn add --save geo-from-ip
  • Use package to get geo data from IP
const geoip = require('geo-from-ip')
{ code: { state: 'CA', country: 'US', continent: 'NA' },
  city: 'San Francisco',
  state: 'California',
  country: 'United States',
  continent: 'North America',
  postal: '94103',
   { accuracy_radius: 10,
     latitude: 37.7758,
     longitude: -122.4128,
     metro_code: 807,
     time_zone: 'America/Los_Angeles' } }
  • Update database

Database will get automatically updated every time deployment happens. But if you would like to force an update, just run:

npm install
# or, if you are using yarn 

Debugging / Developing

Run your code using geo-from-ip as debug flag. Look into pacakge.json for example.


Developer: ūüĎ®‚ÄćūüíĽ Vikram Tiwari

If you found this library helpful, or learned something from it and want to thank me, consider buying me a cup of ‚ėēÔłŹ.

Database: Max-Mind

This product includes GeoLite2 data created by MaxMind, available from