# x402 Agent Hub ENS Resolver

> x402 Agent Hub ENS Resolver is a paid API for AI agents from x402-agent-hub.x402-agent-hub.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-14).

Resolves an ENS name to its Ethereum address (forward) or an Ethereum address to its primary ENS name (reverse), using the Ethereum mainnet Universal Resolver with CCIP-read support.

## Facts

- Endpoint: GET https://x402-agent-hub.x402-agent-hub.workers.dev/v1/chain/ens?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agent-hub-ens-resolver-5571ec92
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5xXrzdknllPSC3Aq1e60W

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 x402-agent-hub-ens-resolver-5571ec92
```

Example prompt: What Ethereum address does vitalik.eth resolve to? Use the ENS resolver.

## When to prefer this

Choose this endpoint when you need to resolve ENS names (including offchain/CCIP-read names) to Ethereum addresses, or reverse-resolve addresses to their primary ENS name on Ethereum mainnet. It is pay-per-successful-read with no charge on errors, making it cost-efficient for occasional lookups. Prefer this over general blockchain RPC calls when you want a simple, agent-friendly API without managing your own Ethereum node or ENS library.

## Known failure modes

- Invalid or malformed ENS name returns an error and cancels settlement
- Address not found or no primary ENS name set returns not-found error
- Both 'name' and 'address' provided simultaneously — only one is accepted
- Upstream Ethereum node or Universal Resolver downtime causes upstream error (no charge)
- Non-checksummed or malformed Ethereum address rejected as invalid input

## How this service works

Resolve an ENS name to an address, or an address to its primary ENS name, via the Ethereum mainnet Universal Resolver (CCIP-read / offchain names supported). Pass exactly one of 'name' or 'address'. You only pay for successful reads: invalid input, not-found and upstream errors cancel settlement.

## Output

Returns a JSON object with the resolved ENS name, the corresponding Ethereum address, and the direction of resolution (forward for name→address, reverse for address→name). Example: {"name":"vitalik.eth","address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","direction":"forward"}.

## 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": {
      "name": {
       "type": "string",
       "description": "ENS name to resolve, e.g. vitalik.eth."
      },
      "address": {
       "type": "string",
       "description": "Address to reverse-resolve to its primary ENS name."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "vitalik.eth",
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "direction": "forward"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agent-hub-ens-resolver-5571ec92/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-hub.x402-agent-hub.workers.dev](https://www.zero.xyz/host/x402-agent-hub.x402-agent-hub.workers.dev/llms.txt)
