Get real-time BGP routes for a prefix
client.radar.bgp.routes.realtime(RouteRealtimeParams { format, prefix } query?, RequestOptionsoptions?): RouteRealtimeResponse { meta, routes }
GET/radar/bgp/routes/realtime
Retrieves real-time BGP routes for a prefix, using public real-time data collectors (RouteViews and RIPE RIS).
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Get real-time BGP routes for a prefix
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.radar.bgp.routes.realtime();
console.log(response.meta);{
"result": {
"meta": {
"asn_info": [
{
"as_name": "as_name",
"asn": 0,
"country_code": "country_code",
"org_id": "org_id",
"org_name": "org_name"
}
],
"collectors": [
{
"collector": "collector",
"latest_realtime_ts": "latest_realtime_ts",
"latest_rib_ts": "latest_rib_ts",
"latest_updates_ts": "latest_updates_ts",
"peers_count": 0,
"peers_v4_count": 0,
"peers_v6_count": 0
}
],
"data_time": "data_time",
"prefix_origins": [
{
"origin": 0,
"prefix": "prefix",
"rpki_validation": "rpki_validation",
"total_peers": 0,
"total_visible": 0,
"visibility": 0
}
],
"query_time": "query_time"
},
"routes": [
{
"as_path": [
0
],
"collector": "collector",
"communities": [
"string"
],
"prefix": "prefix",
"timestamp": "timestamp"
}
]
},
"success": true
}Returns Examples
{
"result": {
"meta": {
"asn_info": [
{
"as_name": "as_name",
"asn": 0,
"country_code": "country_code",
"org_id": "org_id",
"org_name": "org_name"
}
],
"collectors": [
{
"collector": "collector",
"latest_realtime_ts": "latest_realtime_ts",
"latest_rib_ts": "latest_rib_ts",
"latest_updates_ts": "latest_updates_ts",
"peers_count": 0,
"peers_v4_count": 0,
"peers_v6_count": 0
}
],
"data_time": "data_time",
"prefix_origins": [
{
"origin": 0,
"prefix": "prefix",
"rpki_validation": "rpki_validation",
"total_peers": 0,
"total_visible": 0,
"visibility": 0
}
],
"query_time": "query_time"
},
"routes": [
{
"as_path": [
0
],
"collector": "collector",
"communities": [
"string"
],
"prefix": "prefix",
"timestamp": "timestamp"
}
]
},
"success": true
}