New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ip-info-finder

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-info-finder

you can find more info from ip such as address , country , whois info , etc

  • 2.0.4
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
395
decreased by-39.97%
Maintainers
1
Weekly downloads
 
Created
Source

ip-info-finder

npm building workflow alt text

A Package to get more information from IP address such as whois info, country, city ,mobile, user proxy or vpn status and etc. This package support ipv4 and ipv6


find more data such as
whois
Weather
Currency rate
COVID 19 statistics
Location (Street,county,...)

Installation

Install via NPM:

npm install ip-info-finder

Usage

javascript

var ipInfo = require("ip-info-finder");

ipInfo.getIPInfo('IP-ADDRESS').then(data => {
    console.log(data);
})
.catch(err => console.log(err));


TypeScript

import * as ipInfo from 'ip-info-finder';

ipInfo.getIPInfo('IP-ADDRESS').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

Result
{
  "Country": "United States (US)",
  "Continent": "North America (NA)",
  "Coordinates": "37.751 (lat) / -97.822 (long)",
  "Time": "2022-12-15 05:49:37 (America/Chicago)",
  "ipAddress": "28.106.238.158",
  "hostname": "28.106.238.158",
  "provider": "DNIC-AS-00749",
  "ASN": "749",
  "lat": "37.751",
  "lon": "-97.822"
}

Optional setting

Location

discover detail of the area from ip like county , city , street , suburb , postcode and so on.

ipInfo.getIPInfo.location('IP-ADDRESS').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

Result
{
  "Country": "United States (US)",
  "Continent": "North America (NA)",
  "Coordinates": "37.751 (lat) / -97.822 (long)",
  "Time": "2022-12-15 05:59:09 (America/Chicago)",
  "ipAddress": "28.106.238.158",
  "hostname": "28.106.238.158",
  "provider": "DNIC-AS-00749",
  "ASN": "749",
  "lat": "37.751",
  "lon": "-97.822",
  "location": [
    {
      "place_id": 297371111,
      "licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
      "osm_type": "relation",
      "osm_id": 1070327,
      "boundingbox": [ "37.733658", "38.1738097", "-98.473104", "-97.698692" ],
      "lat": "37.930344",
      "lon": "-98.1055753",
      "display_name": "Reno County, Kansas, United States",
      "class": "boundary",
      "type": "administrative",
      "importance": 0.001,
      "icon": "https://nominatim.openstreetmap.org/ui/mapicons/poi_boundary_administrative.p.20.png",
      "address": {
        "county": "Reno County",
        "state": "Kansas",
        "ISO3166-2-lvl4": "US-KS",
        "country": "United States",
        "country_code": "us"
      }
    }
  ]
}

WHOIS

find whois easily by ip or website address.

ipInfo.getIPInfo.whois('IP OR WEBSITE').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

Result
{
  "DomainName": "github.com",
  "RegistryDomainID": "1264983250_DOMAIN_COM-VRSN",
  "RegistrarWHOISServer": "whois.markmonitor.com",
  "RegistrarURL": "http",
  "UpdatedDate": "2022-09-07T09",
  "CreationDate": "2007-10-09T18",
  "RegistrarRegistrationExpirationDate": "2024-10-09T00",
  "RegistrarIANAID": "292",
  "RegistrarAbuseContactPhone": "+1.2086851750",
  "DomainStatus": "clientDeleteProhibited (https",
  "RegistrantOrganization": "GitHub, Inc.",
  "RegistrantStateProvince": "CA",
  "RegistrantCountry": "US",
  "RegistrantEmail": "Select Request Email Form at https",
  "AdminOrganization": "GitHub, Inc.",
  "AdminStateProvince": "CA",
  "AdminCountry": "US",
  "AdminEmail": "Select Request Email Form at https",
  "TechOrganization": "GitHub, Inc.",
  "TechStateProvince": "CA",
  "TechCountry": "US",
  "TechEmail": "Select Request Email Form at https",
  "NameServer": "dns2.p08.nsone.net",
  "URLoftheICANNWHOISDataProblemReportingSystem": "http",
  "LastupdateofWHOISdatabase": "2022-12-15T12",
  "VisitMarkMonitorathttps": "//www.markmonitor.com",
  "InformationUpdated": "2022-12-15 12"
}

IP checker

var ipInfo = require("ip-info-finder")


await ipInfo.getIPInfo.isIP('1:2:3:4:5:6:7:8');
//=> true
await ipInfo.getIPInfo.isIP('192.168.0.1');
//=> true
await ipInfo.getIPInfo.isIPv4('1:2:3:4:5:6:7:8');
//=> false
await ipInfo.getIPInfo.isIPv6('1:2:3:4:5:6:7:8');
//=> true
await ipInfo.getIPInfo.ipVersion('1:2:3:4:5:6:7:8');
//=> 6

Weather

what's more you can discover climate from IP address

ipInfo.getIPInfo.weather('IP-ADDRESS').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

Result
{
  "as": "AS61317 Digital Energy Technologies Ltd.",
  "asname": "ASDETUK",
  "city": "Chicago",
  "continent": "North America",
  "continentCode": "NA",
  "country": "United States",
  "countryCode": "US",
  "currency": "USD",
  "district": "",
  "hosting": true,
  "isp": "Digital Energy Technologies Chile SpA",
  "lat": 41.8764,
  "lon": -87.6133,
  "mobile": false,
  "offset": -18000,
  "org": "Digital Energy Technologies Limited",
  "proxy": true,
  "query": "191.96.97.58",
  "region": "IL",
  "regionName": "Illinois",
  "status": "success",
  "timezone": "America/Chicago",
  "zip": "60602",
   "weather": {
    "temperature": "28 °C",
    "wind": "17 km/h",
    "description": "Partly cloudy",
    "forecast": [
      { "day": "1", "temperature": "+28 °C", "wind": "13 km/h" },
      { "day": "2", "temperature": "26 °C", "wind": "19 km/h" },
      { "day": "3", "temperature": "+23 °C", "wind": "15 km/h" }
    ]
  }
}

Currency

access latest currency rate from IP this method give you lists of all the available currencies in prettified json format:

ipInfo.getIPInfo.currency('IP-ADDRESS').then(data => {
    console.log(data);
})
.catch(err => console.log(err));


Result
{
  "as": "AS14061 DigitalOcean, LLC",
  "asname": "DIGITALOCEAN-ASN",
  "city": "North Bergen",
  "continent": "North America",
  "continentCode": "NA",
  "country": "United States",
  "countryCode": "US",
  "currency": "USD",
  "district": "",
  "hosting": true,
  "isp": "DigitalOcean, LLC",
  "lat": 40.793,
  "lon": -74.0247,
  "mobile": false,
  "offset": -14400,
  "org": "Digital Ocean",
  "proxy": false,
  "query": "2604:a880:400:d0::1ec5:f001",
  "region": "NJ",
  "regionName": "New Jersey",
  "status": "success",
  "timezone": "America/New_York",
  "zip": "07047",
  "currencyDetail": {
    "date": "2021-08-30",
    "usd": {
      "aed": 3.67301,
      "afn": 86.12501,
      "all": 103.6936,
      "amd": 493.71,
      "ang": 1.794866,
    }
  }
}

Covid statistics

access most recent Coronavirus statistics from IP.

ipInfo.getIPInfo.covid('IP-ADDRESS').then(data => {
  console.log(data);
})
.catch(err => console.log(err));
Result
"covid": {
    "country": "USA",
    "cases": 40131681,
    "todayCases": 17582,
    "deaths": 658103,
    "todayDeaths": 193,
    "recovered": 31023726,
    "active": 8449852,
    "critical": 25691,
    "casesPerOneMillion": 120421,
    "deathsPerOneMillion": 1975,
    "totalTests": 584387097,
    "testsPerOneMillion": 1753534
  }

Languages

get result with your language

Example
//Arabic 
ipInfo.getIPInfo('IP-ADDRESS','ar').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

//French 
ipInfo.getIPInfo('IP-ADDRESS','fr').then(data => {
    console.log(data);
})
.catch(err => console.log(err));

Result
{
  "City": "Europe (UE)",
  "Region": "Angleterre (ENG)",
  "Country": "Royaume-Uni (GB)",
  "Continent": "Londres",
  "Coordinates": "51.5164 (lat) / -0.093 (long)",
  "Time": "2022-08-05 21:35:14 (Europe/London)",
  "ipAddress": "212.102.63.76",
  "hostname": "unn-212-102-63-76.cdn77.com",
  "provider": "Datacamp Limited",
  "ASN": "60068",
  "lat": "51.5164",
  "lon": "-0.093",
  "postalCode": "EC2V"
}

Search IP or Website address in search engines

you can add some extra filter to search more accurately or search with no filter

filter has three mode

filterdescription
catchfind websites that serve or index ip / website
sitefind email by ip / website
no filterfind every information that exist in the search engines

some example

Site Filter
const page = 1;
ipInfo.getIPInfo.search('https://github.com', { filter: 'site', name: 'linus torvalds' }, page).then(data => {
  console.log(data);
})
.catch(err => console.log(err));
{
  "alternative_search": {
    "did_you_mean": null,
    "showing_results_for": null,
    "search_instead_for": null
  },
  "webs": [
    {
      "title": "Commits · torvalds/pesconvert - GitHub",
      "description": "pes: new_block() fails if <em>undefined</em> color is referenced ... <em>Linus Torvalds</em> authored and torvalds committed on Dec 2, 2011.",
      "direction": "ltr",
      "favicon": null,
      "thumbnail": null,
      "cdn_thumbnail": null,
      "web_displayed_link": ["Array"],
      "images": null,
      "web_link": "https://github.com/torvalds/pesconvert/commits",
      "hash_web_link": "qfTv3zGzO0N9tQonUJ4OUQ",
      "domain": "github.com",
      "full_domain": "github.com",
      "extra_data": null,
      "position": 1,
      "hash": "qfTv3zGzO0N9tQonUJ4OUQ"
    },
   
  ],
  "selected_results": {
    "image": { "data": null, "extra_data": null },
    "movie": { "data": null },
    "market": { "data": null },
    "audio": { "data": null },
    "media": { "data": null, "extra_data": ["Object"] }
  },
  "top_stories": null,
  "vertical_top_stories": null,
  "related_searches": null,
  "people_also_search": null,
  "smart_answer": {}
}

you can add mail domain for search better

const page = 1;
ipInfo.getIPInfo.search('https://facebook.com', { filter: 'site',emailDomain:'gmail.com', name: 'linus torvalds' }, page).then(data => {
  console.log(data);
})
Catch Filter
const page = 1;
ipInfo.getIPInfo.search('website or ip', { filter: 'catch' }, page).then(data => {
  console.log(data);
})
.catch(err => console.log(err));
No Filter
const page = 1;
ipInfo.getIPInfo.search('website or ip', { filter: 'no filter' }, page).then(data => {
  console.log(data);
})
.catch(err => console.log(err));

Support

Contributors

Pull requests are always welcome! Please base pull requests against the main branch and follow the contributing guide.

if your pull requests makes documentation changes, please update readme file.

License

This project is licensed under the terms of the MIT license

Keywords

FAQs

Package last updated on 15 Dec 2022

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