https://github.com/john-doherty/offline-geo-from-ip
Get geo location information from an IP address
https://github.com/john-doherty/offline-geo-from-ip
geolocation javascript
Last synced: about 1 year ago
JSON representation
Get geo location information from an IP address
- Host: GitHub
- URL: https://github.com/john-doherty/offline-geo-from-ip
- Owner: john-doherty
- License: mit
- Created: 2020-01-26T21:29:14.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T13:40:10.000Z (over 3 years ago)
- Last Synced: 2025-04-21T12:58:10.863Z (about 1 year ago)
- Topics: geolocation, javascript
- Language: JavaScript
- Size: 27.7 MB
- Stars: 7
- Watchers: 1
- Forks: 3
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# offline-geo-from-ip
Get geo location information from an IP address without an internet connection.
_This is a modified version of [geo-from-ip](https://github.com/VikramTiwari/geo-from-ip) that includes a local database_.
## Installation
```sh
npm install --save offline-geo-from-ip
```
## Usage
```javascript
var geoIP = require('offline-geo-from-ip');
console.log(geoIP.allData('199.188.195.120'));
/*
{
code: { state: 'CA', country: 'US', continent: 'NA' },
city: 'San Francisco',
state: 'California',
country: 'United States',
continent: 'North America',
postal: '94103',
location:
{
accuracy_radius: 10,
latitude: 37.7758,
longitude: -122.4128,
metro_code: 807,
time_zone: 'America/Los_Angeles'
}
}
*/
```
## Credits
Original version created by [Vikram Tiwari](https://vikramtiwari.com)
## License
Licensed under [MIT License](LICENSE)