1.1.1 • Published 11 months ago

geoipasn v1.1.1

Weekly downloads
-
License
-
Repository
github
Last release
11 months ago

GeoIPASN

GeoIP query tool with AS Number

GeoIP data from geoip-lite using MaxMind's GeoLite2 database

ASN data from APNIC (data-raw-table) (data-used-autnums)

Update GeoLite2 database to better results

cd node_modules/geoip-lite
npm run-script updatedb license_key=[KEY]

You can get free license key in MaxMind

Table of Content

Installation

npm i geoipasn

Usage

GeoIP Info

ESM

import geoip from 'geoipasn';

const data = geoip('12.34.56.78');
console.log(data);

CJS

const geoip = require('geoipasn').default;

const data = geoip('12.34.56.78');
console.log(data);
{
  ip: IP { label: '12.34.56.78' },
  country: { code: 'US', name: 'United States of America' },
  region: 'Ohio',
  city: 'Dayton',
  coordinate: { latitude: 39.6438, longtitude: -84.1743, range: 5 },
  timezone: 'America/New_York',
  time: 2022-09-24T02:47:59.000Z,
  as: { number: 7018, name: 'ATT-INTERNET4' },
  service: ''
}

AS Number

// Get AS number of IP
const data = geoip.asn('12.34.56.78');
console.log(data);
{ ip: IP { label: '12.34.56.78' }, number: 7018, name: 'ATT-INTERNET4' }
1.1.1

11 months ago

1.1.0

1 year ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago