BYTETOOLS

RIPEstat API

Query internet routing data from RIPE NCC: announcing ASNs, prefixes, whois, abuse contacts and routing history. No key. Verified example and envelope guide.

No API key requiredCORS enabledHTTPSFree tier

Endpoint tested and returned HTTP 200 on 2026-08-21

What is the RIPEstat API?

RIPEstat is RIPE NCC's public internet measurement API. `GET https://stat.ripe.net/data/network-info/data.json?resource=8.8.8.8` returns the announcing ASNs and covering prefix for an address. Dozens of other data calls cover whois, routing history, abuse contacts and geolocation, all without an API key.

RIPEstat is the closest thing the public internet has to an authoritative routing oracle, and it is free. The design is uniform: every data call lives at `/data/{call}/data.json` and takes a `resource` parameter that can be an IP address, a prefix, an ASN or a country code, depending on the call. Learn the envelope once and forty-odd data calls become available with no further reading.

That envelope is worth understanding because it is unusually informative. `cached` tells you whether you got a fresh computation or a stored one, `process_time` and `server_id` help when you report a problem, and `data_call_status` warns you when a call is deprecated before it disappears. Note that ASNs come back as strings rather than integers, and there is a `status_code` inside the body that duplicates the HTTP status. RIPE asks heavy users to identify themselves with a `sourceapp` parameter.

Quick facts

Base URL
https://stat.ripe.net/data
Authentication
No key or account. RIPE asks automated clients to add a `sourceapp` query parameter naming their application so traffic can be attributed.
Rate limit
Not published as a hard number. Heavy users are asked to set `sourceapp` and to cache; abusive clients are blocked.
Pricing
Free, funded by RIPE NCC as a public service.
CORS
Enabled — callable directly from browser JavaScript
Official docs
Read the docs

How to use the RIPEstat API

Every request below was executed against the live API on 2026-08-21, and the response shown is the real body it returned — not an illustration.

1. Find the ASNs announcing an IP address

GET https://stat.ripe.net/data/network-info/data.json?resource=8.8.8.8

curl
curl 'https://stat.ripe.net/data/network-info/data.json?resource=8.8.8.8'
JavaScript (fetch)
const res = await fetch("https://stat.ripe.net/data/network-info/data.json?resource=8.8.8.8");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);
Python (requests)
import requests

res = requests.get("https://stat.ripe.net/data/network-info/data.json?resource=8.8.8.8", timeout=20)
res.raise_for_status()
print(res.json())
Response — HTTP 200
{
  "messages": [],
  "see_also": [],
  "version": "1.1",
  "data_call_name": "network-info",
  "data_call_status": "supported",
  "cached": true,
  "query_id": "20260821074620-38ccf9ef-490d-47f0-8a0a-88d191e100e1",
  "process_time": 10,
  "server_id": "app188",
  "build_version": "v0.11.7-2026.08.19",
  "pipeline": "1387518",
  "status": "ok",
  "status_code": 200,
  "time": "2026-08-21T07:46:20.737235",
  "data": {
    "asns": [
      "15169"
    ],
    "prefix": "8.8.8.0/24"
  }
}

Parameters

ParameterTypeRequiredDescription
resourcestringRequiredThe thing to look up: an IP address, a CIDR prefix, an AS number or a country code, depending on the data call. 8.8.8.8
{data_call}pathRequiredWhich dataset to query. `network-info`, `as-overview`, `announced-prefixes`, `whois`, `abuse-contact-finder`, `routing-status` and many more. network-info
sourceappstringOptionalFree-text identifier for your application. Requested for all automated use. bytetools-demo
starttime / endtimestringOptionalTime bounds for historical data calls, as ISO 8601 timestamps. 2026-01-01T00:00:00

Response fields

dataobject
The payload, whose shape depends entirely on the data call. For `network-info` it holds `asns` and `prefix`.
data.asnsarray of strings
AS numbers announcing the resource, as STRINGS without the `AS` prefix. Cast before numeric comparison.
data.prefixstring
The most specific covering prefix in CIDR form, such as `8.8.8.0/24`.
status / status_codestring / integer
`ok` plus a numeric code duplicating the HTTP status. A 200 with a non-ok status is possible, so check both.
cachedboolean
Whether the answer came from cache. Useful when you are watching for a change to propagate.
data_call_statusstring
`supported`, or a deprecation notice. Log it, because it is your early warning that a call is going away.
query_id / server_id / process_timestring / integer
Diagnostics to quote when reporting a problem to RIPE. `process_time` is in milliseconds.
timestring
When the query was answered, as an ISO 8601 timestamp without a timezone suffix.

What you can build with the RIPEstat API

  • Identify which network operator announces a given IP address during an incident
  • Find the abuse contact for an address that is attacking your service
  • Monitor whether your own prefixes are being announced correctly, or hijacked
  • Enrich logs with ASN and prefix data at investigation time
  • Study routing history around an outage using time-bounded data calls

Common errors and how to fix them

status ok but empty data

The resource is valid but unannounced, for example a private or unrouted address.

Fix: Check `data.asns` for an empty array before assuming a lookup failed; unrouted space is a legitimate answer.

400

The `resource` type does not suit the data call, such as an ASN passed to an address-only call.

Fix: Each data call documents which resource types it accepts. `network-info` wants an IP or prefix, `as-overview` wants an ASN.

Deprecation notice in data_call_status

The data call is scheduled for removal.

Fix: Read the `messages` array, which carries the human-readable warning, and migrate before the call is withdrawn.

RIPEstat API — frequently asked questions

Is RIPEstat free to use?

Yes, entirely, with no key or account. RIPE NCC funds it as a public service and only asks that automated clients identify themselves with a `sourceapp` parameter.

Does it only cover Europe?

No. Despite RIPE being the European registry, RIPEstat aggregates global routing and registry data, including resources from ARIN, APNIC, LACNIC and AFRINIC.

Why are ASNs returned as strings?

The API represents resource identifiers as strings throughout for consistency across data calls. Cast them to integers yourself if you need numeric comparison.

How current is the routing data?

Most calls are updated continuously from RIS route collectors, with a lag of minutes rather than seconds. The `cached` field tells you whether your specific response was recomputed.

Tools that pair with this API

RIPEstat is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 2026-08-21; always check the official documentation before relying on this API in production, as terms and limits can change.