ASN Upstreams & Peers API
The network neighbours of any ASN as seen in global internet routing (RIPEstat): one row per neighbour with its name, its side in routes, a plain upstream-or-peer or downstream label, how many routing paths show the link and the snapshot time.
$0.50 per 1,000 records
You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.
Data from stat.ripe.net/docs/data-api/api-endpoints/asn-neighbours
Get this data
Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.
Try it
Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key
For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
- Small runs answer in the same request; longer ones answer
202with a run to poll. fieldsreturns only the fields you name. The examples send the ones picked on this page.Idempotency-Keyis optional. A retry with it is never charged twice.- You pay for records returned. Zero records cost zero.
curl -X POST "https://pullrow.dev/v1/apis/bgp-asn-upstreams/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"asns":["AS577","13335"]},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
11 fields.
Basics
- Asn
The network number (ASN) you asked about, such as 577.
Example 577
- Asn name
Registered name of that network, such as BACOM - Bell Canada.
Example BACOM - Bell Canada
- Neighbour asn
Network number (ASN) of the neighbour.
Example 1,299
- Neighbour name
Registered name of the neighbour network, such as TWELVE99 Arelion Sweden AB.
Example TWELVE99 Arelion Sweden AB
- Side
Where the neighbour sits in routes: left (toward the core), right (away from it) or uncertain.
Example left
- Relationship
Plain label made from side: upstream_or_peer (left), downstream (right) or uncertain.
Example upstream_or_peer
- Path count
Number of distinct routing paths that show this link (RIPEstat calls it power); higher means a busier link.
Example 19,332
- Ipv 4 routes seen
IPv4 routes that use this link, counted once for every RIS peer that sees them: a sign of how widely the link is used.
Example 366,496
- Ipv 6 routes seen
IPv6 routes that use this link, counted the same way.
Example 6,381
Dates
- Snapshot at
Time of the routing snapshot the link was seen in (UTC).
Example Dec 5, 2026
Links
- Neighbour link
The neighbour network's page on RIPEstat.
Example stat.ripe.net/resource/AS1299
Technical detailsField names and types for developers
Field names and types
The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.
| Field name | Type | Shown on this page as | Filled |
|---|---|---|---|
asn | number | Asn | 3 of 3 |
asn_name | text | Asn name | 3 of 3 |
neighbour_asn | number | Neighbour asn | 3 of 3 |
neighbour_name | text | Neighbour name | 3 of 3 |
side | text | Side | 3 of 3 |
relationship | text | Relationship | 3 of 3 |
path_count | number | Path count | 3 of 3 |
ipv4_routes_seen | number | Ipv 4 routes seen | 3 of 3 |
ipv6_routes_seen | number | Ipv 6 routes seen | 3 of 3 |
neighbour_url | link | Neighbour link | 3 of 3 |
snapshot_at | date and time | Snapshot at | 3 of 3 |
How it reads the site
Runs on a reader we built and maintain by hand for this site.
Save as pipeline
A pipeline remembers this API, your inputs and the fields you picked. It can run on a schedule and email you the results.
Sample records
| Record | Asn | Asn name | Neighbour asn | Neighbour name | Side | Relationship | Path count | Ipv 4 routes seen | Ipv 6 routes seen | Snapshot at | Neighbour link |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 577 | BACOM - Bell Canada | 1,299 | TWELVE99 Arelion Sweden AB | left | upstream_or_peer | 19,332 | 366,496 | 6,381 | Dec 5, 2026 | stat.ripe.net/resource/AS1299 |
| 2 | 577 | BACOM - Bell Canada | 6,939 | HURRICANE - Hurricane Electric LLC | left | upstream_or_peer | 13,609 | 50,465 | 49,494 | Dec 5, 2026 | stat.ripe.net/resource/AS6939 |
| 3 | 577 | BACOM - Bell Canada | 174 | COGENT-174 - Cogent Communications, LLC | left | upstream_or_peer | 10,830 | 168,350 | 1,985 | Dec 5, 2026 | stat.ripe.net/resource/AS174 |
Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.
Reliability
Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.
Incidents and repairs
How it is kept working What a repair can't do
A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.
- You pay only for records returned. A run that returns none costs nothing.
- Links come from the routes that RIPE NCC's RIS route collectors receive. A link that never shows up in those routes, such as a private peering, is missing: this is a public view of a network's neighbours, never a complete list.
- side is RIPEstat's position in routes: left means closer to the internet core (usually an upstream provider or a peer), right means further away (usually a customer). relationship is a label made from side, not a contract fact.
- A neighbour seen on both sides comes back once per side. uncertain marks neighbours seen on the left only as direct peers of a route collector, which can be caused by RIPE NCC's own peering.
- Without a date you get the newest snapshot, which is usually about a day old. With a date you get the snapshot at 00:00 UTC that day; a date after the newest snapshot gives the newest one.
- neighbour_name and asn_name stay empty for numbers with no registered name (private, reserved or unused numbers) and when names are turned off.
- Big transit networks have thousands of neighbours (Cloudflare about 2,500 rows, Bell Canada about 350): set the record limit to match. At most 100 networks and 10,000 rows per run; rows come upstreams first, busiest links first.
- Data from RIPEstat by RIPE NCC under the RIPEstat Service Terms and Conditions: credit RIPEstat when you publish it.
Version history
A run uses the live version unless the request names another one with version.
Manage this API
Only your workspace sees this part.
Automatic repair
Off: a rebuilt version is stored and waits for you in the version history.
Delete this API
Removes the API, its versions and the saved records of its runs. Calls to its address then answer 404. Records already charged stay charged. This cannot be undone.