# Bulk DNS Lookup - MX, SPF, DMARC, DKIM, TXT, A, NS Records (`zhucl1006/bulk-dns-records-lookup`) Actor

Look up DNS records for thousands of domains: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA plus parsed SPF, DMARC policy, DKIM selectors, BIMI, email provider (Google Workspace, Microsoft 365...) and an email-security score. Fast DNS-over-HTTPS.

- **URL**: https://apify.com/zhucl1006/bulk-dns-records-lookup.md
- **Developed by:** [leo zhu](https://apify.com/zhucl1006) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 domain dns lookups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 Lookup - MX, SPF, DMARC, DKIM, TXT, A & NS Records

Check DNS records for **hundreds or thousands of domains in one run**: A, AAAA, MX, NS, TXT, CNAME, SOA and CAA, plus a full **email-authentication audit** - parsed SPF (all-mechanism, includes), DMARC policy / pct / rua, DKIM keys found on common selectors, BIMI, the **email provider** behind the MX (Google Workspace, Microsoft 365, Proofpoint, Mimecast, Zoho...) and a **0-100 email-security score with a list of issues**. Input can be domains, URLs or email addresses. Uses DNS-over-HTTPS (Cloudflare, with Google fallback) - 4 domains in well under a second.

### Who uses it

- **Cold-email & deliverability agencies**: audit prospects' or clients' SPF/DMARC/DKIM before a campaign; find domains with weak DMARC (a sales trigger for your service).
- **B2B sales & lead enrichment**: tag leads by email provider (Google Workspace vs Microsoft 365) to personalise outreach and segment lists.
- **Security / IT / MSPs**: bulk-check client domains for missing DMARC, permissive SPF (`+all`, `?all`), CAA and nameserver changes.
- **Domain investors & migrations**: verify where hundreds of domains point (A, NS, CNAME) after a move.
- **Automation**: schedule it and alert on changes via n8n / Make / Zapier / the Apify API.

### Input

| Field | Description |
|---|---|
| `domains` | Domains, URLs or emails - the domain is extracted and deduplicated. |
| `recordTypes` | A, AAAA, MX, NS, TXT, CNAME, SOA, CAA (default all). |
| `checkEmailSecurity` | SPF/DMARC/DKIM/BIMI audit, provider and score (default on). |
| `dkimSelectors` | Selectors to probe (default google, selector1, selector2, default, k1, s1, mail). |
| `concurrency` | Domains in parallel (default 10). |

```json
{ "domains": ["stripe.com", "https://www.hubspot.com/pricing", "info@microsoft.com"], "recordTypes": ["A", "MX", "TXT"] }
```

### Output (one row per domain)

```json
{
  "domain": "stripe.com", "status": "ok", "dnsStatus": "NOERROR",
  "a": ["198.202.176.161", "198.137.150.161"],
  "mx": [{ "priority": 10, "host": "aspmx.l.google.com" }, { "priority": 20, "host": "alt1.aspmx.l.google.com" }, "..."],
  "ns": ["..."], "txt": ["MS=ms80697640", "..."],
  "emailProvider": "Google Workspace", "hasMx": true, "nullMx": false,
  "spf": "v=spf1 ip4:198.2.180.60/32 ip4:13.111.2.227/32 include:spf1.stripe.com include:greenhouse-outbound-mail.stripe.com include:_spf.qualtrics.com ~all",
  "spfValid": true, "spfAll": "~", "spfIncludes": ["spf1.stripe.com", "greenhouse-outbound-mail.stripe.com", "_spf.qualtrics.com"],
  "dmarc": "v=DMARC1; p=reject; pct=100; fo=1; rua=mailto:dmarc-reports@stripe.com; ruf=mailto:dmarc-forensics@stripe.com;",
  "dmarcPolicy": "reject", "dmarcPct": 100, "dmarcRua": ["mailto:dmarc-reports@stripe.com"],
  "dkimSelectorsFound": ["google", "s1"], "bimi": null,
  "emailSecurityScore": 95, "emailSecurityIssues": []
}
```

Unregistered domains return `status: "nxdomain"`. Invalid inputs are listed with `status: "invalid"` and not charged.

Score: MX 20 + SPF 25 (15 if permissive) + DMARC 35 reject / 30 quarantine / 15 none + DKIM found 15 + BIMI 5. DKIM can only be detected for the selectors probed - a missing DKIM result does not prove the domain has no DKIM.

### Pricing (pay per event)

- **$0.002 per domain checked** (`domain-dns`) - 1,000 domains = $2, with all record types and the email audit included.
- Tiny start fee per run (`apify-actor-start`). Invalid domains and lookup errors are not charged. Set "Maximum cost per run" to cap spend.

### Notes

- Only public DNS data is queried; nothing is sent to the domains themselves. Results reflect public resolvers at run time (TTL caching may delay very recent changes by minutes).
- Need mailbox-level checks? See our Email Verifier (MX + disposable) Actor. Need WHOIS / expiry? See Bulk Domain WHOIS (RDAP).

# Actor input Schema

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

Domains, URLs or email addresses (the domain is extracted), e.g. stripe.com, https://www.hubspot.com/pricing, info@example.org.

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

DNS record types to fetch for each domain.

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

Parses SPF and DMARC, probes common DKIM selectors and BIMI, detects the email provider and computes a 0-100 email-security score with issues.

## `dkimSelectors` (type: `array`):

Common selectors: google (Workspace), selector1/selector2 (Microsoft 365), k1 (Mailchimp), s1/s2 (SendGrid). Max 20.

## `concurrency` (type: `integer`):

How many domains are checked at the same time.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "google.com",
    "github.com",
    "shopify.com"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "CAA"
  ],
  "checkEmailSecurity": true,
  "dkimSelectors": [
    "google",
    "selector1",
    "selector2",
    "default",
    "k1",
    "s1",
    "mail"
  ],
  "concurrency": 10
}
```

# Actor output Schema

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

No description

## `runSummary` (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",
        "google.com",
        "github.com",
        "shopify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhucl1006/bulk-dns-records-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",
        "google.com",
        "github.com",
        "shopify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("zhucl1006/bulk-dns-records-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",
    "google.com",
    "github.com",
    "shopify.com"
  ]
}' |
apify call zhucl1006/bulk-dns-records-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhucl1006/bulk-dns-records-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/IWSDmdhCd4BvNZPtj/builds/3sgmRrk5EhAoZzC0Z/openapi.json
