$ man dns-lookup
/dns-lookup(1)
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
webprobeCATEGORY
utilities
STATUS
● live
NAME
dns-lookup — dns lookup / dns resolver / doh proxy
SYNOPSIS
POST https://x402.org/v1/dns-lookup
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
DNS lookup / DNS resolver / DoH proxy. Query A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, DNSKEY, DS, TLSA, HTTPS, SVCB records via Cloudflare DNS-over-HTTPS. No DNS infrastructure required.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| domain | string | Domain or hostname to resolve (e.g. 'example.com', 'mail.example.com'). Sent as-is, not stripped to apex. | required |
| types | array | Default: A, AAAA, MX, TXT, NS, CAA. Max 12 types per call. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| domain | string | Domain name that was queried (echoed from the request input). |
| types_queried | array | List of DNS record types resolved in this call (e.g. A, AAAA, MX, TXT, NS, CNAME). |
| records | object | Map keyed by record type, each value an array of resolved DNS records returned by Cloudflare DoH. |
| flat | object | Convenience flat fields: a[], aaaa[], mx[], ns[], txt[], cname[], caa[]. |
| total_records | number | Total count of DNS records returned across all queried types. |
| source | string | Upstream resolver identifier, typically cloudflare-dns.com (DNS-over-HTTPS). |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/dns-lookup \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the dns-lookup tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- dnsdohresolvermxtxtspf
- methods
- POST
- cluster
- webprobe
- price
- $0.02 USDC per call
ADJACENT — other endpoints in webprobe
| endpoint | description | price |
|---|---|---|
| archive-snapshot | Wayback Machine API / archive.org wrapper. | $0.02 |
| dmarc-check | DMARC / SPF / DKIM checker. | $0.02 |
| expand-url | URL expander / redirect chain tracer / link-shortener resolver. | $0.02 |
| password-strength | Password strength meter + breach checker. | $0.02 |
| whois | Domain WHOIS / RDAP lookup. | $0.02 |
| whois-lookup | WHOIS / RDAP domain lookup. | $0.02 |
| arxiv-search | arXiv full-text search. | $0.03 |
| ssl-cert | SSL certificate inspector / TLS cert checker / certificate transparency lookup / ssl expiry. | $0.03 |
SEE ALSO