# Bulk DNS Records Lookup (`dabooti/bulk-dns-lookup`) Actor

Look up DNS records for thousands of domains: A, AAAA, MX, NS, TXT, CNAME, SOA and CAA, plus SPF and DMARC email security checks. Uses public DNS-over-HTTPS (Cloudflare, Google). No API key needed.

- **URL**: https://apify.com/dabooti/bulk-dns-lookup.md
- **Developed by:** [Danial Maqbool](https://apify.com/dabooti) (community)
- **Categories:** Developer tools, SEO tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 domains

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk DNS Records Lookup

Look up DNS records for a list of domains and export them to JSON, CSV or Excel. For each domain you get A, AAAA, MX, NS, TXT, CNAME, SOA and CAA records (SRV on request), plus an email security check: the SPF record, the DMARC record and its policy, and simple hasMx / hasSpf / hasDmarc flags.

It asks public DNS-over-HTTPS resolvers (Cloudflare 1.1.1.1 and Google Public DNS), so no API key, login or proxy is needed. If one resolver fails, the other is tried automatically.

### What you can use it for

- **Email deliverability audits**: find domains with no SPF or DMARC, or a DMARC policy of `none`.
- **Lead qualification**: see which mail provider (Google Workspace, Microsoft 365 and others) a list of company domains uses, from their MX records.
- **Domain portfolio checks**: confirm name servers, SOA serials and CAA rules across many domains after a migration.
- **Security reviews**: list TXT verification records and certificate authority (CAA) rules.
- **Clean-up of domain lists**: spot domains that return NXDOMAIN or do not resolve.

### What data you get

| Field | Description |
|---|---|
| `domain` | Normalized domain (URLs, `www.` and upper case are kept as typed but cleaned; IDNs become punycode) |
| `status`, `resolves` | DNS response code (NOERROR, NXDOMAIN, SERVFAIL) and whether the domain has an A, AAAA or CNAME answer |
| `a`, `aaaa` | IPv4 and IPv6 addresses |
| `mx` | Mail servers with priority, sorted |
| `ns`, `soa` | Name servers and the SOA record (primary NS, admin mailbox, serial, timers) |
| `txt`, `cname`, `caa`, `srv` | TXT strings (joined), CNAME target, CAA rules, SRV records |
| `spf`, `spfRecordCount` | SPF record and how many SPF records exist (more than one is a misconfiguration) |
| `dmarc`, `dmarcPolicy` | The `_dmarc` record and its `p=` policy (none, quarantine, reject) |
| `hasMx`, `hasSpf`, `hasDmarc` | Quick yes/no flags |
| `minTtl`, `resolver`, `errors`, `checkedAt` | Lowest TTL seen, resolver used, any per-record errors, check time |

### How to use it

1. Paste your **Domains** (one per line). Full URLs are fine; the host name is taken from them.
2. Pick the **Record types** you need.
3. Keep **Check email security** on to add SPF and DMARC results.
4. Click **Start**. About 100 domains take under a minute.

#### Example input

```json
{
  "domains": ["apify.com", "https://www.wikipedia.org/", "example.com"],
  "recordTypes": ["A", "MX", "NS", "TXT"],
  "checkEmailSecurity": true,
  "resolver": "cloudflare"
}
```

#### Example output

```json
{
  "domain": "apify.com",
  "status": "NOERROR",
  "resolves": true,
  "a": [
    "3.170.42.68",
    "3.170.42.76",
    "3.170.42.100",
    "3.170.42.109"
  ],
  "aaaa": [
    "2600:9000:2870:1c00:9:a03e:6540:93a1",
    "2600:9000:2870:6000:9:a03e:6540:93a1",
    "2600:9000:2870:6600:9:a03e:6540:93a1",
    "2600:9000:2870:8800:9:a03e:6540:93a1",
    "2600:9000:2870:9e00:9:a03e:6540:93a1",
    "2600:9000:2870:a200:9:a03e:6540:93a1",
    "2600:9000:2870:ac00:9:a03e:6540:93a1",
    "2600:9000:2870:e400:9:a03e:6540:93a1"
  ],
  "mx": [
    {
      "priority": 1,
      "host": "aspmx.l.google.com"
    },
    {
      "priority": 5,
      "host": "alt1.aspmx.l.google.com"
    },
    {
      "priority": 5,
      "host": "alt2.aspmx.l.google.com"
    },
    {
      "priority": 10,
      "host": "aspmx2.googlemail.com"
    },
    {
      "priority": 10,
      "host": "aspmx3.googlemail.com"
    }
  ],
  "ns": [
    "ns-1225.awsdns-25.org",
    "ns-1928.awsdns-49.co.uk",
    "ns-449.awsdns-56.com",
    "ns-839.awsdns-40.net"
  ],
  "txt": [
    "apple-domain-verification=A4eZHTuAHVZqRimj",
    "tito-domain-verification=pbg2696rvzbax2t4dl7h5ynqm",
    "openai-domain-verification=dv-WTM7Nna92Owwh4sgmDOVUyyt",
    "aisle-domain-verification-ymx7gd=j3J4hCmXHIc9R0RNQCfa8xdSf",
    "mixpanel-domain-verify=44615d9c-27f2-4587-a781-8a0a1c734e9a",
    "v=MCPv1; k=ed25519; p=1rDnoEigwTr+4JjG89+sLbdNnswCnLjmaeT34srW53Y=",
    "google-site-verification=R_4agUZyHorQrO5QGFa6ZB_o-uDxq82NY-EteDUpPvo",
    "google-site-verification=XU737OZxx6NvGd3NQK9MRt98qxRMjx3RByq-O0cy16I",
    "google-site-verification=ZqRh2_YSBHj2bo_KsEdu6MfmTMKJYLpDDL3oPtOrN_A",
    "google-site-verification=jrECJwBG9eeO_FUrOMhp7JY1oF8JSBxhzmLsLGvrt9s",
    "zapier-domain-verification-challenge=2c358aa9-fa36-419f-b21a-ca9eb6f2791d",
    "hubspot-developer-verification=MzZlYjQwZjktZGQ0ZC00MWVhLWJmNWMtYTY0MDI0MjQzNTI4",
    "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com include:19497222.spf05.hubspotemail.net -all"
  ],
  "cname": null,
  "soa": {
    "primaryNs": "ns-839.awsdns-40.net",
    "adminEmail": "awsdns-hostmaster.amazon.com",
    "serial": 1,
    "refresh": 7200,
    "retry": 900,
    "expire": 1209600,
    "minimumTtl": 86400
  },
  "caa": [
    "0 issue \"amazonaws.com\"",
    "0 issue \"digicert.com\"",
    "0 issue \"letsencrypt.org\"",
    "0 issuewild \"amazonaws.com\"",
    "0 issuewild \"letsencrypt.org\""
  ],
  "spf": "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com include:19497222.spf05.hubspotemail.net -all",
  "spfRecordCount": 1,
  "dmarc": "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:dmarc-reports@apify.com; ri=604800",
  "dmarcPolicy": "reject",
  "hasMx": true,
  "hasSpf": true,
  "hasDmarc": true,
  "minTtl": 60,
  "resolver": "cloudflare",
  "errors": [],
  "checkedAt": "2026-11-17T20:26:27.625Z"
}
```

### Pricing

Pay per event: **$1.00 per 1,000 domains** checked, plus a tiny standard start fee and Apify platform usage (usually a fraction of a cent per run). Each domain is charged once, however many record types you ask for. Duplicate domains in the input are checked once. Set **Max cost per run** to cap spending.

### Tips and limits

- `www.example.com` and `example.com` are different DNS names; add both if you need both.
- Results are what public resolvers see right now, including their cache. Recently changed records can take up to their TTL to update.
- DKIM records cannot be listed without knowing the selector, so they are not included.
- Up to 10,000 domains per run (raise **Max domains**). Split bigger lists into several runs.
- A `RUN_SUMMARY` record shows how many domains were NXDOMAIN or had errors.

### FAQ

**Does it check domain availability?** No. A domain with NXDOMAIN may still be registered. Use our Domain Availability Checker for registration status.

**Can I choose another resolver?** Cloudflare and Google are available; the other one is the automatic fallback.

### Legal note

DNS records are public by design. Use the results for your own legitimate purposes and in line with applicable laws.

# Actor input Schema

## `domains` (type: `array`):

Domain names or URLs to look up, one per line, for example example.com or https://www.example.com/page. Duplicates are checked once.

## `recordTypes` (type: `array`):

DNS record types to fetch for each domain.

## `checkEmailSecurity` (type: `boolean`):

Also read the SPF record and the \_dmarc record, and add hasMx, hasSpf, hasDmarc and the DMARC policy.

## `resolver` (type: `string`):

Public DNS-over-HTTPS resolver to ask first. The other one is used automatically if a query fails.

## `maxDomains` (type: `integer`):

Safety cap on how many domains one run checks (up to 10,000).

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "wikipedia.org",
    "example.com"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "CAA"
  ],
  "checkEmailSecurity": true,
  "resolver": "cloudflare",
  "maxDomains": 1000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsFull` (type: `string`):

No description

## `summary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "apify.com",
        "wikipedia.org",
        "example.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("dabooti/bulk-dns-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "apify.com",
        "wikipedia.org",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("dabooti/bulk-dns-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "wikipedia.org",
    "example.com"
  ]
}' |
apify call dabooti/bulk-dns-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dabooti/bulk-dns-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/MTfapPCs0N1n08LXW/builds/pTd0VcOiDxbcZLlmQ/openapi.json
