Socket
Socket
Sign inDemoInstall

@alphat3ch/ip-api

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @alphat3ch/ip-api

Implementaion of IP-API.com in Node.js


Version published
Weekly downloads
1
Maintainers
1
Install size
4.07 kB
Created
Weekly downloads
 

Readme

Source

NPM

IP-API Build Status

Implementaion of IP-API.com in Node.js

Example Shorten:

First run npm install @alphat3ch/ip-api to install the IP-API package to your system.

var ipapi = require('@alphat3ch/ip-api');

ipapi.lookup('2.5.5.5', '262143', function(res) {
	console.log(res);
});

The first value used will be the IP address. The second value will be the fields. You can find more information about fields on the IP-API website. Using 262143 will return all available values as of December 2018.

Example Response:

{ as: 'AS3215 Orange S.A.',
  city: 'Lille',
  country: 'France',
  countryCode: 'FR',
  isp: 'France Telecom Orange',
  lat: 50.6292,
  lon: 3.05726,
  mobile: false,
  org: '',
  proxy: false,
  query: '2.5.5.5',
  region: 'HDF',
  regionName: 'Hauts-de-France',
  reverse: 'alille-656-1-160-5.w2-5.abo.wanadoo.fr',
  status: 'success',
  timezone: 'Europe/Paris',
  zip: '59000' }

Returns an empty string if an error occurs.

This Package Is Under The MIT License

Keywords

FAQs

Last updated on 23 Dec 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc