# IP to ASN & Carrier Inference API

> IP to ASN & Carrier Inference API is a paid API for AI agents from apiwitchcraft.duckdns.org, paid per call via x402, $0.002/call, status down (last checked 2026-09-15).

Resolves any IP address to its ASN, ISP/org, mobile flag, proxy/hosting signals, inferred carrier, and connection type for fraud screening and geo-routing.

## Facts

- Endpoint: GET https://apiwitchcraft.duckdns.org/ip/carrier
- Price: $0.002/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ip-to-asn-carrier-inference-api-c737c287
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EJAB8u9kK9wYUK52ieSdt

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-carrier-inference-api-c737c287
```

Example prompt: Can you look up the ASN, carrier, and connection type for IP 203.0.113.47 and tell me if it's a mobile network or a proxy/hosting provider?

## When to prefer this

Use this endpoint when you need lightweight, pay-per-call IP-to-carrier and ASN enrichment without a carrier contract or enterprise onboarding — ideal for agentic payment pipelines needing SIM-swap risk signals, fraud screening by connection type, or geo-routing decisions based on network metadata. Prefer this over full telco Network-as-Code APIs when you lack carrier relationships or need a simple per-IP lookup paid in USDC on Base.

## Known failure modes

- Invalid or malformed IP address returns an error response
- Private/reserved IP ranges (RFC1918, loopback) may return empty or error results
- Very new IP allocations may not yet appear in ASN data
- Carrier inference may be unavailable for some regional or tier-3 ISPs
- Service unavailability if the underlying GeoIP/ASN database is stale or unreachable

## How this service works

IP to ASN and carrier inference: resolve any IP to its Autonomous System (ASN), ISP/org, mobile flag, proxy/hosting signals, and an inferred carrier and connection type. A lightweight, agent-callable counterpart to telco Network-as-Code device-location APIs — no carrier contract, no onboarding, pay per call in USDC on Base. Built for fraud screening, geo-routing, and SIM-swap-style risk signals in agentic payment pipelines.

## Output

Returns the ASN number and name, ISP/organization name, a mobile device flag, proxy/VPN/hosting detection signals, an inferred mobile carrier name, and a connection type classification (e.g. mobile, broadband, hosting) for the queried IP address.

## 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": {
      "ip": {
       "type": "string"
      }
     }
    }
   },
   "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-carrier-inference-api-c737c287/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from apiwitchcraft.duckdns.org](https://www.zero.xyz/host/apiwitchcraft.duckdns.org/llms.txt)
