โน๏ธIP infos
Get informations about an IP adress
Get infos about IP adress
GET
https://api.night-api.com/general/ipinfo/:ip
Path Parameters
Name | Type | Description |
---|---|---|
ip* | String | IP adress |
Headers
Name | Type | Description |
---|---|---|
authorization* | String | Your API key |
{
"status": 200,
"content": {
"ip": "8.8.8.8",
"continent": {
"code": "NA",
"geoname_id": 6255149,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "Norteamรฉrica",
"fr": "Amรฉrique du Nord",
"ja": "ๅใขใกใชใซ",
"pt-BR": "Amรฉrica do Norte",
"ru": "ะกะตะฒะตัะฝะฐั ะะผะตัะธะบะฐ",
"zh-CN": "ๅ็พๆดฒ"
}
},
"country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "Vereinigte Staaten",
"en": "United States",
"es": "Estados Unidos",
"fr": "รtats Unis",
"ja": "ใขใกใชใซ",
"pt-BR": "EUA",
"ru": "ะกะจะ",
"zh-CN": "็พๅฝ"
}
},
"location": {
"accuracy_radius": 1000,
"latitude": 37.751,
"longitude": -97.822,
"time_zone": "America/Chicago"
},
"registered_country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "Vereinigte Staaten",
"en": "United States",
"es": "Estados Unidos",
"fr": "รtats Unis",
"ja": "ใขใกใชใซ",
"pt-BR": "EUA",
"ru": "ะกะจะ",
"zh-CN": "็พๅฝ"
}
},
"autonomous_system_number": 15169,
"autonomous_system_organization": "GOOGLE",
"is_v4": true,
"is_v6": false,
"ip_version": 4,
"privacy": {
"is_mobile": false,
"is_bad": false,
"is_bogon": false,
"is_datacenter": false,
"is_proxy": false,
"is_vpn": true,
"is_tor": false
}
}
}
{
"status": 400,
"content": "Invalid Key"
}
const axios = require("axios");
axios.get('https://api.night-api.com/general/ipinfo/8.8.8.8', {
headers: {
authorization: "Your API token"
}
})
.then(function (response) {
console.log(response.data);
})
Or with the module
// Return: Promise
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const ip = await api.ipinfo.getInfos('8.8.8.8'); // Get infos about IP
Last updated