BGP Prefix Origin History API
Who announced an IP block in BGP and when, from RIPEstat's routing history (RIPE NCC route collectors): one row per continuous period of each origin AS and prefix, with the AS name, start and end, whether it is still announced and how many RIS peers saw it.
$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/routing-history
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-prefix-origin-history/run" \
-H "Authorization: Bearer $PULLROW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"resources":["8.8.8.0/24"]},"max_items":50}'Inputs
Send them as input in the request body. Leave one out to use its default.
What's in each record
12 fields.
Basics
- Resource
The entry this row answers, as RIPEstat reads it, such as 8.8.8.0/24, 8.8.8.8 or AS15169.
Example 8.8.8.0/24
- Prefix
The announced IP block, such as 8.8.8.0/24.
Example 8.8.8.0/24
- Match type
How the block relates to the entry: exact, covering (a larger block that contains it), more_specific (a smaller block inside it) or originated (announced by the AS number asked for).
Example exact
- Origin asn
The AS number that originated the announcement, such as 15169.
Example 21,284
- Origin as name
RIPEstat's name for that AS number today, such as GOOGLE - Google LLC.
Example LEVEL3 - Level 3 Parent, LLC
- Current
Yes when the period runs to the latest RIS data, so this origin still announces the block; empty when to_date is in the past.
Example No
- Duration days
Length of the period in days, to one decimal.
Example 60
- Full peers seeing
Average number of full-feed RIS peers that saw the route during the period, weighted by time.
Example 22.4
- Maximum full peers seeing
The most full-feed RIS peers that saw the route in any part of the period.
Example 24.1
Dates
- Started
When this origin's announcement of the block began in this period (UTC).
Example Oct 28, 2002
- Ended
When the period ended (UTC); for a period still running, the time of the latest RIS data.
Example Dec 26, 2002
Links
- Ripestat link
The block's page on RIPEstat.
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 |
|---|---|---|---|
resource | text | Resource | 3 of 3 |
prefix | text | Prefix | 3 of 3 |
match_type | text | Match type | 3 of 3 |
origin_asn | number | Origin asn | 3 of 3 |
origin_as_name | text | Origin as name | 2 of 3 |
started_at | date and time | Started | 3 of 3 |
ended_at | date and time | Ended | 3 of 3 |
is_current | yes or no | Current | 3 of 3 |
duration_days | number | Duration days | 3 of 3 |
full_peers_seeing | number | Full peers seeing | 3 of 3 |
max_full_peers_seeing | number | Maximum full peers seeing | 3 of 3 |
ripestat_url | link | Ripestat link | 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 | Resource | Prefix | Match type | Origin asn | Origin as name | Current | Duration days | Full peers seeing | Maximum full peers seeing | Started | Ended | Ripestat link |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 8.8.8.0/24 | 8.8.8.0/24 | exact | 21,284 | — | No | 60 | 22.4 | 24.1 | Oct 28, 2002 | Dec 26, 2002 | stat.ripe.net/resource/8.8.8.0/24 |
| 2 | 8.8.8.0/24 | 8.0.0.0/8 | covering | 3,356 | LEVEL3 - Level 3 Parent, LLC | No | 3,144 | 72 | 113.9 | Jun 1, 2003 | Jan 8, 2012 | stat.ripe.net/resource/8.0.0.0/8 |
| 3 | 8.8.8.0/24 | 8.0.0.0/9 | covering | 3,356 | LEVEL3 - Level 3 Parent, LLC | No | 2,172 | 83.2 | 113.9 | Jan 28, 2006 | Jan 8, 2012 | stat.ripe.net/resource/8.0.0.0/9 |
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.
- Data from RIPEstat by the RIPE NCC, built from its RIS route collectors. Credit RIPEstat (RIPE NCC) when you show or publish results; the RIPE NCC provides this data for network analysis, monitoring, debugging and research.
- Routes seen by fewer than min_peers full-feed RIS peers (10 by default) are left out. Set min_peers to 1 to also see local, low-visibility announcements, where short hijacks and leaks often show.
- Start and end times are only as exact as RIPEstat's history buckets: about 12 days for a window of years and 8 hours for a window of a few weeks. Narrow from_date and to_date for finer times.
- A gap between two periods of the same origin can be a real withdrawal or a gap in RIS data: every route shows the same gaps from 2012-01-09 to 2012-01-20 and from 2014-02-03 to 2014-02-26.
- Periods are cut to the window: one that began before from_date starts at the window's first bucket, and one that ran past to_date ends at to_date. RIS history starts in 2000 and reaches midnight UTC of the current day, so it lags by up to a day.
- Large networks are slow: AS15169, with about 3,200 prefixes, takes about 70 seconds. An entry RIPEstat does not answer within 100 seconds is skipped, and the run then ends as partial with the other entries.
- Up to 50 entries and 5,000 periods per run. Larger blocks announced by other networks (such as 8.0.0.0/9 for 8.8.8.0/24) are included and marked covering; use match_types to keep only some kinds.
- origin_as_name is RIPEstat's current name for the AS number, not necessarily the name it had during the period, and it is empty for numbers RIPEstat has no name for.
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.