# ASN Lookup API
> Look up Autonomous System Numbers (ASNs) — the identifiers that label every network on the public internet — mapped to their owning organisation and country. 122,000+ ASNs derived from the Regional Internet Registries (ARIN, RIPE, APNIC, LACNIC, AFRINIC). Resolve an ASN to its operator (e.g. AS15169 → Google LLC, US; AS13335 → Cloudflare; AS16509 → Amazon), or search by organisation name and country (e.g. "hetzner" in DE). Ideal for network intelligence, abuse/security investigation, traffic analysis, IP-reputation tooling and BGP/peering research.

## 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/asn-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 110,000 calls/Mo, 8 req/s
- **Pro** ($10/Mo) — 550,000 calls/Mo, 20 req/s
- **Mega** ($27/Mo) — 2,600,000 calls/Mo, 50 req/s

## Endpoints

### ASN

#### `GET /v1/asn` — A single ASN → organisation + country

**Parameters:**
- `asn` (query, required, string) — ASN, e.g. 15169 (or AS15169) Example: `15169`

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

**Response:**
```json
{
    "data": {
        "asn": 15169,
        "name": "Google LLC",
        "handle": "GOOGLE",
        "country": "US"
    },
    "meta": {
        "timestamp": "2026-05-31T05:47:59.447Z",
        "request_id": "a1fa911b-3254-45eb-8899-187c511f6bd4"
    },
    "status": "ok",
    "message": "ASN retrieved",
    "success": true
}
```

#### `GET /v1/search` — Search ASNs by organisation name

**Parameters:**
- `q` (query, required, string) — Organisation name, e.g. cloudflare Example: `cloudflare`
- `country` (query, optional, string) — 2-letter country filter, e.g. DE
- `limit` (query, optional, string) — Results per page (1-100, default 20) Example: `20`
- `offset` (query, optional, string) — Pagination offset Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/asn-api/v1/search?q=cloudflare&limit=20&offset=0"
```

**Response:**
```json
{
    "data": {
        "count": 12,
        "limit": 20,
        "query": "cloudflare",
        "total": 12,
        "offset": 0,
        "country": null,
        "results": [
            {
                "asn": 13335,
                "name": "Cloudflare Inc.",
                "handle": "CLOUDFLARENET-AS",
                "country": "US"
            },
            {
                "asn": 14789,
                "name": "Cloudflare Inc.",
                "handle": "CLOUDFLARENET",
                "country": "US"
            },
            {
                "asn": 132892,
                "name": "Cloudflare Inc.",
                "handle": "CLOUDFLARE",
                "country": "US"
            },
            {
                "asn": 133877,
                "name": "Cloudflare Hong Kong LLC",
                "handle": "CLOUDFLARE",
                "country": "US"
            },
            {
                "asn": 139242,
                "name": "Cloudflare Sydney LLC",
                "handle": "CSL-AS-AP",
                "country": "US"
            },
            {
                "asn": 202623,
                "name": "Cloudflare Inc",
                "handle": "CLOUDFLARENET-CORE",
                "country": "US"
            },
            {
                "asn": 203898,
                "name": "Cloudflare Inc",
                "handle": "CLOUDFLARENET-UK",
                "country": "US"
            },
            {
                "asn": 209242,
                "nam
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Totals & top countries

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

**Response:**
```json
{
    "data": {
        "note": "An ASN identifies a network on the public internet. handle = RIR handle; country = registration country.",
        "total": 122788,
        "fields": [
            "asn",
            "name",
            "handle",
            "country"
        ],
        "source": "ipverse/asn-info (Autonomous System Numbers, derived from the RIRs)",
        "countries": 240,
        "top_countries": [
            {
                "count": 32728,
                "country": "US"
            },
            {
                "count": 9284,
                "country": "BR"
            },
            {
                "count": 6463,
                "country": "CN"
            },
            {
                "count": 6133,
                "country": "IN"
            },
            {
                "count": 5826,
                "country": "RU"
            },
            {
                "count": 3897,
                "country": "ID"
            },
            {
                "count": 3296,
                "country": "GB"
            },
            {
                "count": 3283,
                "country": "DE"
            },
            {
                "count": 3006,
                "country": "AU"
            },
            {
                "count": 2528,
                "country": "CA"
            },
            {
                "count": 2481,
                "country": "PL"
            },
            {
                "count": 2211,
                "coun
…(truncated, see openapi.json for full schema)
```


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