DNS Lookup
Pricing
Pay per event
DNS Lookup
DNS Lookup resolves all standard DNS record types for one or more domains. It returns structured data including IP addresses, mail servers, name servers, TXT records, and an email security analysis that checks for SPF and DMARC configuration.
Pricing
Pay per event
Rating
0.0
(0)
Developer

Stas Persiianenko
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
Look up DNS records for any domain — A, AAAA, MX, NS, TXT, CNAME, SOA, plus email security analysis (SPF, DMARC).
What does DNS Lookup do?
DNS Lookup resolves all standard DNS record types for one or more domains. It returns structured data including IP addresses, mail servers, name servers, TXT records, and an email security analysis that checks for SPF and DMARC configuration. Pass in raw URLs or bare domain names — the actor automatically strips protocols, paths, and www. prefixes, then deduplicates the list before performing parallel lookups.
Use it to audit DNS configuration, verify email security, monitor domain infrastructure, or enrich domain lists with technical metadata.
Use cases
- IT administrators verifying DNS configuration after migrating domains to a new hosting provider or CDN
- Email marketers auditing SPF and DMARC records across all sending domains before launching a campaign
- Security analysts enriching threat intelligence feeds with DNS metadata for bulk domain lists
- SEO professionals checking name servers, A records, and CNAME setups across client domain portfolios
- DevOps engineers monitoring infrastructure DNS records as part of automated health checks
Why use DNS Lookup?
- All record types in one call — A, AAAA, MX, NS, TXT, CNAME, and SOA records resolved simultaneously
- Built-in email security analysis — SPF and DMARC detection without separate lookups
- Batch processing — look up hundreds or thousands of domains in a single run
- Automatic URL cleaning — paste full URLs and the actor extracts the domain for you
- Deduplication — duplicate domains are removed before lookup, so you never pay twice
- Pay-per-event pricing — costs scale with actual usage, starting at fractions of a cent per domain
Input parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
domains | string[] | Yes | — | List of domain names to look up. URLs are automatically cleaned (https://example.com/path becomes example.com). Duplicates are removed. |
Example input
{"domains": ["apify.com", "google.com", "github.com"]}
Output example
Each domain produces one record with:
| Field | Description |
|---|---|
domain | The queried domain name |
a | A records (IPv4 addresses) |
aaaa | AAAA records (IPv6 addresses) |
mx | MX records (mail servers with priority) |
ns | Name servers |
txt | TXT records |
cname | CNAME records |
soa | SOA record (authority info) |
emailSecurity | SPF/DMARC analysis |
lookupTimeMs | Lookup duration in milliseconds |
error | Error message if lookup failed |
queriedAt | ISO timestamp of the lookup |
{"domain": "apify.com","a": ["13.33.142.70", "13.33.142.109", "13.33.142.5", "13.33.142.35"],"aaaa": [],"mx": [{ "priority": 1, "exchange": "aspmx.l.google.com" },{ "priority": 5, "exchange": "alt1.aspmx.l.google.com" }],"ns": ["ns-1234.awsdns-56.org", "ns-789.awsdns-01.net"],"txt": ["v=spf1 include:_spf.google.com ~all"],"cname": [],"soa": {"nsname": "ns-1234.awsdns-56.org","hostmaster": "awsdns-hostmaster.amazon.com","serial": 1,"refresh": 7200,"retry": 900,"expire": 1209600,"minttl": 86400},"emailSecurity": {"spf": "v=spf1 include:_spf.google.com ~all","dmarc": "v=DMARC1; p=reject; rua=mailto:dmarc@apify.com","hasSPF": true,"hasDMARC": true},"lookupTimeMs": 45,"error": null,"queriedAt": "2026-02-28T12:00:00.000Z"}
How much does it cost?
DNS Lookup uses Apify's pay-per-event pricing:
| Event | Cost |
|---|---|
| Run start | $0.035 |
| Per domain looked up | $0.001 |
Examples:
- 5 domains: $0.035 + 5 x $0.001 = $0.04
- 100 domains: $0.035 + 100 x $0.001 = $0.135
- 1,000 domains: $0.035 + 1,000 x $0.001 = $1.035
Using the Apify API
The Apify API lets you control DNS Lookup programmatically. Schedule runs, read datasets, manage webhooks, and more. See the Apify API reference for details.
Node.js
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });const run = await client.actor('automation-lab/dns-lookup').call({domains: ['apify.com', 'google.com'],});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Python
from apify_client import ApifyClientclient = ApifyClient('<YOUR_API_TOKEN>')run = client.actor('automation-lab/dns-lookup').call(run_input={'domains': ['apify.com', 'google.com'],})items = client.dataset(run['defaultDatasetId']).list_items().itemsprint(items)
Integrations
Connect DNS Lookup with other apps and services using Apify integrations. You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, n8n, and many more. You can also use webhooks to trigger actions whenever a run finishes — for example, sending a Slack alert when a domain's email security configuration changes or pushing results to a Google Sheet for reporting.
Tips and best practices
- Paste URLs directly —
https://example.com/pageis cleaned toexample.com, so you can copy-paste from spreadsheets or browser tabs without editing - Check email security first — the
emailSecurityfield gives you a quick pass/fail on SPF and DMARC without needing separate tools - Combine with scheduling — set up a daily or weekly schedule to monitor DNS changes across your domain portfolio
- Export results flexibly — download output as JSON, CSV, or Excel from the dataset tab, or pipe it into another workflow via the API
- Watch for errors — if a domain fails, the
errorfield explains why (NXDOMAIN, timeout, etc.) while other domains still return results
FAQ
Can I look up subdomains like mail.example.com? Yes. Enter any valid hostname and the actor will resolve its DNS records. It works with subdomains, apex domains, and any publicly resolvable name.
What happens if a domain does not exist?
The actor returns a result object for that domain with the error field set to the failure reason (typically NXDOMAIN). Other domains in the batch are not affected.
Is there a limit on the number of domains per run? There is no hard limit. The actor processes domains in parallel batches of 10, so even thousands of domains complete quickly. Costs scale linearly with the number of domains.