APIJSON APIRouteViews + RIPE RIS · refreshed every 4–8 hours

AS Path Finder API

The networks that carry traffic to an IP address, prefix or AS, three levels out, and the likely AS path from yours, as JSON. Free. No API key. For the drawn chart, use the AS Path Finder.

Try the endpoint

An address or prefix reads how that prefix is announced; an AS reads all of its prefixes together. Add a source AS for the likely path from it.

Examples: 1.1.1.1 8.8.8.8 from AS7922 2001:4860:4860::8888 from AS6939 AS13335
JSON Response
Enter a destination above and click Find path to see the response.

API Documentation

The parameters and fields for this tool. Keys, errors, CORS and limits work the same for every tool: see the API guide.

GET/v1/as-path/{address, prefix or asn}?from={asn}

A destination’s ingress (who hands traffic to it, and who hands it to them, three levels out) and, with from, the likely AS path from that AS. Answers are kept for 15 minutes, shared with the AS Path Finder page.

ParameterTypeDescription
as-pathstringThe destination: an IPv4 or IPv6 address, a prefix, or an AS number. An address is read through the most specific announced prefix covering it.
fromstringOptional. The source AS, like AS7922.
# who carries traffic to 1.1.1.1 curl -s "https://api.notoolkit.com/v1/as-path/1.1.1.1" | jq '.ingress[] | {asn, name, share}' # the likely path from AS7922 to it, hop by hop curl -s "https://api.notoolkit.com/v1/as-path/1.1.1.1?from=AS7922" | jq '.route.path' # the same as a POST curl -s -X POST https://api.notoolkit.com/v1/as-path -H 'Content-Type: application/json' -d '{"as-path":"1.1.1.1","from":"AS7922"}'
GETResponse fields
FieldDescription
typeaddress, prefix or asn: how the destination was read.
prefixThe prefix whose paths were read; null for an AS, which is read as all its prefixes together (prefixes says how many).
origin, originsThe AS that originates it (asn, name, org), and every origin seen with how many paths ended in it: more than one is a multi-origin prefix.
paths_read, sourcesHow many vantage-point paths the answer is drawn from, in all and per source (route-views2, route-views6, ris-rrc00, and notoolkit for our own collectors).
ingressThe networks seen handing traffic to the origin directly, busiest first: each with asn, name, org, paths, share (of all paths read), relationship to the AS it hands traffic to (provider, customer, peer, or null when unknown) and its own upstreams, the same shape, three levels in all.
ingress_networksHow many networks were seen handing traffic to the origin directly; ingress lists the busiest five.
routeWith from only, else null. found; path, the AS numbers from the source to the origin; inferred_hops; and hops, each with asn, name, org, seen (true when its next hop was seen on real paths, false when it was inferred from the AS relationships) and relationship to the next hop. When no route could be worked out, found is false and note says why.
built_atWhen the answer was worked out (UTC).

A destination no vantage point saw is a 404. For a prefix announced only in parts, it also gives busiest_inside, the busiest of the prefixes inside it, and inside, how many there are.