This data call provides information on prefixes related to an ASN. The data call distinguishes prefixes in the originated and transited ASN.
Note that this distinction is purely based on the perspective of the RIPE NCC's RIS system and does NOT imply the underlying (business) relationships between networks!
The data call supports history, with each data point being aligned to times a dump is created in RIS (00:00, 08:00 and 16:00 UTC).
By default, the data call returns just the count of prefixes related to the looked up ASN. This is mainly to prevent returning thousands of prefixes. See parameter settings below to further tailor the output to your needs.
https://stat.ripe.net/data/ris-prefixes/data.<format>?<parameters>
e.g. https://stat.ripe.net/data/ris-prefixes/data.json?resource=3333
Key | Value | Info | Required |
---|---|---|---|
resource | ASN | The ASN to be looked up. | Yes |
query_time | ISO8601 or Unix timestamp | Defines the time of the lookup. This value needs to be aligned to the RIS dump times! | No - by default it will return the latest available data point (either 00:00, 08:00 or 16:00 UTC) |
list_prefixes | boolean ("true"/"false") | If true, the data call will return all prefixes and not only the total counts. This might be further separated into "originating" and "transiting". | No - default is "false" |
types | "o","t" or "o,t" | "o" will show originating prefixes and "t" transiting. The combination shows both, which is the default. | No - by default originating and transiting are included. |
af | "v4","v6" or "v4,v6" | This parameter lets you filter the address family: "v4" shows only IPv4 and "v6" only IPv6. | No - by default, IP version 4 and 6 are included. |
noise | "keep" or "filter" | Noise refers to routed prefixes that are either coming from private IP space, single IP addresses or the entire IP space (/0). "filter" will remove these prefixes from the output, "keep" will not remove any prefixes. | No - by default "keep" is enabled. |
https://stat.ripe.net/data/ris-prefixes/data.json?resource=3333
The data call returns the counts of prefixes for the given ASN and for the latest time that data is available for.
"data": { "query_time": "2015-09-24T08:00:00", "resource": "3333", noise: [ "keep" ], "af": [ "v4", "v6" ], "counts": { "v4": { "originating": 6, "transiting": 11 }, "v6": { "originating": 1, "transiting": 3 } }, "list_prefixes": false, "types": [ "o", "t" ] }
https://stat.ripe.net/data/ris-prefixes/data.json?resource=3333&list_prefixes=true
In this example, the output shows the prefixes that have been aggregated in the first example.
"data": { "prefixes": { "v4": { "originating": [ "193.0.18/23", "193.0.22/23", "193.0.20/23", "193.0.10/23", "193.0.0/21", "193.0.12/23" ], "transiting": [ "93.175.146/24", "84.205.83/24", "23.128.125.0/25", "23.128.24/24", "193.0.24/21", "23.128.25.240/28", "84.205.66/24", "23.128.25.0/25", "23.128.125.240/28", "93.175.147/24", "23.128.124/24" ] }, "v6": { "originating": [ "2001:67c:2e8::/48" ], "transiting": [ "2001:67c:64::/48", "2001:7fb:fd02::/48", "2001:7fb:fd03::/48" ] } }, "query_time": "2015-09-24T08:00:00", "resource": "3333", "af": [ "v4", "v6" ], "counts": { "v4": { "originating": 6, "transiting": 11 }, "v6": { "originating": 1, "transiting": 3 } }, "list_prefixes": true, "types": [ "o", "t" ] }