{"uid":"cap_X5YqwtqGPFqmOxvUsZTVo","slug":"x402-deployer-x402-deployer-workers-dev-1e7c6465","name":"DNS Lookup via Cloudflare DoH","description":"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.","url":"https://x402-deployer.x402-deployer.workers.dev/dns-lookup","method":"POST","headers":{},"bodySchema":{"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","items":{"type":"object","properties":{"ttl":{"type":"integer"},"data":{"type":"string"}}}}}},"total_records":{"type":"integer"}}}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"types":["A","MX","TXT","NS"],"domain":"example.com"},"type":"http","method":"POST","bodyType":"json"}},"response":{"flat":{"a":["172.66.147.243","104.20.23.154"],"mx":[{"host":"","priority":0}],"ns":["hera.ns.cloudflare.com","elliott.ns.cloudflare.com"],"caa":[],"txt":["v=spf1 -all","_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9"],"aaaa":[],"cname":[]},"domain":"example.com","source":"Cloudflare DNS-over-HTTPS (1.1.1.1)","records":{"A":[{"ttl":248,"data":"172.66.147.243","name":"example.com"},{"ttl":248,"data":"104.20.23.154","name":"example.com"}],"MX":[{"ttl":165,"data":"0 .","name":"example.com"}],"NS":[{"ttl":76217,"data":"hera.ns.cloudflare.com.","name":"example.com"},{"ttl":76217,"data":"elliott.ns.cloudflare.com.","name":"example.com"}],"TXT":[{"ttl":296,"data":"\"v=spf1 -all\"","name":"example.com"},{"ttl":296,"data":"\"_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9\"","name":"example.com"}]},"total_records":7,"types_queried":["A","MX","TXT","NS"]}},"exampleRequest":{"types":["A","MX","TXT","NS"],"domain":"example.com"},"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zpcMW6Hr68U6vZktXCudA","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Queries Cloudflare 1.1.1.1 DNS-over-HTTPS to resolve any DNS record type (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.","exampleAgentPrompt":"Can you look up all the DNS records for example.com — I want to see the A, MX, TXT, and NS records, especially to check the SPF and DMARC policies and which mail servers are configured?","exampleUseCases":null,"resultDescription":"Returns DNS records grouped by type (each group containing the record values and TTL) plus a flat list of all records for easy consumption. Covers any requested subset of A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, SRV, CAA, DNSKEY, DS, TLSA, HTTPS, and SVCB record types.","failureModes":["Domain does not exist (NXDOMAIN) — returns empty result or error","Invalid domain name format — validation error","Requested record type not found for domain — empty records for that type","Cloudflare DoH upstream timeout or unreachable — 502/504 error","Payment not accepted or insufficient — 402 payment required"],"whenToPreferThis":"Use this endpoint when you need programmatic DNS resolution with support for a wide range of record types beyond basic A/AAAA, especially for email deliverability checks (MX, SPF/DMARC TXT), security audits (CAA, DNSSEC, TLSA), or infrastructure inspection — backed by Cloudflare 1.1.1.1 for reliability and speed. Prefer over raw dig/nslookup when you need structured JSON output with TTLs in both grouped and flat formats.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:49:38.637Z","isFirstParty":false}