# x402 DNS Lookup / DNS-over-HTTPS Resolver

> x402 DNS Lookup / DNS-over-HTTPS Resolver is a paid API for AI agents from x402.agentutility.ai, paid per call via x402, $0.02/call, not verified (last probed 2026-10-11); live alternatives: Stable Domains Availability Checker ($0.05) and NetIntel Bulk Domain Availability Check ($0.1).

Agents call it through Zero, which pays per call: no API key and no wallet of your own. New accounts start with $5.

Live alternatives for the same use case:
- [Stable Domains Availability Checker](https://www.zero.xyz/c/stable-domains-availability-checker-d9c6e557) ($0.05)
- [NetIntel Bulk Domain Availability Check](https://www.zero.xyz/c/netintel-bulk-domain-availability-check-0a16e4f3) ($0.1)

Queries Cloudflare 1.1.1.1 DoH to retrieve any combination of DNS record types (A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, DNSKEY, DS, TLSA, HTTPS, SVCB) for a given domain, returning grouped and flat result shapes with TTLs.

## Facts

- Endpoint: POST https://x402.agentutility.ai/dns-lookup?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-agentutility-ai-7c55e52a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_z30KuPqbnSCe53AI6k8Hf

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 x402-agentutility-ai-7c55e52a -d '<json body>'
```

Example prompt: Can you look up the MX and TXT DNS records for example.com so I can check its mail routing and SPF/DMARC configuration?

## When to prefer this

Prefer this endpoint when an agent needs programmatic DNS resolution without setting up a local resolver, when checking email infrastructure (MX, SPF/DMARC TXT), validating DNSSEC, inspecting CAA records for certificate issuance policy, or detecting CDN routing — especially when multiple record types are needed in a single call with both grouped and flat output shapes.

## Known failure modes

- Domain does not exist (NXDOMAIN) — returns empty result or error indicating non-existent domain
- Requested record type not present for domain — returns empty array for that type
- Invalid domain format supplied — validation error response
- Upstream Cloudflare DoH timeout or unavailability — upstream error propagated
- Unsupported record type requested — error or ignored field

## How this service works

DNS lookup / DNS resolver / dig replacement / nslookup API / DoH proxy / authoritative-record fetch / MX checker / SPF + DMARC TXT inspector / CAA + DNSSEC inspector / nameserver finder / CDN-routing detector. Queries Cloudflare 1.1.1.1 DNS-over-HTTPS for any subset of A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, DNSKEY, DS, TLSA, HTTPS, SVCB records and returns both grouped (per type, with TTL) and flat shapes for easy consumption.

## Output

Returns DNS records grouped by record type (each group includes the type, TTL, and list of record data values) as well as a flat list of all records — making it easy to inspect individual record types or iterate across all results at once.

## Example request

```json
{
 "input": {
  "body": {
   "types": [
    "A",
    "AAAA",
    "MX",
    "TXT",
    "NS"
   ],
   "domain": "example.com"
  },
  "type": "http",
  "method": "POST",
  "bodyType": "json"
 }
}
```

## 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": {
     "required": [
      "domain"
     ],
     "properties": {
      "types": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Optional record types to query. Default: ['A', 'AAAA', 'MX', 'TXT', 'NS']. Any of A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, DNSKEY, DS, TLSA, HTTPS, SVCB."
      },
      "domain": {
       "type": "string",
       "description": "Domain or hostname to resolve (e.g. 'example.com', 'mail.example.com'). Sent as-is, not stripped to apex."
      }
     }
    },
    "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",
     "properties": {
      "flat": {
       "type": "object",
       "properties": {
        "a": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "mx": {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        "txt": {
         "type": "array",
         "items": {
          "type": "string"
         }
        }
       }
      },
      "domain": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "records": {
       "type": "object",
       "properties": {
        "A": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "ttl": {
            "type": "integer"
           },
           "data": {
            "type": "string"
           }
          }
         }
        },
        "MX": {
         "type": "array",
         "items": {
          "type": "object",
          "properties": {
           "ttl": {
            "type": "integer"
           },
           "data": {
            "type": "string"
           }
          }
         }
        },
        "TXT": {
         "type": "array",
       
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "flat": {
   "a": [
    "93.184.216.34"
   ],
   "mx": [
    "0 ."
   ],
   "txt": [
    "v=spf1 -all"
   ]
  },
  "domain": "example.com",
  "source": "Cloudflare DNS-over-HTTPS (1.1.1.1)",
  "records": {
   "A": [
    {
     "ttl": 3600,
     "data": "93.184.216.34"
    }
   ],
   "MX": [
    {
     "ttl": 3600,
     "data": "0 ."
    }
   ],
   "TXT": [
    {
     "ttl": 3600,
     "data": "v=spf1 -all"
    }
   ]
  },
  "total_records": 5
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-agentutility-ai-7c55e52a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.agentutility.ai](https://www.zero.xyz/host/x402.agentutility.ai/llms.txt)
