API: ASInfo

The ASInfo API call retrieves information about an AS number. It is based on the AS/BGP report displayed on the website, see for example https://dnslytics.com/bgp/as15169. 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/asinfo/<asn>/summary?apikey=<apikey>

Parameters:

asn

The requested AS number, for example 15169

apikey

Your API key

API response

A JSON object with the following fields:

status

Status of API call: succeed or error.

question

The requested AS number.

typeinfo

Data type returned, always ‘asinfo’.

shortname

Description of the AS.

country

Country of registration (2-digit code).

rir

Regional Internet Registry (eg Ripe or Arin).

rirdate

Date of assignment by RIR.

ndomains

Number of domains hosted on this AS.

nadultdomains

Number of adult domains hosted on this AS.

nmxrecords

Number of MX records hosted on this AS.

nnsrecords

Number of NS records hosted on this AS.

nopenproxies

Number of open proxies hosted on this AS.

nspamhosts

Number of spam hosts hosted on this AS.

rank

Ranking of this AS based on number of IPv4 address allocated.

prefixesv4

Array of IPv4 prefixes with the following fields (prefix, shortname and country).

prefixesv6

Array of IPv6 prefixes with the following fields (prefix, shortname and country).

peersv4

Array of IPv4 peers with the following fields (aspeer, shortname and country).

peersv6

Array of IPv6 peers with the following fields (aspeer, shortname and country).

mxrecords

Top 50 MX records hosted on this AS based on the number of domains using an MX record. Array of MX records with the following fields (mxrecord, ipv4, ndomains).

nsrecords

Top 50 NS records hosted on this AS based on the number of domains using an NS record. Array of NS records with the following fields (nsrecord, ipv4, ndomains).

topips

Top 50 IP addresses with domains hosted on this AS. Following fields are returned (ipv4, ndomains, example domain).

domains

Domains hosted on this AS with the following fields (domain, ipv4). Maximum of 50 domain names are returned.

Example

$ https://api.dnslytics.net/v1/asinfo/15169/summary?apikey=<apikey>
{
  "status": "succeed",
  "data":
  {
        "question": 15169,
        "typeinfo": "asinfo",
        "shortname": "Google LLC",
        "country": "US",
        "rir": "arin",
        "rirdate": "2000-03-30",
        "ndomains": 6139894,
        "nadultdomains": 21061,
        "nmxrecords": 148455,
        "nnsrecords": 8724,
        "nopenproxies": 6,
        "nspamhosts": 17,
        "rank": 124,
        "prefixesv4":[
                {
                  "prefix": "8.8.4.0/24",
                  "shortname": "Google LLC",
                  "country": "US"
                },
                {"......."}
          ],
        "prefixesv6":[
                {
                  "prefix": "2001:4860::/32",
                  "shortname": "Google LLC",
                  "country": "US"
                },
                {"......."}
          ],
        "peersv4":[
                {
                  "aspeer": 24482,
                  "shortname": "SG.GS",
                  "country": "SG"
                },
                {"......."}
          ],
        "peersv6":[
                {
                  "aspeer": 6939,
                  "shortname": "Hurricane Electric LLC",
                  "country": "US"
                },
                {"......."}
          ],
        "mxrecords":[
                {
                  "mxrecord": "aspmx.l.google.com",
                  "ipv4": "173.194.76.27",
                  "ndomains": 9082074
                },
                {"......."}
          ],
        "nsrecords":[
                {
                  "nsrecord": "ns8.wixdns.net",
                  "ipv4": "216.239.32.101",
                  "ndomains": 415274
                },
                {"......."}
          ],
        "topips":[
                {
                  "ipv4": "23.236.62.147",
                  "ndomains": 3662167,
                  "examples": "number3.co,yamahacostarica.com"
                },
                {"......."}
          ],
        "domains":[
                {
                  "domain": "aaanetworking.net",
                  "ipv4": "8.8.4.1"
                },
                {"......."}
          ]
  }
}