subnethistory docs
Open the appApp
API reference/ASN neighbours and prefixes

ASN neighbours and prefixes

Page through everything an AS announces and everyone it connects to.

Large networks are large. A major transit AS has thousands of downstream customers, and a large cloud announces thousands of prefixes. The lookup report carries a short preview of each list together with the true total; these two endpoints page through the full lists. Both are served from the provider cache, so paging costs nothing upstream.

Neighbours

endpoint
GET /api/v1/asn/{asn}/neighbours
ParameterValuesDefault
directionupstream, downstream or uncertainupstream
limit1 to 20050
offset0 or more0
curl
curl "https://subnethistory.com/api/v1/asn/3356/neighbours?direction=downstream&limit=100&offset=200"
response
{
  "asn": 3356,
  "direction": "downstream",
  "total": 6546,
  "offset": 200,
  "limit": 100,
  "neighbours": [
    { "asn": 394699, "name": "EXAMPLE-NET", "country": null, "strength": 4 }
  ]
}
FieldMeaning
totalThe true number of neighbours in this direction.
neighbours[].asnThe neighbouring AS.
neighbours[].nameIts name, when it resolves. Names are resolved only for the page returned.
neighbours[].countryReserved. Currently always null.
neighbours[].strengthObserved adjacency strength; higher means the relationship is seen more strongly in routing data.

A 400 is returned for an invalid AS number or an unknown direction value.

Announced prefixes

endpoint
GET /api/v1/asn/{asn}/prefixes
ParameterValuesDefault
limit1 to 500100
offset0 or more0
response
{
  "asn": 13335,
  "total": 5311,
  "offset": 0,
  "limit": 100,
  "prefixes": [
    {
      "prefix": "1.1.1.0/24",
      "family": "ipv4",
      "firstSeen": "2018-04-01T00:00:00",
      "lastSeen": null,
      "ongoing": true
    }
  ]
}
FieldMeaning
totalThe true number of announced prefixes.
prefixes[].prefixThe announced block.
prefixes[].familyipv4 or ipv6.
prefixes[].firstSeenWhen this AS was first seen announcing it.
prefixes[].lastSeenWhen it was last seen, or null while the announcement is current.
prefixes[].ongoingWhether the announcement is still current.
Last updated 2026-08-09subnethistory.com