ℹ️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