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
| Parameter | Values | Default |
|---|---|---|
direction | upstream, downstream or uncertain | upstream |
limit | 1 to 200 | 50 |
offset | 0 or more | 0 |
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 }
]
}
| Field | Meaning |
|---|---|
total | The true number of neighbours in this direction. |
neighbours[].asn | The neighbouring AS. |
neighbours[].name | Its name, when it resolves. Names are resolved only for the page returned. |
neighbours[].country | Reserved. Currently always null. |
neighbours[].strength | Observed 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
| Parameter | Values | Default |
|---|---|---|
limit | 1 to 500 | 100 |
offset | 0 or more | 0 |
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
}
]
}
| Field | Meaning |
|---|---|
total | The true number of announced prefixes. |
prefixes[].prefix | The announced block. |
prefixes[].family | ipv4 or ipv6. |
prefixes[].firstSeen | When this AS was first seen announcing it. |
prefixes[].lastSeen | When it was last seen, or null while the announcement is current. |
prefixes[].ongoing | Whether the announcement is still current. |
Last updated 2026-08-09subnethistory.com