ip-info-finder
![npm](https://img.shields.io/npm/v/ip-info-finder.svg?style=flat-square)
![alt text](https://github.com/hamedpa/ip-info/blob/main/img/logo.png?raw=true)
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
{
"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"
}
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
{
"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",
"location": [
{
"place_id": 96237677,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",
"osm_type": "way",
"osm_id": 24963943,
"boundingbox": [ "41.8683055", "41.8840815", "-87.6165165", "-87.6101035" ],
"lat": "41.87602135",
"lon": "-87.61321885999324",
"display_name": "Monroe Harbor, 400, East Monroe Street, Loop, Chicago, Cook County, Illinois, 60603, United States",
"class": "leisure",
"type": "marina",
"importance": 0.001,
"address": {
"leisure": "Monroe Harbor",
"house_number": "400",
"road": "East Monroe Street",
"suburb": "Loop",
"city": "Chicago",
"county": "Cook County",
"state": "Illinois",
"postcode": "60603",
"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
{
"Domain Name": "github.com",
"Registry Domain ID": "1264983250_DOMAIN_COM-VRSN",
"Registrar WHOIS Server": "whois.markmonitor.com",
"Registrar URL": "http",
"Updated Date": "2020-09-08T09",
"Creation Date": "2007-10-09T18",
"Registrar Registration Expiration Date": "2022-10-09T07",
"Registrar": "MarkMonitor, Inc.",
"Registrar IANA ID": "292",
"Registrar Abuse Contact Phone": "+1.2083895770",
"URL of the ICANN WHOIS Data Problem Reporting System": "http",
">>> Last update of WHOIS database": "2022-02-25T16",
"https": "//domains.markmonitor.com/whois",
"Visit MarkMonitor at https": "//www.markmonitor.com",
"Information Updated": "2022-02-25 16"
}
IP checker
import {isIP, isIPv4, isIPv6, ipVersion} from 'ip-info-finder';
isIP('1:2:3:4:5:6:7:8');
isIP('192.168.0.1');
isIPv4('1:2:3:4:5:6:7:8');
isIPv6('1:2:3:4:5:6:7:8');
ipVersion('1:2:3:4:5:6:7:8');
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
ipInfo.getIPInfo('IP-ADDRESS','ar').then(data => {
console.log(data);
})
.catch(err => console.log(err));
ipInfo.getIPInfo('IP-ADDRESS','fr').then(data => {
console.log(data);
})
.catch(err => console.log(err));
Result
{
"as": "AS14061 DigitaloCean، LLC",
"asname": "DIGITALOCEAN-ASN",
"city": "أمريكا الشمالية",
"continent": "نورث بيرغن",
"continentCode": "NA",
"country": "الولايات المتحدة",
"countryCode": "US",
"currency": "USD",
"district": "",
"hosting": true,
"isp": "DigitalOcean, LLC",
"lat": 40.793,
"lon": -74.0247,
"mobile": false,
"offset": -14400,
"org": "المحيط الرقمي",
"proxy": false,
"query": "2604:a880:400:d0::1ec5:f001",
"region": "NJ",
"regionName": "نيو جيرسي",
"status": "success",
"timezone": "America/New_York",
"zip": "07047"
}
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
filter | description |
---|
catch | find websites that serve or index ip / website |
site | find email by ip / website |
no filter | find 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));
License
This project is licensed under the terms of the
MIT license