# ENS Resolution API (Onchain Query)

> ENS Resolution API (Onchain Query) is a paid API for AI agents from chain.cyberwarex.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Resolves ENS names to Ethereum addresses (forward lookup) or resolves Ethereum addresses back to their primary ENS name (reverse lookup)

## Facts

- Endpoint: GET https://chain.cyberwarex.com/ens
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ens-resolution-api-onchain-query-57c2a9ef
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TRZdYTIhchhscSrT5l3dT

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-resolution-api-onchain-query-57c2a9ef
```

Example prompt: What Ethereum address does vitalik.eth resolve to? Or, flip it around — what ENS name is associated with 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call ENS resolution without managing your own Ethereum RPC infrastructure or API keys. Ideal for agents that need to enrich wallet addresses with human-readable names, validate ENS identities, or resolve names to addresses on-the-fly. It covers both forward (name→address) and reverse (address→name) lookups in a single endpoint with deterministic JSON output.

## Known failure modes

- Name not registered — resolved=false, address=null
- Address has no primary ENS record set — resolved=false, name=null
- Reverse record exists but forward verification fails — resolved=false with a descriptive note
- Invalid address format — schema validation rejects input before call
- Payment failure — x402 payment of $0.003 USDC not processed, 402 response returned

## How this service works

ENS name resolution in both directions on Ethereum mainnet. Pass name to resolve an ENS name to its address (forward), or pass address to get that address's primary ENS name (reverse, forward-verified so spoofed reverse records are rejected). Read straight from the ENS registry. Use it to turn vitalik.eth into an address, or to label a raw address with a human-readable name.

## Output

Returns a JSON object with: `resolved` (boolean indicating success), `name` (the primary ENS name if reverse-resolved, or null), `address` (the 0x address if forward-resolved, or null), and an optional `note` field explaining any forward-verification failure for reverse records.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "anyOf": [
      {
       "required": [
        "name"
       ]
      },
      {
       "required": [
        "address"
       ]
      }
     ],
     "required": [],
     "properties": {
      "name": {
       "type": "string",
       "description": "ENS name to resolve forward, e.g. vitalik.eth."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$",
       "description": "Address to reverse-resolve to its primary ENS name."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "name": {
       "type": [
        "string",
        "null"
       ]
      },
      "note": {
       "type": [
        "string",
        "null"
       ],
       "description": "Set when a reverse record failed forward verification."
      },
      "address": {
       "type": [
        "string",
        "null"
       ]
      },
      "resolved": {
       "type": "boolean"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ens-resolution-api-onchain-query-57c2a9ef/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.cyberwarex.com](https://www.zero.xyz/host/chain.cyberwarex.com/llms.txt)
