# ASN Lookup (RDAP) (`asn.lookup`)

Registry record of an autonomous system number over RDAP: name, organisation, country and registration dates.

- **Route:** `POST /v1/run/asn.lookup`
- **Price:** $0.001 per request ($1.00 per 1,000) · `cost_usd` on every response
- **Source:** Registry RDAP servers (IANA bootstrap) (`rdap`) · failover: no
- **Measured latency:** p50 728 ms · p95 728 ms · p99 728 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `asn` | string | yes |  | AS number, e.g. AS15169 |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `asn` | AS number. |
| `name` | AS name. |
| `organization` | Registrant organisation. |
| `country` | Country code when the registry gives one. |
| `registry` | RDAP server that answered. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/asn.lookup \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"asn":"AS13335"}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('asn.lookup', {'asn': 'AS13335'})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run asn.lookup '{"asn":"AS13335"}'
```

Quote first (free, validates input): `POST /v1/quote/asn.lookup` with the same body.
