How to check a domain's SPF, DMARC and DKIM with an API
Updated 2026-11-10
Use when an agent must check a domain's DNS records, email authentication or TLS setup.
From an MCP client, add https://tanod.dev/mcp and call inspect_domain; the first 5 calls per IP per UTC day are free (shared by domain inspections and RDAP, email and IP lookups), then each call is USD 0.01 (USD 0.004 for one section) with x402, no key or signup.
POST a domain to /v1/domain/inspect. One call returns its DNS records, email authentication (SPF, DMARC, common DKIM selectors, MTA-STS) with a score out of 8, and the TLS certificate.
Request
domain is a bare domain name (no scheme, no IP literal). checks is optional and picks sections from dns, email and tls; the default is all three. A single section costs less.
curl -s -X POST https://tanod.dev/v1/domain/inspect \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"domain":"github.com","checks":["email"]}'Response
dns and tls sections{
"domain": "github.com",
"email": {
"accepts_mail": true,
"spf": {"present": true, "all_policy": "softfail", "dns_lookup_terms": 8, "issues": []},
"dmarc": {"present": true, "policy": "quarantine", "subdomain_policy": "reject", "testing": false,
"rua": "mailto:dmarc@github.com", "pct": 100, "issues": [],
"inherited": false, "found_at": "github.com", "effective_policy": "quarantine"},
"dkim_selectors_found": ["google", "selector1"],
"mta_sts": false,
"score_out_of_8": 7
},
"notes": []
}DMARCbis (RFC 9989): subdomains and the DNS tree walk
RFC 9989, the DMARC standard published in May 2026, replaces the Public Suffix List with a DNS tree walk for finding the policy that covers a name. The check follows it. When mail.example.com has no record of its own, the walk looks at each name above it and stops at the nearest record. The answer then shows inherited: true, the name it was found_at, and the effective_policy, which is the parent's sp= or else its p=. A subdomain covered by its parent is not reported as missing DMARC, and the score counts the inherited policy. For example, on 12 October 2026 docs.github.com had no record of its own and came back with found_at: github.com and effective_policy: reject, from github.com's sp=reject. The new tags are read too: t=y (policy in test mode, which replaces pct) is flagged as testing_mode, and np= and psd= are returned as published.
Limits and caveats
DKIM is a probe. DKIM keys live under a selector that only the sender knows, so a check can only report selectors it finds. An empty dkim_selectors_found does not mean the domain has no DKIM.
Heuristic, not an audit. The score summarises SPF, DMARC and related records as published in DNS at the time of the call. It does not test whether mail from the domain is actually delivered or accepted.
SPF lookup limit. dns_lookup_terms counts the DNS-querying terms; SPF allows at most 10, and the issues list flags records that go over.
Price and free allowance
USD 0.01 for all three sections, USD 0.004 for a single section, paid in USDC on Base, Polygon, Solana, BNB Chain or Arbitrum with x402. 5 free per IP per UTC day with the header X-Tanod-Free: 1; the pool is shared with RDAP, email verification and IP lookup. MCP tool: inspect_domain at https://tanod.dev/mcp, where the free tier is automatic.
Paying by card instead? The same check runs as an Apify actor, Bulk SPF, DMARC & DKIM Checker (tanod/domain-email-checker), billed through your Apify account at USD 0.002 per domain; give it a list and collect the results from the run's storage.
For comparison, the other email-authentication checks listed for x402 agents charged USD 0.002 to USD 0.01 per domain when checked on 12 October 2026. The email section here (SPF, DMARC with the RFC 9989 tree walk, DKIM selectors and MTA-STS, with a score out of 8) is USD 0.004.
All endpoints →Use it from Claude without writing code: in claude.ai or Claude Desktop, add https://tanod.dev/mcp/web?via=spf-dmarc-dkim-check-api as a custom connector (steps), then ask in plain words, for example "Check the SPF and DMARC records of example.com." The free daily allowance is applied automatically over MCP. Beyond it a call needs an x402 payment, which these clients can make.
Related guides: What DNS lookup APIs cost over x402, Whois (RDAP) lookup API for domains, IPs and AS numbers, How to verify an email address with an API (syntax, MX, disposable), IP address to ASN lookup API (network, org, abuse contact). Back to tanod.dev or the guide index. Results are automated and heuristic.