# ENS / Basename Name Resolver

> ENS / Basename Name Resolver is a paid API for AI agents from x402-micro-pay.com, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-20).

Resolves ENS names and Basenames to Ethereum addresses (and vice versa) with forward-verification, avatar, and source metadata.

## Facts

- Endpoint: POST https://x402-micro-pay.com/api/skills/name-resolve?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ens-basename-name-resolver-1a6b7a33
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B2HYQpU_00LVqMRVwJocw

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-basename-name-resolver-1a6b7a33 -d '<json body>'
```

Example prompt: What Ethereum address does vitalik.eth resolve to, and is the forward lookup verified?

## When to prefer this

Use this endpoint when you need to translate between human-readable ENS/Basename identifiers and raw 0x Ethereum addresses in either direction, especially when you also need forward-verification, avatar metadata, or source provenance. Prefer this over on-chain RPC calls when you want a single JSON API with no key management and pay-per-call pricing via x402 on Base.

## Known failure modes

- Name not registered or expired → ok:false with error message
- Address has no reverse record → ok:false or empty name
- Invalid ENS/0x input format → validation error
- ENS resolver contract unreachable → upstream fetch error
- Name resolves but forward-verification fails → forward_verified: false returned (not an error)

## How this service works

41 pay-per-call JSON APIs for AI agents. No account or API key: an unpaid POST returns HTTP 402, pay in USDC on Base with x402 v2, retry. Prices from $0.001 per call.

## Output

Returns a JSON object with the resolved Ethereum address, the canonical name (ENS or Basename), the block number at resolution time, source identifier, forward_verified boolean, avatar URL (if set), confidence score, data provenance sources with URLs and fetch timestamps, a plain-English summary, and suggested next skills to call.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "maxLength": 200,
   "minLength": 1,
   "description": "ENS/Basename or 0x address"
  },
  "direction": {
   "enum": [
    "auto",
    "forward",
    "reverse"
   ],
   "type": "string",
   "default": "auto"
  },
  "request_id": {
   "type": "string",
   "pattern": "^[A-Za-z0-9._:-]+$",
   "maxLength": 64,
   "minLength": 1,
   "description": "Optional idempotency key. Echoed back; a credit-pack redemption with the same request_id and body is charged once."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "data": {
   "name": "vitalik.eth",
   "block": 22000000,
   "query": "vitalik.eth",
   "avatar": null,
   "source": "ens",
   "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
   "forward_verified": true
  },
  "next": [
   "address_validate",
   "erc20_meta"
  ],
  "skill": "name_resolve",
  "charged": true,
  "service": "name_resolve",
  "sources": [
   {
    "url": "https://etherscan.io/address/0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",
    "name": "ENS Registry",
    "fetched_at": "2026-10-24T14:00:00Z"
   },
   {
    "url": "https://basescan.org/address/0xc6d566a56a1aff6508b41f6c90ff131615583bcd",
    "name": "Basename L2 Resolver",
    "fetched_at": "2026-10-24T14:00:00Z"
   }
  ],
  "summary": "vitalik.eth → vitalik.eth = 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 (ens)",
  "version": "1.0.0",
  "warnings": [],
  "confidence": 0.95,
  "data_as_of": "2026-10-24T14:00:00Z",
  "generated_at": "2026-10-24T14:00:00Z"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ens-basename-name-resolver-1a6b7a33/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-micro-pay.com](https://www.zero.xyz/host/x402-micro-pay.com/llms.txt)
