Skip to content

API: ASN and Network Queries

elsif2 edited this page Mar 2, 2024 · 7 revisions

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):

[
   {
      "asn" : 15169,
      "asn_name" : "Google LLC",
      "ip" : "8.8.8.8",
      "prefix" : "8.8.8.0/24"
   }
]

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):

[
   {
      "asn" : 15169,
      "asn_name" : "Google LLC",
      "ip" : "8.8.8.8",
      "peer": "1101 8220 21320 47605 51088",
      "prefix" : "8.8.8.0/24"
   }
]

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:

["208.82.236.0/22"]

Sample query:

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

Sample response:

["2620:7e::/44","2620:7e:2::/48"]

ASN Query

Sample query:

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

Sample response (formatted):

{
   "asn" : "15169",
   "asn_name" : "Google LLC",
   "date" : "20120224",
   "geo" : "US",
   "nic" : "ARIN"
}
Clone this wiki locally