โ„น๏ธIP infos

Get informations about an IP adress

Get infos about IP adress

GET https://api.night-api.com/general/ipinfo/:ip

Path Parameters

NameTypeDescription

ip*

String

IP adress

Headers

NameTypeDescription

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
        }
    }
}

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