Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ip-locator

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-locator

###### Retrieve the information of an IP address or hostname.

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
53
increased by112%
Maintainers
1
Weekly downloads
 
Created
Source

ip-locator

Retrieve the information of an IP address or hostname.

Uses ip-api.com to query for information.

Usage limits

ip-api.com will automatically ban any IP addresses doing over 150 requests per minute. To unban your IP click here.

You are free to use ip-api.com for non-commercial use. ip-api.com does not allow commercial use without prior approval.

For commercial, unlimited use see ip-api.com pro service.

Install

npm i --save ip-locator

Usage

var ipLocator = require('ip-locator')

ipLocator.getDomainOrIPDetails(<IpOrhostname>,<ResponseType>, function (err, data) {
  console.log(data)
});

Response Types

  1. json
  2. xml
  3. csv
  4. line

Example

var ipLocator = require('ip-locator')

ipLocator.getDomainOrIPDetails('google.com','json', function (err, data) {
  console.log(data)
});

Outputs:

{ as: 'AS15169 Google Inc.',
  city: 'Mountain View',
  country: 'United States',
  countryCode: 'US',
  isp: 'Google',
  lat: 37.4192,
  lon: -122.0574,
  org: 'Google',
  query: '74.125.130.101',
  region: 'CA',
  regionName: 'California',
  status: 'success',
  timezone: 'America/Los_Angeles',
  zip: '94043' }

Collaborators

Shahid Iqbal

Keywords

FAQs

Package last updated on 10 Mar 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc