# Nightshift Labs ENS Resolve API

> Nightshift Labs ENS Resolve API is a paid API for AI agents from nightshift-x402.nightshift-labs.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-18).

Resolves an ENS or Basename to its Ethereum address (and records), or reverse-resolves a 0x address to its ENS name

## Facts

- Endpoint: GET https://nightshift-x402.nightshift-labs.workers.dev/v1/ens/resolve?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-labs-ens-resolve-api-4538cc52
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OL2VpNmyVod6Sh8VuittL

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 nightshift-labs-ens-resolve-api-4538cc52
```

Example prompt: What Ethereum address does vitalik.eth resolve to, and are there any URL records attached to it?

## When to prefer this

Use this endpoint when you need to resolve ENS or Base names to Ethereum addresses (or vice versa) with pay-per-call pricing via x402/USDC on Base, requiring no API key setup — ideal for AI agents that need lightweight, on-demand ENS resolution without a subscription or self-hosted node. Prefer this over running your own ENS resolution if you want zero infrastructure overhead and are already operating in the x402 micropayment ecosystem.

## Known failure modes

- ENS name not registered or has no resolver — returns empty or null address
- 0x address has no reverse ENS record set — reverse lookup returns null name
- Malformed query (not a valid ENS name or 0x address) — likely 400 or error response
- ENS resolution service unavailable or timeout — 5xx error
- Payment failure via x402 protocol — 402 response if USDC balance insufficient

## How this service works

Resolve ENS and Basenames (name.eth, name.base.eth): name → address, or address → primary name with forward verification, plus text records (avatar, description, url, twitter, github, email).

## Output

A JSON object containing the resolved name, the query input, the resolution type (forward or reverse), the matching Ethereum address (0x format), and any attached ENS records such as URL. Example: {name: 'vitalik.eth', type: 'forward', query: 'vitalik.eth', address: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', records: {url: 'https://vitalik.ca'}}

## 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",
     "required": [
      "q"
     ],
     "properties": {
      "q": {
       "type": "string",
       "description": "ENS/Basename (e.g. vitalik.eth, jesse.base.eth) or a 0x address for reverse lookup"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "vitalik.eth",
  "type": "forward",
  "query": "vitalik.eth",
  "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "records": {
   "url": "https://vitalik.ca"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-labs-ens-resolve-api-4538cc52/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nightshift-x402.nightshift-labs.workers.dev](https://www.zero.xyz/host/nightshift-x402.nightshift-labs.workers.dev/llms.txt)
