DNS Lookup in Bulk – MX, SPF, DMARC & DNS Records avatar

DNS Lookup in Bulk – MX, SPF, DMARC & DNS Records

Pricing

from $0.14 / 1,000 rows

Go to Apify Store
DNS Lookup in Bulk – MX, SPF, DMARC & DNS Records

DNS Lookup in Bulk – MX, SPF, DMARC & DNS Records

DNS lookup for a list of domains in one run: A, AAAA, CNAME, MX, NS, SOA, TXT and CAA records, the mail provider behind each MX (Google Workspace, Microsoft 365…), plus SPF and DMARC parsing with RFC checks. One row per domain and record type. No WHOIS, no API key.

Pricing

from $0.14 / 1,000 rows

Rating

0.0

(0)

Developer

Justaduck

Justaduck

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 hours ago

Last modified

Features

Limited permissions

Share

DNS lookup in bulk: paste a list of domains and get their A, AAAA, CNAME, MX, NS, SOA, TXT and CAA records, plus optional SPF and DMARC checks, in one run.

  • What you get: one row per domain × record type with status (NOERROR, NXDOMAIN, NODATA), records, the mailProvider behind the MX records, parsed spf and dmarc results with RFC checks, and the resolver that answered.
  • What it costs: US$0.20 per 1,000 rows plus US$0.00005 per run start. Failed lookups are not charged. Apify's free plan (US$5 of usage a month) covers about 25,000 rows.
  • Try it: Click Start on the prefilled form: it looks up apify.com and example.com with the default 5 record types and returns 10 rows (US$0.00205) in a few seconds.

Look up DNS records for a list of domains in one run: A, AAAA, CNAME, MX, NS, SOA, TXT and CAA, plus optional SPF and DMARC parsing with format checks taken straight from the RFCs. The data comes from the DNS itself: every query goes to the run's own system resolver (the default resolver of the container), and only if that resolver fails is the same question sent to Cloudflare's public DNS-over-HTTPS service (cloudflare-dns.com). No WHOIS, no third-party data API, no API key.

One result row = one domain × one record type, so the output is easy to filter, sort and export to CSV or Excel.

What you can use it for

  • Check where a list of domains points (A / AAAA / CNAME) before or after a migration.
  • Find which mail provider a domain uses (MX row, mailProvider: Google Workspace, Microsoft 365, Zoho Mail, Proofpoint, Mimecast and 27 more) for lead lists or deliverability work.
  • Audit SPF and DMARC across many domains: is there exactly one SPF record, does it end in -all or ~all, is the DMARC policy none, quarantine or reject, where do the reports go.
  • Collect TXT verification records, name servers, SOA serials or CAA rules in bulk.

Which resolver answers

StepResolverresolver field
1The system resolver of the Apify container (Node.js built-in dns, the same resolver dig would use inside the container)system
2Only when step 1 fails (SERVFAIL, timeout, refused, or a response the system resolver library cannot use): Cloudflare DNS-over-HTTPS https://cloudflare-dns.com/dns-querycloudflare-doh

"Domain does not exist" (NXDOMAIN) and "no record of this type" (NODATA) are real answers, so they are returned as they are and never sent to the fallback. Google Public DNS (8.8.8.8 / dns.google) is not used.

If the system resolver answers a record type in a form this Actor does not recognise (this depends on the Node.js version of the container, not on the DNS data), the Actor does not guess: each lookup still goes to the system resolver first, and every answer that comes back in that unrecognised form is asked again from Cloudflare (that row gets resolver = cloudflare-doh; Cloudflare lookups are limited to about 10 per second). Empty answers, NODATA and NXDOMAIN are real answers and stay resolver = system. The run log and summary say once per record type that this happened, with the shape that was received. Only if Cloudflare's answer cannot be read either does the run stop with "Source format changed", without writing half-read rows.

How to use the bulk DNS lookup

  1. Open this Actor on Apify Store and try it in Apify Console. A free Apify account is enough; no credit card is needed.
  2. The input form is prefilled with a small example: it looks up apify.com and example.com with the default record types (A, AAAA, MX, NS, TXT) and returns 10 rows. Click Start to try it; it finishes in a few seconds.
  3. Paste your own list into Domains, pick the Record types you need, and turn on Parse SPF / Parse DMARC for an email authentication audit. Set Max rows to cap the run and its cost.
  4. Click Start and open the Output tab when the run finishes. Preview the rows as a table, or export them as JSON, CSV or Excel.
  5. To automate it, save the input as a task and schedule it, call the Actor through the Apify API, or send the results to Make, Zapier, n8n, Slack or a webhook with Apify integrations.

Input

FieldTypeDefaultDescription
domainsarray of strings— (required)One domain per entry. URLs are fine: https://www.example.com/page?x=1 becomes www.example.com. Upper case, ports and a trailing dot are ignored; internationalized domains such as münchen.de are converted to punycode (xn--mnchen-3ya.de). IP addresses, email addresses and single words are skipped and listed in the run summary. Duplicates are looked up once.
recordTypesarray["A", "AAAA", "MX", "NS", "TXT"]Any of A, AAAA, CNAME, MX, NS, SOA, TXT, CAA.
checkSpfbooleanfalseAdds one SPF row per domain (TXT records starting with v=spf1, checked against RFC 7208).
checkDmarcbooleanfalseAdds one DMARC row per domain (looks up _dmarc.<domain>, checked against RFC 7489).
maxItemsintegerno limitMaximum number of rows. Rows after the limit are not looked up and not charged.

Why these default types: A, AAAA, MX, NS and TXT answer the questions people ask most (where does the site point, who handles mail, who hosts DNS, which verification and SPF strings exist). CNAME, SOA and CAA are more specialised, and CNAME on a bare domain is almost always empty, so they are opt-in to keep the default run cheap.

Example input:

{
"domains": ["apify.com", "https://www.example.com/about", "münchen.de"],
"recordTypes": ["A", "MX", "TXT"],
"checkSpf": true,
"checkDmarc": true,
"maxItems": 1000
}

Output

Real rows from a run on 2026-11-21 (gmail.com with DMARC parsing, and gmail.com MX):

{
"domain": "gmail.com",
"domainUnicode": "gmail.com",
"input": "gmail.com",
"recordType": "DMARC",
"queriedName": "_dmarc.gmail.com",
"status": "NOERROR",
"recordCount": 1,
"records": [{ "value": "v=DMARC1; p=none; sp=quarantine; rua=mailto:mailauth-reports@google.com" }],
"spf": null,
"dmarc": {
"recordCount": 1, "valid": true, "policy": "none", "subdomainPolicy": "quarantine",
"pct": null, "adkim": null, "aspf": null,
"rua": ["mailto:mailauth-reports@google.com"], "ruf": [], "fo": null, "ri": null, "problems": []
},
"mailProvider": null,
"resolver": "system",
"sourceUrl": "https://cloudflare-dns.com/dns-query?name=_dmarc.gmail.com&type=TXT"
}
{
"domain": "gmail.com",
"domainUnicode": "gmail.com",
"input": "gmail.com",
"recordType": "MX",
"queriedName": "gmail.com",
"status": "NOERROR",
"recordCount": 5,
"records": [
{ "priority": 5, "exchange": "gmail-smtp-in.l.google.com" },
{ "priority": 10, "exchange": "alt1.gmail-smtp-in.l.google.com" },
{ "priority": 20, "exchange": "alt2.gmail-smtp-in.l.google.com" },
{ "priority": 30, "exchange": "alt3.gmail-smtp-in.l.google.com" },
{ "priority": 40, "exchange": "alt4.gmail-smtp-in.l.google.com" }
],
"spf": null,
"dmarc": null,
"mailProvider": "Gmail",
"resolver": "system",
"sourceUrl": "https://cloudflare-dns.com/dns-query?name=gmail.com&type=MX"
}

(The second row is shortened; every row has all fields.)

Fields

FieldTypeDescription
domainstringNormalized domain: lower case, ASCII (punycode for internationalized names), no scheme, path, port or trailing dot.
domainUnicodestringThe same domain in Unicode (equals domain for non-internationalized names).
inputstringThe entry you gave, trimmed (email-like parts are masked).
recordTypestringA, AAAA, CNAME, MX, NS, SOA, TXT, CAA, SPF or DMARC.
queriedNamestringThe name actually queried: _dmarc.<domain> for DMARC rows, otherwise domain.
statusstringNOERROR (records found), NXDOMAIN (the name does not exist) or NODATA (the name exists but has no record of this type; for SPF and DMARC rows this includes a name that has other TXT records but none starting with v=spf1 / v=DMARC1).
recordCountintegerNumber of entries in records.
recordsarrayThe records. A/AAAA {address}; MX {priority, exchange} sorted by priority (a "null MX" is shown as exchange .); NS {host}; CNAME {name, target} for every hop of the alias chain (up to 8); SOA {mname, rname, serial, refresh, retry, expire, minimum}; TXT {value, strings}; CAA {flags, tag, value}; SPF and DMARC {value}. Host names are lower case without the trailing dot; records of one type are sorted so the order is stable.
spfobject or nullSPF rows only: recordCount, valid, all (e.g. -all, ~all), includes, dnsLookupTerms, terms, problems.
dmarcobject or nullDMARC rows only: recordCount, valid, policy, subdomainPolicy, pct, adkim, aspf, rua, ruf, fo, ri, problems.
mailProviderstring or nullMX rows only: the mail service the domain's mail is delivered to, read from the MX host names (see Mail provider). null when the MX hosts are not in the list, the domain has no MX, or the most-preferred MX hosts point to different services. Always null on other rows.
resolverstringsystem or cloudflare-doh (at least one query for this row used the fallback).
sourceUrlstringThe Cloudflare DNS-over-HTTPS URL for the same question. For cloudflare-doh rows it is the exact URL that was queried; for system rows it is an equivalent query link so you can re-check the answer yourself. It returns JSON when called with the header accept: application/dns-json, for example curl -H 'accept: application/dns-json' '<sourceUrl>'.

TXT: a long TXT record is stored in DNS as several strings. value joins them with nothing in between (this is how SPF and DKIM read them, RFC 7208 §3.3); strings keeps the original pieces.

TTL is not returned: it depends on resolver caches and differs between runs and resolvers.

SPF checks (RFC 7208)

Only format rules from the RFC; there is no score or grade.

  • Exactly one record starting with v=spf1 (two or more is a "permerror", §4.5).
  • Every term is a known mechanism (all, include, a, mx, ptr, ip4, ip6, exists) or a name=value modifier (§4.6.1); unknown modifiers are ignored as the RFC says.
  • Valid domains, IPv4/IPv6 addresses and prefix lengths (§5).
  • redirect and exp at most once (§6).
  • At most 10 DNS-querying terms (§4.6.4). Only the terms in the record itself are counted; include targets are not expanded.

A real example caught by these checks: a record split into two strings without a space at the join, which reads as ip6:2620:52:3::214ip4:8.43.84.199 after joining.

DMARC checks (RFC 7489)

  • The record is at _dmarc.<domain> and starts with v=DMARC1 (§6.4); TXT records that do not are ignored.
  • More than one DMARC record means DMARC is not applied (§6.6.3).
  • p is required and must be none, quarantine or reject; sp, adkim, aspf, pct, ri, fo must have valid values; rua and ruf must be URIs such as mailto:… (§6.3, §6.4). Unknown tags are ignored.
  • Only the exact name is checked; the actor does not fall back to the organizational domain.

Pricing

Pay per event: US$0.00005 per run start + US$0.20 per 1,000 rows (US$0.0002 per row). You are charged per row written, and one row = one domain × one record type, so the cost depends on how many types you select:

RunRowsCost
1,000 domains × default 5 types (A, AAAA, MX, NS, TXT)5,000US$1.00 + US$0.00005
1,000 domains × A and MX only2,000US$0.40 + US$0.00005
1,000 domains × MX + SPF + DMARC3,000US$0.60 + US$0.00005
1,000 domains × all 8 types + SPF + DMARC10,000US$2.00 + US$0.00005

Discounts by Apify plan (per 1,000 rows): Free $0.20, Bronze $0.18, Silver $0.16, Gold $0.14.

Free plan: Apify's free plan includes US$5 of prepaid usage every month (no credit card needed). With this Actor that is enough for about 25,000 rows a month.

You are not charged for failed lookups. NXDOMAIN and NODATA rows are real DNS answers and are returned (and charged) like any other row. If a query fails on the system resolver and on the Cloudflare fallback (SERVFAIL or timeout after retries), no row is written and nothing is charged for it; the domain and the reason are listed in the run summary instead. Invalid entries and duplicates are skipped for free. Use maxItems or Apify's "maximum cost per run" to cap a run.

Run summary

Every run writes a SUMMARY record to its key-value store: each domain × type with its status (ok, skipped, failed, not-run), the reason for skipped or failed entries (for example DNS SERVFAIL for example.com MX (system resolver: ESERVFAIL; Cloudflare DoH: SERVFAIL)), and totals.

Mail provider

mailProvider on the MX row is looked up from a fixed list of MX host-name endings taken from each service's own setup guide or its own domain's MX records (for example Google Workspace smtp.google.com / aspmx.l.google.com, Microsoft 365 <domain>.mail.protection.outlook.com). No guessing: a host that is not in the list gives null, never a made-up name.

  • Covered: Google Workspace, Gmail, Microsoft 365, Microsoft 365 U.S. Government, Microsoft 365 operated by 21Vianet, Outlook.com, Zoho Mail, Proofpoint, Mimecast, Barracuda, Symantec Email Security.cloud, Cloudflare Email Security, Cisco Secure Email, Sophos, Yahoo (incl. AOL), iCloud Mail, Fastmail, Proton Mail, GoDaddy, Namecheap, Amazon SES / WorkMail, Yandex, Mail.ru, Cloudflare Email Routing, Forward Email, IONOS, OVHcloud, Hostinger, Rackspace, Mailgun, Tuta, Gandi.
  • Which MX counts: mail goes to the MX with the lowest priority number first, so only those hosts are used. If all of them belong to one service, that service is shown; if they point to different services, mailProvider is null (the records list shows every host). Backup MX hosts with a higher number are not used.
  • Security gateways: when a domain routes mail through a filtering service (Proofpoint, Mimecast, Barracuda, Symantec, Cloudflare Email Security, Cisco, Sophos), the MX shows that gateway, so mailProvider is the gateway, not the mailbox provider behind it.

Limits and behaviour

  • Speed: on the Apify platform a run writes about 11–15 rows per second (measured: 111 domains × 7 types = 777 rows in 53–68 seconds). Each row is saved and charged on its own, which is what sets the pace. So 1,000 domains × the default 5 types (5,000 rows) take about 6–7 minutes, and 1,000 domains × all 10 row types about 11–15 minutes.
  • Time limit: one run lasts at most about 60 minutes, which is roughly 40,000–50,000 rows. When the limit is reached, rows already written are kept (and charged as usual); rows not reached are not looked up and not charged, and the run summary lists them as not-run with the reason "time budget". For bigger jobs, split the list into several runs. A list can hold up to 10,000 domains.
  • Up to 20 DNS queries run at the same time, so one resolver is never flooded; the Cloudflare fallback is limited to 10 requests per second.
  • System resolver: 2-second timeout, 2 tries. Cloudflare fallback: 10-second timeout, 1 retry.
  • Domains that do not answer cost one timeout each, not one per record type: the first row of each domain is looked up first, and the other rows of that domain wait for it. If the domain's name servers do not answer (Cloudflare reports SERVFAIL), its remaining rows are not queried and are listed as failed (not charged). Slow domains wait in parallel: in our offline timing test, 300 unresponsive domains in a list of 1,000 cost under 2 minutes of waiting in total, not 25.
  • If the system resolver itself breaks (it keeps failing while Cloudflare answers the same questions for 20 domains in a row), the rest of the run asks Cloudflare directly. Results stay the same, but the run is limited to about 10 rows per second.
  • If both resolvers stop answering (10 domains in a row with no answer from either, and no answer at all for 60 seconds), the remaining rows are not queried and the run ends as failed within about a minute, instead of waiting out every domain.
  • The same question is asked once per run (for example the TXT row and the SPF row of a domain share one TXT lookup).

FAQ

Is this an official Cloudflare product? No. This Actor is not affiliated with or endorsed by Cloudflare or any DNS provider. It sends ordinary DNS queries; Cloudflare's public DNS-over-HTTPS service is used only as a fallback when the run's own resolver fails.

Why is there no WHOIS / registrar / expiry data? Bulk WHOIS and RDAP queries are against the registries' terms. Verisign's RDAP terms (for .com and .net) forbid using the service to "enable high volume, automated, electronic processes". WHOIS records also contain personal contact data. This actor only reads public DNS.

Why do I get a row with NXDOMAIN or NODATA and an empty records array? That is the DNS answer: the domain does not exist, or it has no record of that type. It is a result, so it is returned and counted.

Why does the A record list differ from what I see on my computer? Large sites return different IP addresses depending on where you ask from and when. The actor asks from the Apify data center at run time.

Why is the CNAME row empty for my bare domain? A bare domain (zone apex) normally cannot have a CNAME. Query www.<domain> for the alias chain.

Is valid: false a score? No. It only means the record breaks one of the RFC format rules listed in problems, or that there is no record / more than one record.

Does it check DKIM? Not as a separate type. DKIM keys are TXT records at <selector>._domainkey.<domain>; if you know the selector, put that name in domains and select TXT.

What this actor does not output (personal data)

  • No WHOIS or RDAP data, so no registrant names, addresses, emails or phone numbers.
  • DNS records are returned exactly as published. Some public records contain a contact mailbox chosen by the domain owner (usually a role address, but it can be a personal one): the SOA rname (written in DNS form such as dns-admin.google.com) and DMARC rua / ruf report addresses (such as mailto:dmarc-reports@example.com). They are part of the public DNS record and are not masked, because a masked value would no longer match what dig returns. The actor does not extract email addresses into separate fields.

Actors by the same author that produce company lists you can enrich with DNS data: