RIR

This data call shows which RIR(s) allocated/assigned a resource. Depending on the level of detail ("lod" parameter) this can include additional information like registration status or country of registration. The data is based on RIR stats files, see ftp://ftp.ripe.net/pub/stats/.

https://stat.ripe.net/data/rir/data.<format>?<parameters> 

e.g. https://stat.ripe.net/data/rir/data.json?resource=193.0.0.0/16

Parameters

Key Value Info Required
resource IP resource / ASN Defines the resource to be queried. The result contains resources that are more or less specific to the queried resource. YES
"starttime"/"endtime" ISO8601 or Unix timestamp Defines the time start and end time for the query. NO - default: latest time data is available for. The RIRs are not synchronised on the release of the RIR stats, so the latest time can vary between RIRs.
"lod" integer Defines the level of detail in which the data is being returned.
Levels are:
  • 0 - Least detailed output
  • 1 - Default output
  • 2 - Most detailed output
NO - default: 1

Output

Level of detail: 0

With this level, the output contains just the authoritative RIR of the resource being queried. For a non-historical query, this usually returns the currently authoritative RIR. For a historical query, all the RIRs that have ever been authoritative for the resource will be returned.

Example
    "data": {
            "query_starttime": "2015-06-23T00:00:00", 
            "resource": "193.0.20.0/23", 
            "lod": 0, 
            "query_endtime": "2015-06-23T00:00:00", 
            "rirs": [
                {
                    "rir": "RIPE NCC"
                }
            ], 
            "latest": "2015-06-23T00:00:00"
    }
    

Level of detail: 1

With this level, the information given for level 0 is complemented by timeline information, which makes it possible to tell exactly when an RIR was authoritative for the resource.

Example
    "data": {
        "query_starttime": "2015-06-23T00:00:00", 
        "resource": "193.0.20.0/23", 
        "lod": 1, 
        "query_endtime": "2015-06-23T00:00:00", 
        "rirs": [
            {
                "first_time": "2015-06-23T00:00:00", 
                "rir": "RIPE NCC", 
                "last_time": "2015-06-23T00:00:00"
            }
        ], 
        "latest": "2015-06-23T00:00:00"
    }
    

Level of detail: 2

With this level, the information given for level 1 is complemented by:

Example
    "data": {
        "query_starttime": "2015-06-23T00:00:00", 
        "resource": "193.0.20.0/23", 
        "lod": 2, 
        "query_endtime": "2015-06-23T00:00:00", 
        "rirs": [
            {
                "status": "ALLOCATED", 
                "first_time": "2015-06-23T00:00:00", 
                "country": "NL", 
                "rir": "RIPE NCC", 
                "registration": "1993-09-01T00:00:00", 
                "last_time": "2015-06-23T00:00:00"
            }, 
            {
                "status": "AVAILABLE", 
                "first_time": "2015-06-23T00:00:00", 
                "country": null, 
                "rir": "RIPE NCC", 
                "registration": "", 
                "last_time": "2015-06-23T00:00:00"
            }
        ], 
        "latest": "2015-06-23T00:00:00"
    }
    

deprecated - n.a.

upcoming - n.a.