API: ASN and Network Queries

Last Updated: 2020-10-28

Introduction

These are web based API’s for the purpose of querying different parts of routing and networking. The modules that are included are as follows:

  • Origin Query – Report back the originating ASN and ASN name for the specific CIDR
  • Peer Query – Report back all the BGP peers for a specific CIDR
  • Prefix Query – Given an ASN report back all the routed CIDR’s.
  • ASN Query – Report back any information about the ASN

Note: Rate limiting by source IP is set to 10 queries per second.

ASN

Returns routing details for a given address or the Autonomous Systems Number (ASN). Replaces asn.shadowserver.org

Origin Query

Sample query:

https://api.shadowserver.org/net/asn?origin=8.8.8.8

Sample response (formatted):

[
  {
    "asname_short": "GOOGLE",
    "prefix": "8.8.8.0/24",
    "asn": "15169",
    "asname_long": "GOOGLE",
    "geo": "US"
  }
]

Up to 1,000 items can be queried in one call:

https://api.shadowserver.org/net/asn?origin=8.8.8.8,8.8.4.4

Peer Query

Sample query:

https://api.shadowserver.org/net/asn?peer=8.8.8.8

Sample response (formatted):

[
  {
    "prefix": "8.8.8.0/24",
    "peer": "1101 8220 21320 47605 51088",
    "asn": "15169",
    "asname_short": "GOOGLE",
    "asname_long": "GOOGLE",
    "geo": "US"
  }
]

Up to 1,000 items can be queried in one call:

https://api.shadowserver.org/net/asn?peer=8.8.8.8,8.8.4.4

Prefix Query

Sample query:

https://api.shadowserver.org/net/asn?prefix=22414

Sample response (formatted):

["208.82.236.0/22"]

ASN Query

Sample query:

https://api.shadowserver.org/net/asn?query=109

Sample response (formatted):

{
  "asname_short": "CISCOSYSTEMS",
  "date": "19870506",
  "asn": "109",
  "asname_long": "CISCOSYSTEMS",
  "geo": "US",
  "nic": "arin"
}

Our 86 Report Types