We make BGP data analysis
bgproutes.io collects BGP routes from operational routers, a.k.a. Vantage Points (VPs), and delivers them through a fast, unified, and intuitive interface.
With bgproutes.io
Today's landscape
Analyze BGP updates with our API.
Our API and its Python client pybgproutesapi
are simple and flexible, letting you access the data you need—no matter the platform or vantage point—without processing irrelevant information.
The example on the right shows how to infer the number of AS hops between AS 1853 and AS 2914 on May 9, 2025, at 01:30:11. First, use vantage_points
to select relevant VPs—for instance, those located in a Dutch network and connected to either bgproutes.io or RIS. Then use rib
to retrieve RIB entries from these VPs at the specified time, filtering for AS paths that contain both ASes consecutively. From there, identifying the shortest AS path is straightforward.
Our functions are optimized for speed, often delivering results within seconds.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
from pybgproutesapi import vantage_points, rib min_hops = None for vp in vantage_points(source=["bgproutes.io", "ris"], country=['NL']): # Get the RIB entries for this VP at the given date and time and with both ASes in the AS path. rib_dic = rib([vp['ip']], date="2025-05-09T01:30:11", aspath_regexp='(^| )1853 (|.* )2914($| )|(^| )2914 (|.* )1853($| )') # Iterate over all entries in the rib. for aspath, community in rib_dic[vp['ip']].values(): # Convert the AS path from a string to a list of integers, then compute the hop count between the two ASes. aspath = [int(asn) for asn in aspath.split(' ')] hop_count = abs(aspath.index(1853) - aspath.index(2914)) # Update the min hop count if needed if min_hops is None or hop_count < min_hops: min_hops = hop_count print('min_hops: ', min_hops)
Start peering with bgproutes.io in less than ten minutes.
As more vantage points help to reduce visibility gaps and improves BGP monitoring and security, we invite everyone to peer with bgproutes.io and contribute BGP data. Our open peering policy ensures that anyone can join!
We make BGP data analysis
bgproutes.io collects BGP routes from operational routers, a.k.a. Vantage Points (VPs), and delivers them through a fast, unified, and intuitive interface.
With bgproutes.io
Today's landscape
© 2025 bgproutes.io. All rights reserved.