# Country Resource Stats


This data call returns statistics on Internet resources for a country - this includes:

  • number of ASNs seen in routing data and registration data
  • number of prefixes in routing data and registration data (split into IPv4 and IPv6)
  • amount of IPv4 space seen in routing data as well as registration data

The results can be restricted to a specific time period as well the granularity is variable but can be set explicitly.

GET /data/country-resource-stats/data.json?resource=at&starttime=2020-12-01T12:00&resolution=5m

# Parameters

Key Value Info Required
resource 2-digit ISO-3166 country code (e.g. "at","de"...) Defines the country that the stats are returned for YES
starttime ISO8601 or Unix timestamp The start time for the query. See "Default Values for Time Parameters" for details. NO
endtime ISO8601 or Unix timestamp The end time for the query. See "Default Values for Time Parameters" for details. NO
resolution string representation for the resolution Possible values:

* "5m" - 5 minutes
* "1h" - 1 hour
* "1d" - 1 day
* "1w" - 1 week
NO

# Default Values for Time Parameters

Starttime Endtime Defaults
set not set Endtime falls back to the lastest time data is available for
not set not set Endtime falls back to "now", starttime defaults to beginning of 2004

# Data Output

Key Info
stats Encaplulates the statistics valid for the times seen in the "timeline" field.
asns_ris Number of ASNs seen in routing data .
asns_stats Number of ASNs seen in registration data.
v4_prefixes_ris Number of v4 prefixes seen in routing data.
v4_prefixes_stats Number of v4 prefixes seen in registration data
v6_prefixes_ris Number of v6 prefixes seen in routing data.
v6_prefixes_stats Number of v6 prefixes seen in registration data.
stats_data Timestamp of the RIR stat file that is used for the registration data.
timeline
starttimeStart time of this validity period.
endtimeEnd time of this validity period.
query_starttime The start of the time the query covers.
query_endtime The end of the time the query covers.
latest_time & earliest_time Holds the latest and the earliest time data is available for.
hd_latest_time Holds the latest (most recent) time data is available for at the highest resolution (high definition)
resource The resource used for the query.

# Code Examples

Last Updated: Thursday, 11 November 2021