Country Resource Stats

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

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

Please find details in the methodology of the data call.

https://stat.ripe.net/data/country-resource-stats/data.<format>?<parameters> 

e.g. https://stat.ripe.net/data/country-resource-stats/data.json?resource=at&starttime=2012-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

Output

Data

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
starttime Start time of this validity period.
endtime End 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.

Example

"data": {
        "query_endtime": "2013-01-21T00:00:00", 
        "query_starttime": "2012-12-01T12:00:00", 
        "resolution": "1w", 
        "resource": "at", 
        "stats": [
            {
                "asns_ris": 365, 
                "asns_stats": 439, 
                "stats_date": "2012-12-01T00:00:00", 
                "timeline": [
                    {
                        "endtime": "2012-12-03T00:00:00", 
                        "starttime": "2012-12-03T00:00:00"
                    }
                ], 
                "v4_prefixes_ris": 1373, 
                "v4_prefixes_stats": 1284, 
                "v6_prefixes_ris": 172, 
                "v6_prefixes_stats": 198
            }, 
            {
                "asns_ris": 367, 
                "asns_stats": 440, 
                "stats_date": "2012-12-07T00:00:00", 
                "timeline": [
                    {
                        "endtime": "2012-12-10T00:00:00", 
                        "starttime": "2012-12-10T00:00:00"
                    }
                ], 
                "v4_prefixes_ris": 1375, 
                "v4_prefixes_stats": 1285, 
                "v6_prefixes_ris": 171, 
                "v6_prefixes_stats": 200
            }, 
            ... 
            {
                "asns_ris": 367, 
                "asns_stats": 444, 
                "stats_date": "2013-01-18T00:00:00", 
                "timeline": [
                    {
                        "endtime": "2013-01-21T00:00:00", 
                        "starttime": "2013-01-21T00:00:00"
                    }
                ], 
                "v4_prefixes_ris": 1401, 
                "v4_prefixes_stats": 1290, 
                "v6_prefixes_ris": 177, 
                "v6_prefixes_stats": 205
            }
        ]
    },