DNS Records Lookup: MX, SPF, DMARC & More
Pricing
from $2.00 / 1,000 dns result rows
DNS Records Lookup: MX, SPF, DMARC & More
Look up DNS records and email-authentication signals in bulk. Export A, AAAA, MX, TXT, CAA, SPF and DMARC data for domain checks.
Pricing
from $2.00 / 1,000 dns result rows
Rating
0.0
(0)
Developer
Ailu Studio
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
14 days ago
Last modified
Categories
Features
Share
DNS Records Lookup: MX, SPF, DMARC & More
Look up DNS records and email-authentication signals in bulk. Export A, AAAA, MX, TXT, CAA, SPF and DMARC data for domain checks.
Try a small sample
Paste this into the Input JSON editor, run the Actor, then inspect its dataset. Export JSON or CSV from the dataset, or use the API tab for authenticated integration examples.
{"domains": ["apify.com"],"recordTypes": ["A","MX","TXT"],"includeEmailAuth": true,"maxItems": 10}
Workflow example
Review mail-routing and authentication records before configuring a domain. A present MX record does not verify an individual mailbox.
{"domains": ["apify.com","github.com"],"recordTypes": ["MX","TXT"],"includeEmailAuth": true,"maxItems": 10}
Examples show supported inputs, not guaranteed result counts. Public sources and filters can produce fewer rows or zero rows. Check the run log and any summary/error records before treating the output as complete.
For recurring use, save the input as an Apify Task and schedule sequential runs. Export results to your own spreadsheet, database, n8n or Make workflow. Scheduling does not add stateful tracking to Actors that only return snapshots. Keep API credentials in environment variables.
Related workflow
Email Validator: Syntax, MX & Disposable Checks can complement this Actor. It runs separately and has its own price and input requirements.
Detailed reference
Bulk DNS Lookup: A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, SPF, DMARC, DKIM
Look up DNS records for any list of domains in one run and get clean JSON: A and AAAA addresses, MX mail servers, NS, TXT, CNAME, SOA and CAA, plus a parsed SPF record (includes, ip4/ip6, all qualifier, lookup count), the DMARC policy (p, sp, pct, rua, ruf), optional DKIM selector discovery, a mail-provider guess from the MX hosts (Google Workspace, Microsoft 365, Zoho, Proton, Fastmail, Mimecast, Proofpoint and more) and the DNSSEC validation flag. Queries go over DNS-over-HTTPS to Cloudflare (cloudflare-dns.com) or Google Public DNS (dns.google), with automatic fallback to the other resolver. No API key. Compared with other DNS lookup Actors in the Store, this one returns SPF, DMARC and DKIM as structured fields next to the raw records, falls back to the organizational domain for DMARC, and offers both one row per domain and one row per record (flatten). Resolver errors are free rows.
Use cases
- Email deliverability audits: check SPF, DMARC policy and DKIM selectors for a list of client or prospect domains.
- Lead enrichment: tag companies by mail provider (Google Workspace vs Microsoft 365 vs self-hosted) from their MX records.
- Domain portfolio and migration checks: verify A/AAAA, NS, CNAME and CAA records before and after a DNS change.
- Security reviews: spot domains without DMARC, with
+allSPF, missing CAA or without DNSSEC validation. - Feed DNS data into spreadsheets, AI agents or monitoring pipelines without running your own resolver.
Input
| Field | Default | Meaning |
|---|---|---|
domains | ["apify.com", "github.com", "python.org"] | Domains or host names. URLs are accepted (scheme, path, port stripped); sub-domains are kept as given; IDNs are converted to punycode. |
recordTypes | ["A","AAAA","MX","NS","TXT","CNAME","SOA","CAA"] | Record types to query. Unsupported types are ignored and reported in the run summary. |
includeEmailAuth | true | Also query _dmarc.<domain> and parse SPF and DMARC into structured fields. |
checkDkimSelectors | false | Probe the selectors google, selector1, selector2, k1, default, s1, s2 at <selector>._domainkey.<domain>. |
resolver | cloudflare | Resolver asked first (cloudflare or google); the other is used when a query fails. |
flatten | false | false: one row per domain. true: one row per DNS record. |
maxConcurrency | 8 | Domains resolved in parallel (requests per resolver stay spaced at least 250 ms apart). |
maxItems | 500 | Maximum charged rows (domains, or records when flattened). |
Example input:
{ "domains": ["stripe.com", "https://www.notion.so/pricing", "example.org"], "checkDkimSelectors": true, "maxItems": 1000 }
Output
| Field | Type | Meaning |
|---|---|---|
id | string | dns:<domain> (flatten: dns:<domain>:<name>:<type>:<hash>). |
domain, inputDomain | string | Queried name and cleaned input. |
rcode | string | null | NOERROR, NXDOMAIN (name does not exist), SERVFAIL, REFUSED. |
a, aaaa, ns, txt | string[] | null | Record values; null when that type was not requested. |
mx | object[] | null | [{priority, host}] sorted by priority. |
cname | string | null | Alias target. |
soa | object | null | {mname, rname, serial, refresh, retry, expire, minimumTtl}. |
caa | object[] | null | [{flags, tag, value}]. |
spf | object | null | {raw, includes, ip4, ip6, all, redirect, dnsLookups, recordCount, valid}. |
dmarc | object | null | {raw, recordName, policy, subdomainPolicy, pct, rua, ruf, adkim, aspf}. |
dkimSelectorsFound | string[] | null | Selectors that publish a DKIM key (when enabled). |
hasMx, mailProvider | boolean, string | Mail setup summary from MX. |
dnssecAd | boolean | null | Resolver's Authenticated Data flag (DNSSEC-validated answer). |
queriedTypes, resolver, error, fetchedAt | Lookup metadata. |
Flatten rows carry domain, name, type, ttl, data, priority, target, caaTag, caaValue, purpose (spf/dmarc/dkim), rcode, dnssecAd, resolver, error, fetchedAt.
Sample row (TXT and AAAA shortened):
{"id": "dns:python.org", "domain": "python.org", "inputDomain": "python.org", "rcode": "NOERROR","a": ["151.101.192.223", "151.101.128.223", "151.101.64.223", "151.101.0.223"], "aaaa": ["2a04:4e42:400::223", "2a04:4e42::223"],"mx": [{ "priority": 50, "host": "mail.python.org" }],"ns": ["ns-1134.awsdns-13.org", "ns-2046.awsdns-63.co.uk", "ns-484.awsdns-60.com", "ns-981.awsdns-58.net"],"txt": ["888acb5757da46ad83b7e341ec544c64", "MS=73147F1EC0843C399CF17F586EC6B8EAF8C57961"], "cname": null,"soa": { "mname": "ns-2046.awsdns-63.co.uk", "rname": "awsdns-hostmaster.amazon.com", "serial": 1, "refresh": 7200, "retry": 900, "expire": 1209600, "minimumTtl": 86400 },"caa": [],"spf": { "raw": "v=spf1 mx ip4:188.166.95.178/32 ip6:2a03:b0c0:2:d0::71:1 include:stspg-customer.com include:_spf.google.com include:mailgun.org ~all", "includes": ["stspg-customer.com", "_spf.google.com", "mailgun.org"], "ip4": ["188.166.95.178/32"], "ip6": ["2a03:b0c0:2:d0::71:1"], "all": "~all", "redirect": null, "dnsLookups": 4, "recordCount": 1, "valid": true },"dmarc": { "raw": "v=DMARC1; p=none; pct=100; rua=mailto:re+shb8ybr70a3@dmarc.postmarkapp.com; sp=none; aspf=r;", "recordName": "_dmarc.python.org", "policy": "none", "subdomainPolicy": "none", "pct": 100, "rua": ["mailto:re+shb8ybr70a3@dmarc.postmarkapp.com"], "ruf": [], "adkim": null, "aspf": "r" },"dkimSelectorsFound": null, "hasMx": true, "mailProvider": "Self-hosted / other", "dnssecAd": false,"queriedTypes": ["A", "AAAA", "MX", "NS", "TXT", "CNAME", "SOA", "CAA"], "resolver": "cloudflare", "error": null,"fetchedAt": "2026-11-04T11:28:53.848Z"}
The run summary (domains resolved, NXDOMAIN count, failures, errors, request count) is stored in the OUTPUT record of the default key-value store.
How it works and limits
- Each record type is one DoH JSON request (
application/dns-json). With default settings a domain needs 9 requests (8 types +_dmarc), 16 with DKIM selectors. If the first type answers NXDOMAIN, the remaining queries for that domain are skipped. - Politeness: requests to each resolver are spaced at least 250 ms apart and 429/5xx responses are retried with backoff, so expect roughly 25 domains per minute with all 8 types. Ask only the record types you need for large lists.
- Answers come from a public recursive resolver and reflect its cache (TTL), not necessarily the authoritative server at this second. Propagation checks across many resolvers are not covered.
- DMARC is looked up at
_dmarc.<host>and, when absent, at the organizational domain (last two labels, or three for common ccTLD suffixes such asco.uk).spf.dnsLookupscounts top-level terms only; nested includes are not expanded. - DKIM can only be checked for known selector names; there is no way to list all selectors of a domain via DNS.
mailProvideris a guess from MX host names; custom gateways in front of a provider show the gateway (e.g. Proofpoint).- Not covered: PTR/reverse DNS, SRV, DNSKEY/DS records, zone transfers, WHOIS/RDAP data, historical DNS.
Pricing
Pay per result: $2.00 per 1,000 rows (result event). Platform usage is billed separately by Apify. Removed/free rows are not charged.
A row is one domain (or one record in flatten mode). NXDOMAIN answers are valid results and are charged; rows for invalid names and resolver or network errors (including SERVFAIL for every type) are free.
Legal
Not affiliated with Cloudflare or Google. Uses the public Cloudflare DNS-over-HTTPS JSON API and Google Public DNS JSON API only. Data licence/terms: https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver/ and https://developers.google.com/speed/public-dns/terms. DNS records are public by design; use the results lawfully.
FAQ
Why is txt null although SPF is filled? You removed TXT from recordTypes but kept includeEmailAuth; the TXT query is still made to parse SPF, but the raw TXT list is only returned when requested.
What does dnssecAd: false mean? The resolver did not validate the answer with DNSSEC, usually because the zone is not signed. true means the answer was DNSSEC-validated by the resolver.
Is an NXDOMAIN row charged? Yes, "this name does not exist" is a valid lookup result. Only rows where the resolver could not be reached or gave no usable answer are free.
Can I check thousands of domains? Yes, set maxItems accordingly. At the polite request rate 1,000 domains with all types take about 40 minutes; with only MX and includeEmailAuth (3 requests per domain) about 13 minutes.
Which resolver should I pick? Both return the same data for almost all domains. Cloudflare is the default; Google is used automatically when Cloudflare fails for a query.