# 2s ASN Lookup

> 2s ASN Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0012/call, status unknown (last checked 2026-09-13).

Looks up detailed information about an Autonomous System Number (ASN), including holder, routing, IP block, and announcement status.

## Facts

- Endpoint: GET https://2s.io/api/net/asn
- Price: $0.0012/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-asn-lookup-7baf82df
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_YNij0VJMGu-WltvWHqcDi

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 2s-asn-lookup-7baf82df
```

Example prompt: Can you look up ASN 15169 and tell me who holds it, whether it's currently announced, and how many IPv4 prefixes and IP addresses it's advertising?

## When to prefer this

Use this endpoint when you need authoritative, ground-truth data about an Autonomous System Number — including its holder, BGP routing status, IP prefix counts, and registry block — sourced directly from RIPEstat/RIPE NCC. Prefer this over generic WHOIS tools when you need structured JSON output with routing metrics like observed neighbours and announced IPv4 prefixes. Ideal for network intelligence, security investigations, and infrastructure enrichment workflows.

## Known failure modes

- Invalid or non-existent ASN returns error or empty routing data
- ASN not yet announced returns announced: false with empty routing stats
- Malformed ASN string (missing 'AS' prefix handled, but non-numeric input may error)
- Upstream RIPEstat API unavailability may cause delayed or failed responses

## How this service works

Look up an Autonomous System (BGP) by AS number. Pass asn as AS3333 or 3333. Returns the AS holder/operator name, the IANA/RIR allocation block it falls in, whether it is currently announced, and a live routing-status block: first/last seen prefixes, announced IPv4/IPv6 prefix + address counts, RIS peer visibility, and observed BGP neighbour count. Data: RIPEstat (RIPE NCC), free and public. Distinct from geo.ip (host geolocation) and dns/whois (name lookups) — this is who-owns-and-routes-this-AS, observed live from the global routing table. For network forensics, abuse/security triage, and infrastructure mapping.

## Output

Returns a JSON object with the ASN integer, the holder organization name, the IANA/RIR block the ASN falls within (name, resource range, description), routing details (announced status, IPv4 IP count, IPv4 prefix count, observed BGP neighbours), and the data source provider (e.g. RIPEstat).

## 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",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "required": [
      "asn"
     ],
     "properties": {
      "asn": {
       "type": "string",
       "description": "AS number, e.g. AS3333 or 3333."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-asn-lookup-7baf82df/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
