Skip to content

AS Path Length

This endpoint returns AS-path metrics (e.g. shortest or longest AS-path to other ASNs we are peering with) for the queried ASN.

GET /data/as-path-length/data.json?resource=AS3333
Try it

Parameters

KeyValueInfoRequired
resourceASAS number to queryYES
sort_by"number" (default), "count", "location", "geo"Sort by the given field. In the case of "geo", sort by approximating a world map on to a circle.NO

Data Output

KeyInfo
statsList with path length statistics per RIS route collector. Each record has the following format:
numberid of the route collector
count:number of routes to the queried AS on this route collector
locationlocation of the route collector
stripped statistics that exclude AS path prepending
avgaverage path length of all routes, excluding the RIS peers
maxmaximum path length observed, excluding the peer AS
minminimum number of path entries, excluding the peer AS
sumtotal number of path elements, excluding peer AS, seen in all routes
unstripped statistics including AS path prepending
avgaverage path length of all routes, excluding the RIS peers
maxmaximum path length observed, excluding the peer AS
minminimum number of path entries, excluding the peer AS
sumtotal number of path elements, excluding peer AS, seen in all routes
query_starttime/query_endtimeHolds the time period the query covers.
resourceDefines the resource used for the query

Code Examples

bash
curl --location --request GET "https://stat.ripe.net/data/as-path-length/data.json?resource=3333"
js
const requestOptions = {
	method: 'GET',
};

fetch("https://stat.ripe.net/data/as-path-length/data.json?resource=3333", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Available versions for this endpoint:

2.1 (current)