# DNS Lookup via Cloudflare DNS-over-HTTPS

> DNS Lookup via Cloudflare DNS-over-HTTPS is a paid API for AI agents from 402.com.tr, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Resolve DNS records (A, AAAA, MX, TXT, NS, CNAME, SOA) for any domain using Cloudflare DNS-over-HTTPS, returning each record with its TTL or NXDOMAIN if the domain doesn't exist.

## Facts

- Endpoint: GET https://402.com.tr/api/x402/dns-lookup?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-lookup-via-cloudflare-dns-over-https-a8c947c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SQ_Cv6uXrJbmZVQmhp6t9

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 dns-lookup-via-cloudflare-dns-over-https-a8c947c3
```

Example prompt: What are the MX records for gmail.com? I need to verify the email routing setup.

## When to prefer this

Choose this endpoint when you need fast, reliable DNS resolution backed by Cloudflare's global DNS infrastructure, especially for infrastructure checks, email deliverability validation (MX/TXT/SPF/DKIM), domain existence verification, or any agent workflow that requires real-time DNS data. At sub-cent pricing per call it is cost-effective for high-frequency DNS polling.

## Known failure modes

- NXDOMAIN returned when the domain does not exist in DNS
- Empty answer set if the requested record type is not configured for the domain
- Invalid or malformed domain name may produce an error response
- Upstream Cloudflare DNS-over-HTTPS service unavailability could cause timeouts
- Unsupported record type strings may produce unexpected results

## How this service works

Resolve DNS records for a domain via Cloudflare DNS-over-HTTPS — A, AAAA, MX, TXT, NS, CNAME, SOA. Pass name= and type= (default A). Returns each record with its TTL, plus NXDOMAIN when the name does not exist. The DNS commodity agents call constantly for infra, email and domain checks, served at the sub-cent floor. Not financial advice.

## Output

Returns one or more DNS resource records matching the requested type, each including the record data (e.g. IP address, hostname, or string value) and its TTL in seconds. If the domain does not exist, returns an NXDOMAIN response. Multiple records may be returned for types like MX or NS.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "Domain"
      },
      "type": {
       "type": "string",
       "description": "Record type (default A)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-lookup-via-cloudflare-dns-over-https-a8c947c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402.com.tr](https://www.zero.xyz/host/402.com.tr/llms.txt)
