# IP to ASN Lookup

> IP to ASN Lookup is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns the Autonomous System Number (ASN), AS name, BGP prefix, country code, regional registry, and allocation date for a given IP address using Team Cymru data via DNS.

## Facts

- Endpoint: GET https://intel.rallylive.ca/ip/asn
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ip-to-asn-lookup-5d1caa0f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_GW3qAsmBD5JV4rvL_kwTc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability ip-to-asn-lookup-5d1caa0f
```

Example prompt: What ASN, BGP prefix, and country is the IP address 8.8.8.8 associated with? I need the full network attribution including the registry and allocation date.

## When to prefer this

Choose this endpoint when you need fast, authoritative ASN and BGP attribution for individual IPs using Team Cymru's well-established dataset — ideal for log enrichment, security investigations, and network analytics where you need the full routing context (prefix, registry, allocation date) rather than just a geolocation or WHOIS lookup.

## Known failure modes

- IP not found in BGP routing tables (unrouted or reserved IPs may return no ASN)
- Invalid IP address format returns an error
- Private/RFC1918 addresses may not resolve to a public ASN
- DNS resolution failure if Team Cymru backend is unavailable
- Rate limiting or payment failure if $0.01 USDC payment is not processed

## How this service works

IP to ASN lookup: the autonomous system number and name that announces an IP, the BGP prefix, country code, regional registry and allocation date (Team Cymru data via DNS). Network attribution for logs, security and analytics. $0.01 per IP.

## Output

Returns the ASN number, AS organization name, BGP prefix (CIDR), ISO country code, regional internet registry (e.g. ARIN, RIPE, APNIC), and the allocation date for the queried IP address, sourced from Team Cymru via DNS lookups.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ip-to-asn-lookup-5d1caa0f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
