The IPInfo API call retrieves information about an IP address. It is based on the IP address report displayed on the website, see for example https://dnslytics.com/ip/ This is a Premium API call, you have to buy API credits here (https://dnslytics.com/api).

API request and parameters

https://api.dnslytics.net/v1/ipinfo/<ip or hostname>?apikey=<apikey>


ip or hostname:IPv4 or IPv6 address. In case of hostname we use the first IPv4 address it resolves to.
apikey:Your API key

API response

A JSON object with the following fields:

status:Status of API call: succeed or error.
question:The requested IP address.
typeinfo:Data type returned, always ‘ipinfo’.
asinfo:Routing information of IP address with the following fields (asn, ip_start, ip_end, subnet, cidr, shortname). The shortname field is extracted out of the whois data of the ASN
shortname:Description of subnet based on the Whois data
ptr:Reverse DNS record (PTR), empty string when no PTR record configured.
ndomains:Number of domains hosted on this IP.
domains:If ndomains > 0 a maximum of 10 domains are returned.
nmxrecords:Number of MX records hosted on this IP.
mxrecords:If nmxrecords > 0 a maximum of 10 MX records are returned.
nnsrecords:Number of NS records hosted on this IP.
nsrecords:If nnsrecords > 0 a maximum of 10 MX records are returned.
hostinghistory:Number of unique domains, MX and NS records hosted in the past on this IP.
subnethosting:IP addresses on the same /24 IPv4 or /64 IPv6 subnet with one or more domains hosted on it. Following fields are returned: ips (ip, count, example). Maximum of 100 IP addresses are returned.
blocklist:Contains blocklist info for thips IP. dnsblcountsubnet is the number of IP addresses for this subnet listed on our dns blacklist (subnet as defined onder asinfo property).
geoinfo:Geo information with the following fields: country_code, country_name, capital, areainsqkm, population, continent, currency, currencyname and tldn.


$ https://api.dnslytics.net/v1/ipinfo/<apikey>
        "status": "succeed",
                "question": "",
                "typeinfo": "ipinfo",
                  "asn": 13335,
                  "ip_start": "",
                  "ip_end": "",
                  "subnet": 20,
                  "cidr": "",
                  "shortname": "Cloudflare, Inc."
        "shortname":"Cloudflare, Inc.",
        "nmxrecords": 0,
        "mxrecords": [],
        "nnsrecords": 0,
        "nsrecords": [],
          "ndomains": 201,
          "nmxrecords": 19,
          "nnsrecords": 0
                "ips": [
                  "ip": "",
                  "count": 1,
                  "example": "example.com"},
          "dnsblcountsubnet": 0,
          "dnsbl": false,
          "adulthosting": false,
          "mthreats": false,
          "openproxy": false
          "country_code": "US",
          "country_name": "United States",
          "capital": "Washington",
          "areainsqkm": "9629091",
          "population": 310232863,
          "continent": "NA",
          "currency": "USD",
          "currencyname": "Dollar",
          "tldn": ".us"