Skip to content

Looking Glass


This endpoint returns information coming from a Looking Glass. The data is based on a data feed from the RIPE NCC's network of BGP route collectors (RIS, see https://www.ripe.net/data-tools/stats/ris for more information).
The data processing usually happens with a small delay and can be considered near real-time.
The output is structured by collector node (RRC) accompanied by the location and the BGP peers which provide the routing information.

GET /data/looking-glass/data.json?resource=140.78.0.0/16
Try it

Parameters

KeyValueInfoRequired
resourceA prefix or an IP address.Prefixes need to match exactly a prefix found in the routing data. If given as IP address, the endpoint will try to find the encompassing prefix for the IP address.YES
look_back_limitDefines the cut-off threshold in seconds for the recency of the entries.Any results older than the cut-off threshold are not returned. This is useful when data is delayed and should not show up.NO - default is 86400 (= 24 hours)

Data Output

KeyInfo
rrcsThere is one entry for each collector node (RRC) that provides data for the given input resource. Each RRC entry holds the location and the ID of the RRC together with the list of BGP peer information.
The BGP peer information contains:

* origin: type of BGP origin
* last_updated: the timestamp when this route was last changed
* lastest_time: the timestamp when this route was last confirmed
* as_path: the path of ASNs seen for this route
* community: BGP community information for this route
* asn_orgin: the originating ASN for the matched prefix
* prefix: the matched prefix based on the query input resource
* next_hop: the next hop from the perspective of this peer
* peer: IP address of the peer interface
latest_timeProvides info on how recent the data is.

Code Examples

bash
curl --location --request GET "https://stat.ripe.net/data/looking-glass/data.json?resource=140.78.0.0/16"
js
const requestOptions = {
	method: 'GET',
};

fetch("https://stat.ripe.net/data/looking-glass/data.json?resource=140.78.0.0/16", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Available versions for this endpoint:

2.1 (current)