Skip to content

Prefix Count


This endpoint shows the number of prefixes announced by a given ASN over time.

GET /data/prefix-count/data.json?resource=AS3333&starttime=2008-01-01T00:00:00
Try it

Parameters

KeyValueInfoRequired
resourceAS for the query-YES
starttimeISO8601 or Unix timestampdefault: Jan 1st 2000NO
endtimeISO8601 or Unix timestampdefault: nowNO
min_peers_seeingintegerMinimum number of RIS peers seeing the prefix for it to be included in the results. Excludes low-visibility/localized announcements.NO (default: 10)
resolution"8h" (8 hours),"2d" (2 days) or "12d" (12 days)Defines the resolution/aggregation for the returned data, e.g. "2d" means that changes in the data must persist for longer than 2 days to be visible at this resolution.NO (default: "12d")

Data Output

KeyInfo
ipv4Contains a series of incremental changes per timestamp on the IPv4 prefixes announced by the AS
ipv6Contains a series of incremental changes per timestamp on the IPv6 prefixes announced by the AS
timestampTime of the data point
prefixesNumber of prefixes announced by the AS at that point in time
address-spaceAmount of address space, in terms of /24 (for IPv4) or /48 (for IPv6) subnets, anounced by the AS at that point in time
resourceholds the resource this query based on
query_starttimethe beginning of the time period the query covers
query_endtimethe end of the time period the query covers
resolutionstates the resolution of the returned data

Code Examples

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

fetch("https://stat.ripe.net/data/prefix-count/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:

1.2 (current)