home
home

API Documentation: SubnetInfo

SubnetInfo

The SubnetInfo API call retrieves information about a subnet. It is based on the IP subnet report displayed on the website, see for example https://search.dnslytics.com/cidr/104.16.0.0/12 We calculate statistics of all subnets allocated by the RIRs (ARIN, RIPE etc.) and subnets part of the global routing table. In total about 700K IPv4 subnets. This is a Premium API call, you have to buy API credits.

API request

https://api.dnslytics.net/v1/subnetinfo/<cidr>/summary?apikey=<apikey>

API response

Example

URL

$ curl https://api.dnslytics.net/v1/subnetinfo/104.27.176.0/20/summary?apikey=<apikey>

Output

{
  "status": "succeed",
  "data":
  {
        "question": "104.27.176.0/20",
        "typeinfo": "subnetinfo",
        "startip": "104.27.176.0",
        "endip": "104.27.191.255",
        "cidr": "104.27.176.0/20",
        "shortname": "Cloudflare, Inc.",
        "country": "US",
        "rir": "arin",
        "nroutes": 2,
        "ndomains": 303987,
        "ngtld": 164601,
        "ncctld": 82554,
        "nntld": 56832,
        "ngtld": 285,
        "nalexatop1m": 5047,
        "nmxrecords": 280,
        "nnsrecords": 170,
        "nspamhosts": 0,
        "routes":[
                {
                  "cidr": "104.16.0.0/12",
                  "asn": 13335,
                  "shortname": "Cloudflare, Inc.",
                  "country": "US"
                },
                {"......."}
          ],
        "mxrecords":[
                {
                  "ip": "104.27.176.143",
                  "nmxrecords": 3,
                  "examples": "mail.example.com,mail.example.net"
                },
                {"......."}
          ],
        "nsrecords":[
                {
                  "ip": "104.27.182.232",
                  "nnsrecords": 4,
                  "examples": "ns1.example.com,ns2.example.net"
                },
                {"......."}
          ],
        "topips":[
                {
                  "ip": "104.27.184.9",
                  "ndomains": 259,
                  "examples": "example.com,example.net"
                },
                {"......."}
          ],
        "domains":[
                {
                  "domain": "example.net",
                  "ip": "104.27.182.34",
                  "domainrank": 9
                },
                {"......."}
          ]
  }
}