# ENS Bidirectional Resolver

> ENS Bidirectional Resolver is a paid API for AI agents from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Resolves ENS names to Ethereum addresses (forward) and Ethereum addresses to primary ENS names (reverse), live on Ethereum mainnet.

## Facts

- Endpoint: POST https://agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/v1/onchain/ens
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/ens-bidirectional-resolver-7549c73c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fNpd1i2_IBY54HKVQWGaw

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-bidirectional-resolver-7549c73c -d '<json body>'
```

Example prompt: What Ethereum address does vitalik.eth resolve to on mainnet? Also, can you reverse-lookup 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 and tell me its primary ENS name?

## When to prefer this

Choose this endpoint when you need live, authoritative ENS resolution directly from Ethereum mainnet — both forward (ENS → address) and reverse (address → ENS name) in a single API. Prefer it over cached or third-party ENS lookup services when accuracy and freshness matter, such as before executing a transaction or displaying verified identity. Ideal for wallet UX, address books, identity agents, and DeFi workflows where stale data could cause errors.

## Known failure modes

- ENS name has no address record — address field returns null
- Ethereum address has no primary ENS name set — name field returns null
- Invalid ENS name format (too short or malformed) — validation error
- Invalid Ethereum address format (not matching 0x hex pattern) — schema validation rejection
- Neither name nor address provided in body — required field error
- Network or RPC latency spike causing slow or failed on-chain resolution

## Output

Returns a result object containing the queried ENS name or address (query field), the resolved Ethereum address (address field, null if not found), and the resolved ENS name (name field, null if not set). Also includes the route and machine identifiers, plus pricing economics.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [],
     "properties": {
      "name": {
       "type": "string",
       "maxLength": 255,
       "minLength": 3,
       "description": "ENS name to resolve to an address (e.g. vitalik.eth)."
      },
      "address": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Address to reverse-resolve to its primary ENS name."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "machine",
      "route",
      "result"
     ],
     "properties": {
      "route": {
       "type": "string"
      },
      "result": {
       "type": "object",
       "properties": {
        "name": {
         "type": [
          "string",
          "null"
         ]
        },
        "query": {
         "type": [
          "string",
          "null"
         ]
        },
        "address": {
         "type": [
          "string",
          "null"
         ]
        }
       }
      },
      "machine": {
       "type": "string"
      },
      "economics": {
       "type": "object",
       "properties": {
        "sellPriceUsd": {
         "type": "number"
        },
        "upstreamCostUsdActual": {
         "type": [
          "number",
          "null"
         ]
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/ens-bidirectional-resolver-7549c73c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-commerce-factory-jm.austriaeast.cloudapp.azure.com](https://www.zero.xyz/host/agent-commerce-factory-jm.austriaeast.cloudapp.azure.com/llms.txt)
