Dns Records Lookup Doh avatar

Dns Records Lookup Doh

Pricing

from $2.99 / 1,000 results

Go to Apify Store
Dns Records Lookup Doh

Dns Records Lookup Doh

Extract A, MX, TXT, NS, and other public DNS records for domains using Google Public DNS or Cloudflare over HTTPS. Results can be exported directly as JSON, CSV, or Excel datasets.

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

B2B Lead Generation

B2B Lead Generation

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Categories

Share

DNS Records Lookup (DoH)

DNS Records Lookup

DNS records lookup for anyone who needs A, MX, TXT, NS, and other public zone records in bulk. The actor processes DNS queries smoothly over HTTPS, one request at a time, and saves structured results to a dataset you can easily export as JSON, CSV, or Excel.

Use Cases

  • Mail Setup: Confirm MX hosts and check whether TXT records contain active SPF policies.
  • SPF and DMARC Audits: Validate domain TXT records and _dmarc entries in a single run.
  • Migration Checks: Compare A and NS responses across a list of domains prior to a DNS cutover.
  • Monitoring: Schedule periodic runs on domain lists to track and diff record changes over time.
  • Data Integration: Import structured DNS data straight into Google Sheets or data warehouses.

What Data Does This Actor Extract?

In Lookup mode, the actor processes each domain and requested record type.

In SPF/DMARC mode, it evaluates TXT records for the domain alongside _dmarc.<domain>. Rows containing v=spf1 or v=DMARC1 are parsed for additional details like authKind and policyToken (~all, -all, or DMARC p= values).

Empty answers or non-existent domains (NXDOMAIN) are logged and skipped to keep your output clean. Any bad inputs or network failures are captured as clean error rows with diagnostic messages. Duplicate record rows from the same run are automatically deduplicated.

Input

ParameterTypeDefaultDescription
modestringlookupSelect lookup for bulk DNS records, or SPF/DMARC check.
domainsarray["example.com"]List of domain names to process.
recordTypesarray["A", "MX", "TXT", "NS"]Supported types: A, AAAA, MX, TXT, NS, CNAME, SOA, CAA.
resolverstringgoogleChoose your preferred DNS-over-HTTPS provider (google or cloudflare).
maxItemsinteger100Row cap per run (maximum 1,000).
requestDelaySecsinteger1Pause between queries in seconds.
userAgentstringB2BLeadGenerationResearch/1.0Custom user agent string.
timeoutSecsinteger300Total run timeout in seconds.
requestTimeoutSecsinteger30Per-request timeout in seconds.
proxyConfigurationobjectNo proxyOptional proxy configuration if needed.

Example Input

{
"mode": "lookup",
"domains": ["example.com", "google.com"],
"recordTypes": ["A", "MX", "TXT", "NS"],
"resolver": "google",
"maxItems": 100,
"requestDelaySecs": 1,
"userAgent": "B2BLeadGenerationResearch/1.0 (contact: research@b2bleadgeneration.com)",
"timeoutSecs": 300,
"requestTimeoutSecs": 30,
"proxyConfiguration": { "useApifyProxy": false }
}

Output

{
"domain": "example.com",
"recordType": "MX",
"status": 0,
"name": "example.com.",
"rrType": 15,
"ttl": 129,
"data": "0 .",
"resolver": "google",
"scrapedAt": "2026-10-12T00:00:00+00:00"
}
FieldTypeDescription
domainstringDomain name from the input.
recordTypestringRequested DNS record type.
statusintegerResponse status code.
namestringOwner name returned in the answer.
rrTypeintegerNumeric DNS type code (e.g., 1 for A, 15 for MX, 16 for TXT).
ttlintegerTime to live in seconds.
datastringRecord payload or value.
resolverstringSelected provider (google or cloudflare).
scrapedAtstringUTC timestamp of the lookup.
authKindstringSet to spf, dmarc, or txt during SPF/DMARC analysis.
policyTokenstringParsed SPF mechanism or DMARC policy setting.
errorstringPresent if the request encountered an error.
messagestringDetailed reason for any failed entry.

Dataset views include Overview and Errors.

How It Works

  1. Parses your configuration, domain list, and row limits.
  2. Builds query tasks for each domain and requested record type (or TXT & _dmarc in SPF/DMARC mode).
  3. Sends query requests formatted for the target DNS-over-HTTPS service.
  4. Respects requestDelaySecs and applies standard backoff retry logic on temporary network issues.
  5. Maps response answers into clean rows, drops duplicates, and stops once maxItems is reached.

FAQ

Which record types can I request?

A, AAAA, MX, TXT, NS, CNAME, SOA, and CAA.

What happens if a domain name does not exist?

Empty or NXDOMAIN answers produce no dataset rows. The log simply notes the empty query so your dataset stays clean.

Can I check SPF and DMARC without specifying TXT manually?

Yes. Switch the mode to SPF/DMARC check, and the actor automatically looks up TXT records for both the main domain and _dmarc.<domain>.

Does it follow truncated (TC) responses over TCP?

No. If a response is flagged as truncated, the actor retains all records present in that response without opening additional connections.

Trademark Notice

DNS Records, Google, Cloudflare, and related names, logos, and trademarks belong to their respective owners. Their mention in this documentation is solely to identify compatibility and source context and does not imply affiliation, sponsorship, or endorsement.

This tool collects publicly accessible DNS data available on open networks. Public data collection is widely practiced, but how you handle, store, or re-publish the data matters. Always respect applicable data privacy practices and usage guidelines.

For more information on best practices, check out Apify's guide on web scraping legality.

This is not legal advice. To learn more, read Apify's guide: Is web scraping legal?