Package: https://www.npmjs.com/package/ip-info3
- A simple package for get a lot of info about a IP address
npm install ip-info3
GetAll() -> Get all the info
GetAS() -> Get the IP AS
GetCity() -> Get the IP City
GetCountry() -> Get the IP Country
GetCountryCode() -> Get the IP Country code
GetISP() -> Get the IP ISP
GetOrg() -> Get the IP Organization
GetRegion() -> Get the IP Region
GetRegionName() -> Get the IP Region name
GetQueryStatus() -> Get if the query was successfull
GetTimezone() -> Get the IP Timezone
GetZip() -> Get the IP zip
const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();
getinfo.GetCity("90.90.90.90").then(data => {
console.log(data)
});
Output
>> Paris
const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();
getinfo.GetRegionName("90.90.90.90").then(data => {
console.log(data)
});
Output
>> Île-de-France
const IPInfo = require("ip-info3")
const getinfo = new IPInfo.getIPInfo();
getinfo.GetAll("90.90.90.90").then(data => {
console.log(data)
});
Output
>> {
"status":"success",
"country":"France",
"countryCode":"FR",
"region":"IDF",
"regionName":"Île-de-France",
"city":"Paris",
"zip":"75018",
"lat":48.8323,
"lon":2.4075,
"timezone":"Europe/Paris",
"isp":"Orange S.A.",
"org":"G-Core Labs",
"as":"AS3215 Orange S.A.",
"query":"90.90.90.90"
}