# RIPEstat API
> Internet routing and number-resource intelligence as an API, powered by RIPEstat — the open data service of the RIPE NCC, one of the world's five Regional Internet Registries. Answer the questions network engineers, security teams and researchers ask about the public internet: which Autonomous System and prefix does an IP address belong to; what is an AS (its operator/holder name, whether it is currently announced in BGP, its type and registration block); which IPv4 and IPv6 prefixes does an AS announce; who are an AS's BGP neighbours and peers (and how many); who is the abuse-reporting contact for an IP, prefix or ASN, and which RIR is authoritative; and is a prefix correctly originated according to RPKI route-origin validation (valid, invalid or unknown) with the matching ROAs. The data is real-time, drawn from the RIPE NCC's global network of BGP route collectors and the registries. Inputs accept IPv4 and IPv6 addresses, CIDR prefixes and AS numbers (with or without the AS prefix). Ideal for network operations, threat intelligence and abuse handling, BGP and RPKI monitoring, IP reputation and OSINT tooling, and internet research. Data from the RIPE NCC RIPEstat service.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/ripestat-api/..."
```

## Pricing
- **Free** (Free) — 610 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 22,500 calls/Mo, 6 req/s
- **Pro** ($20/Mo) — 96,000 calls/Mo, 15 req/s
- **Mega** ($57/Mo) — 408,000 calls/Mo, 40 req/s

## Endpoints

### Routing

#### `GET /v1/asn` — AS overview

**Parameters:**
- `asn` (query, required, string) — AS number, e.g. 15169 Example: `15169`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/asn?asn=15169"
```

**Response:**
```json
{
    "data": {
        "asn": {
            "asn": "AS15169",
            "type": "as",
            "block": {
                "name": "IANA 16-bit Autonomous System (AS) Numbers Registry",
                "resource": "13312-15359",
                "description": "Assigned by ARIN"
            },
            "holder": "GOOGLE - Google LLC",
            "announced": true
        }
    },
    "meta": {
        "timestamp": "2026-06-01T08:12:57.204Z",
        "request_id": "b5448936-81df-4a59-8ca0-da6cf093cca7"
    },
    "status": "ok",
    "message": "ASN retrieved",
    "success": true
}
```

#### `GET /v1/ip` — IP to AS & prefix

**Parameters:**
- `ip` (query, required, string) — IPv4/IPv6 address, e.g. 8.8.8.8 Example: `8.8.8.8`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/ip?ip=8.8.8.8"
```

**Response:**
```json
{
    "data": {
        "ip": "8.8.8.8",
        "asns": [
            "15169"
        ],
        "prefix": "8.8.8.0/24"
    },
    "meta": {
        "timestamp": "2026-06-01T08:12:57.654Z",
        "request_id": "46802be1-986e-4216-9861-2c74924556c1"
    },
    "status": "ok",
    "message": "IP info retrieved",
    "success": true
}
```

#### `GET /v1/neighbours` — AS BGP neighbours

**Parameters:**
- `asn` (query, required, string) — AS number Example: `15169`
- `limit` (query, optional, string) — Max (1-2000)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/neighbours?asn=15169"
```

**Response:**
```json
{
    "data": {
        "asn": "AS15169",
        "count": 200,
        "counts": {
            "left": 135,
            "right": 20,
            "unique": 333
        },
        "neighbours": [
            {
                "asn": "AS1136",
                "type": "left",
                "v4_peers": 491,
                "v6_peers": 0
            },
            {
                "asn": "AS12310",
                "type": "left",
                "v4_peers": 1,
                "v6_peers": 0
            },
            {
                "asn": "AS12389",
                "type": "left",
                "v4_peers": 3,
                "v6_peers": 8
            },
            {
                "asn": "AS1257",
                "type": "left",
                "v4_peers": 8809,
                "v6_peers": 510
            },
            {
                "asn": "AS12586",
                "type": "left",
                "v4_peers": 4648,
                "v6_peers": 440
            },
            {
                "asn": "AS1267",
                "type": "left",
                "v4_peers": 4612,
                "v6_peers": 0
            },
            {
                "asn": "AS1273",
                "type": "left",
                "v4_peers": 347,
                "v6_peers": 634
            },
            {
                "asn": "AS12735",
                "type": "left",
                "v4_peers": 0,
                "v6_peers": 492
            },
            {
                "asn": "AS
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/prefixes` — Prefixes an AS announces

**Parameters:**
- `asn` (query, required, string) — AS number Example: `15169`
- `limit` (query, optional, string) — Max prefixes (1-2000)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/prefixes?asn=15169"
```

**Response:**
```json
{
    "data": {
        "asn": "AS15169",
        "count": 100,
        "total": 1397,
        "prefixes": [
            "34.2.113.0/24",
            "2a00:1450:4003::/48",
            "108.177.121.0/24",
            "142.251.178.0/24",
            "34.0.234.0/24",
            "192.178.152.0/24",
            "152.65.238.0/24",
            "35.212.0.0/17",
            "34.1.100.0/24",
            "142.250.98.0/24",
            "172.217.17.0/24",
            "34.2.112.0/24",
            "173.194.195.0/24",
            "142.251.188.0/24",
            "142.250.30.0/24",
            "142.250.184.0/24",
            "142.251.25.0/24",
            "173.194.207.0/24",
            "172.217.78.0/24",
            "142.251.110.0/24",
            "64.233.186.0/24",
            "173.194.206.0/24",
            "74.125.201.0/24",
            "173.194.208.0/24",
            "172.253.56.0/24",
            "152.65.237.0/24",
            "172.217.195.0/24",
            "173.194.194.0/24",
            "142.250.0.0/15",
            "192.179.22.0/24",
            "192.178.129.0/24",
            "216.58.199.0/24",
            "2600:1902:160::/44",
            "66.102.8.0/23",
            "142.250.183.0/24",
            "172.217.207.0/24",
            "2600:1902:1d0::/44",
            "172.217.79.0/24",
            "172.253.159.0/24",
            "74.125.26.0/24",
            "192.178.191.0/24",
            "108.177.9.0/24",
            "142.250.201.0/24",
            "173.194.213.0/24",
            "
…(truncated, see openapi.json for full schema)
```

### Security

#### `GET /v1/abuse` — Abuse contact

**Parameters:**
- `resource` (query, required, string) — IP, prefix or ASN Example: `8.8.8.8`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/abuse?resource=8.8.8.8"
```

**Response:**
```json
{
    "data": {
        "resource": "8.8.8.8",
        "abuse_contacts": [
            "network-abuse@google.com"
        ],
        "authoritative_rir": "arin"
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:01.300Z",
        "request_id": "661b990d-413e-45bb-a083-25acc1c50690"
    },
    "status": "ok",
    "message": "Abuse contact retrieved",
    "success": true
}
```

#### `GET /v1/rpki` — RPKI route-origin validation

**Parameters:**
- `asn` (query, required, string) — AS number Example: `15169`
- `prefix` (query, required, string) — CIDR prefix, e.g. 8.8.8.0/24 Example: `8.8.8.0/24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/rpki?asn=15169&prefix=8.8.8.0%2F24"
```

**Response:**
```json
{
    "data": {
        "asn": "AS15169",
        "prefix": "8.8.8.0/24",
        "status": "valid",
        "validating_roas": [
            {
                "origin": "AS15169",
                "prefix": "8.8.8.0/24",
                "validity": "valid",
                "max_length": 24
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:01.477Z",
        "request_id": "fad5415f-d1a7-4076-b27a-540073dbf4df"
    },
    "status": "ok",
    "message": "RPKI validation retrieved",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Usage notes

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/ripestat-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Internet number-resource & BGP routing intelligence from the RIPE NCC. /v1/ip?ip=8.8.8.8 = the Autonomous System(s) and the prefix an IP currently lives in; /v1/asn?asn=15169 = an AS overview (holder/operator name, whether it is currently announced in BGP, type and the registration block it falls in); /v1/prefixes?asn=15169 = every IPv4/IPv6 prefix the AS announces; /v1/neighbours?asn=15169 = the AS's BGP neighbours/peers with peer counts (the shape of its connectivity); /v1/abuse?resource=8.8.8.8 = the abuse-reporting contact for an IP, prefix or ASN and the authoritative RIR; /v1/rpki?asn=15169&prefix=8.8.8.0/24 = RPKI route-origin validation (valid / invalid / unknown) with the matching ROAs. Accepts IPv4/IPv6 addresses, CIDR prefixes and AS numbers (with or without the AS prefix). Data is real-time from the RIPE NCC global routing collectors. For ASN ownership see the ASN API, for IP geolocation the IP Geo API, for driving routes the Routing API.",
        "source": "RIPEstat Data API — RIPE NCC (stat.ripe.net)",
        "endpoints": [
            "/v1/ip",
            "/v1/asn",
            "/v1/prefixes",
            "/v1/neighbours",
            "/v1/abuse",
            "/v1/rpki",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-01T08:13:01.554Z",
        "request_id": "7cb92d5b-20e3-4be0-977c-5091ae27371e"
    },
    "status": "ok",
    "message": "Meta retrieved",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/ripestat-api
OpenAPI spec: https://www.oanor.com/api/ripestat-api/openapi.json
