# code402 ENS Name Resolution API

> code402 ENS Name Resolution API is a paid API for AI agents from verify.code402.dev, paid per call via x402, $0.5/call, status unknown (last checked 2026-10-03).

Resolves an Ethereum Name Service (ENS) name to its on-chain data via a paid-per-call Ethereum chain-data endpoint.

## Facts

- Endpoint: GET https://verify.code402.dev/v1/chain/ens/%7Bname%7D?utm_source=zero.xyz
- Price: $0.5/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-03
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-ens-name-resolution-api-d5c669f6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_160EHHKv5QysJm4secBI-

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 code402-ens-name-resolution-api-d5c669f6
```

Example prompt: What Ethereum address does the ENS name vitalik.eth resolve to? I need the on-chain resolution result.

## When to prefer this

Use this endpoint when you need a paid, verifiable, on-chain ENS name resolution with receipts, particularly in compliance-sensitive or auditable workflows. Prefer it over free public RPC calls when you need reliable uptime, signed receipts (XDR-1), or are already using the code402 compliance/verification ecosystem.

## Known failure modes

- ENS name does not exist or is unregistered — returns null or error result
- ENS name has expired — may return stale or empty data
- Network congestion or RPC failures may cause delayed resolution
- Invalid ENS name format (e.g. missing .eth suffix) may cause a 400/422 error
- Payment failure via x402 on Base USDC prevents call from completing

## How this service works

Deterministic compliance verification (IBAN, sanctions, onchain address) with XDR-1 signed receipts, plus Ethereum chain-data endpoints. Paid per call via x402 on Base (USDC).

## Output

A JSON object containing the resolved chain data for the given ENS name, including the result field (resolution data) and the network field (e.g. 'ethereum'), reflecting the current on-chain state of the ENS record.

## Request schema (JSON Schema)

```json
{
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object"
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type",
    "example"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "json"
    },
    "example": {
     "result": "string",
     "network": "ethereum-mainnet"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": "chain data",
  "network": "ethereum"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-ens-name-resolution-api-d5c669f6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from verify.code402.dev](https://www.zero.xyz/host/verify.code402.dev/llms.txt)
