Skip to content

Country Resource List

This endpoint lists the Internet resources associated with a country, including ASNs, IPv4 ranges and IPv4/6 CIDR prefixes.

This data is derived from the RIR Statistics files maintained by the various RIRs.

GET /data/country-resource-list/data.json?resource=at&time=2020-12-01
Try it

Parameters

KeyValueInfoRequired
resource2-digit ISO-3166 country code (e.g. "at","de"...)The country to find IP prefixes and AS numbers for.YES
timeISO8601 or Unix timestampThe time to query. By default, returns the latest available data. This value is truncated to midnight.NO
v4_formatformat parameter; possible values: "" or "prefix".
"prefix" will return each entry in prefix notation, meaning that ranges are converted to CIDR prefixes.
Describes the formatting for the output of IPv4 space.NO. Defaults to ""

Data Output

KeyInfo
resourcesLists of resources that are associated with the queried country according to the RIR stats files.
asn A sorted list of ASN numbers associated with the queried country.
ipv4 A sorted list of IPv4 prefixes and/or ranges associated with the queried country.
ipv6 A sorted list of IPv6 prefixes associated with the queried country.
query_timeThe time covered by the query.resourceThe resource used for the query.
resourceThe resource used for the query.

Code Examples

bash
curl --location --request GET "https://stat.ripe.net/data/country-resource-list/data.json?resource=at&time=2020-12-01"
js
const requestOptions = {
	method: 'GET',
};

fetch("https://stat.ripe.net/data/country-resource-list/data.json?resource=at&time=2020-12-01", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Available versions for this endpoint:

0.2 (current)