{"uid":"cap_cYDT4CuCsHrmIqlRFf3kO","slug":"codepulse-api-dns-txt-record-lookup-e88f35f3","name":"CodePulse API – DNS TXT Record Lookup","description":"Fetches TXT, MX, A, CNAME, and CAA records for a domain via Cloudflare DNS-over-HTTPS.","url":"https://codepulse-api.hahavoid0.workers.dev/web/dns-txt","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":{"type":"object","required":["domain"],"properties":{"type":{"type":"string","default":"TXT","description":"DNS record type (TXT, MX, CAA, A, CNAME, NS)"},"domain":{"type":"string","description":"Domain name to check"}}},"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"}}}}},"responseSchema":{"type":"json","example":{"result":{"records":["v=spf1 include:_spf.google.com ~all"]},"warnings":[],"supported":true,"confidence":"high","data_as_of":"2026-06","disclaimer":"Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_QEeJVwoFroUCMxsTxrQTJ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Looks up DNS TXT records (and other record types) for a given domain name, returning the raw record values with confidence metadata.","exampleAgentPrompt":"Can you look up the DNS TXT records for example.com? I need to see if there's an SPF record configured.","exampleUseCases":[{"title":"SPF record audit for email deliverability","prompt":"Check the DNS TXT records for sendgrid.com — I want to see what SPF record they have published to make sure it includes the right mail servers."},{"title":"Domain ownership verification check","prompt":"Look up the TXT records for acmecorp.io — we need to confirm whether the Google site verification token we were given is already published in DNS."},{"title":"DMARC policy inspection","prompt":"Fetch the TXT records for _dmarc.mailchimp.com so I can see what DMARC policy they've set and whether they're using reject, quarantine, or none."}],"resultDescription":"Returns a JSON object with a 'result' field containing an array of DNS TXT record strings for the queried domain, along with 'warnings' (any issues found), 'supported' (boolean indicating if the record type is supported), 'confidence' (e.g. 'high'), and 'data_as_of' (freshness date). Also includes a standard disclaimer.","failureModes":["Domain does not exist or has no TXT records — returns empty records array","Invalid domain format — likely returns validation error","Unsupported DNS record type passed — supported field may return false","Network or upstream DNS resolver failure — may return error or low-confidence result","Rate limiting or payment failure via x402 — call does not execute"],"whenToPreferThis":"Use this endpoint when an agent needs to programmatically inspect DNS TXT records for a domain — especially for verifying SPF, DKIM, DMARC, or domain ownership tokens — and no API key management is desired. Prefer this over manual DNS tools when operating in an automated agent workflow that supports x402 micropayments on Base. It also supports MX, CAA, A, CNAME, and NS record types via the same interface.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:43:41.991Z","isFirstParty":false}