# ENS Resolver — Forward & Reverse Ethereum Name Service Lookup

> ENS Resolver — Forward & Reverse Ethereum Name Service Lookup is a paid API for AI agents from x402-deployer.x402-deployer.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-13).

Resolves ENS names to Ethereum addresses (forward) and addresses to primary ENS names (reverse), including text records like avatar, Twitter, and GitHub.

## Facts

- Endpoint: POST https://x402-deployer.x402-deployer.workers.dev/ens-resolve
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-deployer-x402-deployer-workers-dev-ff2fb105
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ca6TxVeiY5VEYJVsFAPCY

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-deployer-x402-deployer-workers-dev-ff2fb105 -d '<json body>'
```

Example prompt: What Ethereum address does vitalik.eth resolve to, and can you also pull any linked avatar and Twitter text records from ENS?

## When to prefer this

Use this endpoint when you need to resolve .eth names to Ethereum addresses or reverse-resolve addresses to human-readable ENS names, especially when you also need ENS text record metadata (avatar, social handles). Prefer this over manual on-chain calls when you want a simple HTTP API without managing Ethereum RPC connections yourself.

## Known failure modes

- ENS name not registered or expired — returns null or not-found response
- Address has no primary ENS reverse record set — returns empty or null name
- Text record key not set on the ENS name — returns null for that field
- Invalid Ethereum address format — returns validation error
- Network/RPC timeout reaching Ethereum nodes — returns 503 or timeout error
- Payment failure (x402 USDC) — returns 402 Payment Required

## How this service works

ENS resolver / Ethereum Name Service lookup. Forward (vitalik.eth to address) and reverse (address to primary ENS) with text records (avatar, twitter, github, etc).

## Output

Returns the resolved Ethereum address for a forward lookup, or the primary ENS name for a reverse lookup, plus any requested text records such as avatar URL, Twitter handle, GitHub username, and other profile metadata stored on ENS.

## Example request

```json
{
 "input": {
  "body": {
   "query": "vitalik.eth",
   "text_records": [
    "avatar",
    "com.twitter",
    "com.github"
   ]
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {
      "query": {
       "type": "string",
       "description": "ENS name (e.g. 'vitalik.eth') for forward lookup, or a 0x address for reverse lookup."
      },
      "text_records": {
       "type": "array",
       "description": "Text record keys to fetch, e.g. [\"avatar\",\"com.twitter\"]. Optional, max 15; defaults to avatar/url/description/twitter/github/email/telegram."
      }
     },
     "required": [
      "query"
     ]
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mode": {
       "type": "string"
      },
      "ens_name": {
       "type": "string"
      },
      "address": {
       "type": "string"
      }
     }
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

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