Dns Records Lookup avatar

Dns Records Lookup

Pricing

$0.01 / actor start

Go to Apify Store
Dns Records Lookup

Dns Records Lookup

Pricing

$0.01 / actor start

Rating

0.0

(0)

Developer

Eichan Jolly

Eichan Jolly

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Categories

Features

Limited permissions

Share

Look up the A, AAAA, CNAME, MX, TXT, and NS records of one public domain. It uses Cloudflare's public DNS-over-HTTPS JSON endpoint (https://cloudflare-dns.com/dns-query) and Python's standard library. No DNS account, login, or API key is needed.

Who it is for

Developers, website owners, and support teams who want a small, structured snapshot of commonly used DNS records. You do not need to know DNS commands.

Input

Enter a domain name without https://, a slash, or a path. The prefilled example is the real public domain example.com.

{"domain":"example.com"}

Output

The Actor makes six DoH requests and saves one dataset item per returned record, followed by one summary item. A type that has no records is represented by [] in the summary's records_by_type, not as an error. For example (illustrative records and TTL):

{"kind":"record","domain":"example.com","record_type":"A","value":"93.184.215.14","ttl":300,"priority":null,"error":null}

Summary structure (illustrative excerpt; actual output always has all six record-type keys):

{
"kind":"summary",
"domain":"example.com",
"record_type":null,
"value":null,
"ttl":null,
"priority":null,
"error":null,
"records_by_type":{"A":[{"value":"93.184.215.14","ttl":300,"priority":null}],"AAAA":[],"CNAME":[],"MX":[],"TXT":[],"NS":[]},
"errors_by_type":{},
"statuses_by_type":{"A":"NOERROR","AAAA":"NOERROR","CNAME":"NOERROR","MX":"NOERROR","TXT":"NOERROR","NS":"NOERROR"},
"truncated_types":[]
}
  • MX records have their preference in priority; all other types use null.
  • TXT values retain their DNS JSON quoted-string formatting. The Actor does not assemble split strings.
  • statuses_by_type distinguishes NXDOMAIN from NOERROR with an empty answer.
  • errors_by_type contains friendly messages for individual lookup failures; records_by_type remains [] for those types. A failed query is therefore not the same as a successful empty response.

Limits and cautions

  • This is a current resolver view, not authoritative proof of all worldwide DNS propagation. DoH results may be cached; TTLs vary.
  • The fixed resolver is Cloudflare; changing resolver, verifying DNSSEC, recursive tracing, SRV/CAA lookups and zone transfers are out of scope.
  • Up to 100 returned records per type are emitted; truncated_types records any truncation. Individual responses are limited to 256 KiB; 8-second request timeouts apply.
  • When an A/AAAA answer contains a CNAME alias, that alias is not emitted as an A/AAAA item; the separately requested CNAME type is used.
  • All queries go only to the Cloudflare public DoH endpoint. The supplied domain is not contacted directly. No logins or private credentials.
  • The Actor only accepts one domain; no batch input or automatic URL discovery.

From this Actor folder:

$ACTOR_INPUT_JSON='{"domain":"example.com"}' python src/main.py

Or place the input in storage/key_value_stores/default/INPUT.json. Locally, the output is saved as numbered JSON files under storage/datasets/default/. In Apify, the platform's run-provided storage access is used to write to its default dataset (no Apify SDK).

Verification

Offline repeatable tests and a real python src/main.py subprocess smoke run are in tests/. The smoke uses a recorded DNS-over-HTTPS fixture because test execution should not depend on an external DNS service; its output is not a live Cloudflare lookup. Inspect verification/script-mode-smoke.txt and verification/dataset-items.json.

python tests/run_smoke.py
python -m unittest discover -s tests -p 'test_*.py' -v

Apify Store metadata and pricing suggestion

  • Store category: DEVELOPER_TOOLS.
  • Suggested pricing: $0.004 per run (PAY_PER_EVENT recommendation). The dataset includes an extra summary row, so billing per row is not recommended.
  • store_metadata.json is advisory; no Store publishing or billing is configured.