# DNS Lookup via Cloudflare DoH

> DNS Lookup via Cloudflare DoH is a paid API for AI agents from ZeroClick x402 Service Registry at dns.withzero.ai, paid per call via MPP, $0.001/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)

Look up DNS records (A, AAAA, CNAME, MX, TXT, NS, SOA) for any domain using Cloudflare DNS-over-HTTPS

## Facts

- Endpoint: POST https://dns.withzero.ai/run?utm_source=zero.xyz
- Price: $0.001/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Provider: ZeroClick x402 Service Registry
- Website: https://withzero.ai
- Tags: data, dns, domain, lookup, network, records, nameserver
- Canonical page: https://www.zero.xyz/c/zeroclick-x402-service-registry-dns-lookup-31704dfd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6INp2CbjTcuh6s_mdIFX4

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 zeroclick-x402-service-registry-dns-lookup-31704dfd -d '<json body>'
```

Example prompt: What are the MX records for gmail.com? I want to see which mail servers handle its email.

## When to prefer this

Use this endpoint when you need fast, reliable DNS resolution without managing API keys or rate limits. Ideal for agents that need to resolve domain infrastructure, verify email configurations, check nameservers, or enrich domain data. Prefer over raw DNS lookups when you need a structured JSON response with typed records and TTLs.

## Known failure modes

- Domain does not exist — returns empty records array or NXDOMAIN
- Invalid domain format — returns error or empty result
- Unsupported record type passed — rejected by input validation
- Cloudflare DNS upstream timeout — service may return error
- No records of the requested type exist — returns empty records array

## How this service works

Look up DNS records for any domain using Cloudflare DNS-over-HTTPS. Supports A, AAAA, CNAME, MX, TXT, NS, and SOA record types. Free, no API key required, unlimited usage.

## Output

Returns an object containing the queried domain name, the record type queried, and an array of DNS records each with type, value (e.g. IP address, hostname, or text string), and TTL in seconds.

## Example request

```json
{
 "type": "A",
 "domain": "cloudflare.com"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "domain"
 ],
 "properties": {
  "type": {
   "enum": [
    "A",
    "AAAA",
    "CNAME",
    "MX",
    "TXT",
    "NS",
    "SOA"
   ],
   "type": "string",
   "default": "A",
   "description": "DNS record type to query (default: A)"
  },
  "domain": {
   "type": "string",
   "description": "Domain name to look up (e.g. \"example.com\")"
  }
 },
 "additionalProperties": false
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "domain",
  "queryType",
  "records"
 ],
 "properties": {
  "domain": {
   "type": "string",
   "description": "The queried domain name"
  },
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "type",
     "value",
     "ttl"
    ],
    "properties": {
     "ttl": {
      "type": "number",
      "description": "Time-to-live in seconds"
     },
     "type": {
      "type": "string",
      "description": "DNS record type (e.g. A, AAAA, CNAME, MX, TXT, NS, SOA)"
     },
     "value": {
      "type": "string",
      "description": "Record value (e.g. IP address, hostname, text content)"
     }
    },
    "additionalProperties": false
   },
   "description": "Array of DNS records returned"
  },
  "queryType": {
   "type": "string",
   "description": "The DNS record type that was queried"
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/zeroclick-x402-service-registry-dns-lookup-31704dfd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dns.withzero.ai](https://www.zero.xyz/host/dns.withzero.ai/llms.txt)
