# ENS Name Resolution API (x-402.online)

> ENS Name Resolution API (x-402.online) is a paid API for AI agents from api.x-402.online, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-01).

Resolves ENS .eth names to Ethereum addresses and reverse-resolves addresses to their primary ENS name, optionally including avatar.

## Facts

- Endpoint: GET https://api.x-402.online/v1/chain/ens?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ens-name-resolution-api-x-402-online-6b7fd6a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CMMUtYjgQ3WTvSEVGUUEj

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 ens-name-resolution-api-x-402-online-6b7fd6a6
```

Example prompt: What Ethereum address does vitalik.eth resolve to, and does it have an ENS avatar set?

## When to prefer this

Use this endpoint when an agent needs to resolve ENS .eth names to Ethereum addresses or reverse-resolve wallet addresses to human-readable ENS identities, particularly in pay-per-call, no-account-required scenarios using x402/USDC on Base. Prefer this over running your own ENS node or using free public RPC endpoints when you want a reliable, metered, low-friction resolution service.

## Known failure modes

- ENS name not registered or does not resolve to an address — returns null or not-found response
- Address has no primary ENS name set — reverse lookup returns empty result
- Invalid address format provided — returns validation error
- ENS name has no avatar set — avatar field absent or null
- Network or RPC timeout when querying ENS contracts — returns error

## How this service works

ENS name resolution in both directions: an .eth name to its address, or an address to its primary ENS name, with the avatar when set. Query: ?name=vitalik.eth or ?address=0xd8dA…

## Output

Returns the resolved Ethereum address for a given .eth name (forward lookup), or the primary ENS name and avatar URL for a given Ethereum address (reverse lookup). Response includes the ENS name, address, and avatar field when one is configured on the ENS record.

## 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": {}
    }
   },
   "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/ens-name-resolution-api-x-402-online-6b7fd6a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x-402.online](https://www.zero.xyz/host/api.x-402.online/llms.txt)
