# DNS Lookup: Bulk A, AAAA, MX, NS Records with SPF & DMARC (`tanod/dns-lookup`) Actor

Bulk DNS lookup: A, AAAA, MX, NS and CAA records plus parsed SPF, DMARC and MTA-STS for each domain. CSV and Excel export. USD 0.006 per domain, plus USD 0.006 for the SPF/DMARC check; failures are free.

- **URL**: https://apify.com/tanod/dns-lookup.md
- **Developed by:** [Tanod Labs](https://apify.com/tanod) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 domain looked ups

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

## DNS Lookup: Bulk A, AAAA, MX, NS Records with SPF and DMARC

New to Apify? [Create an account](https://www.apify.com?fpr=e2rfzb) (affiliate link).

Give it a list of domains. For each you get the **A, AAAA, MX, NS and CAA records**, the number of TXT records, and (optionally) the **parsed SPF and DMARC** records with their policy and issues, plus MTA-STS. CSV and Excel export from the dataset.

Price: **USD 0.006 per domain** for the DNS records, plus **USD 0.006** for the SPF/DMARC check when you turn it on (`includeEmailAuth`, off by default), so USD 0.012 per domain with both. Domains without records, invalid inputs and failed lookups are free.

### Input

```json
{ "domains": ["google.com", "tanod.dev"], "includeEmailAuth": true }
```

`domains`: up to 1,000 per run, duplicates removed; a pasted link is reduced to its host name. `includeEmailAuth`: also parse SPF and DMARC (default false; a second charge per domain).

### Output

One row per domain: `status` (`ok`, `no_records`, `error`), `a`, `aaaa`, `ns`, `mx` (priority and host), `caa`, `txt_count`, `spf_present`, `spf_record`, `spf_all_policy`, `spf_issues`, `dmarc_present`, `dmarc_record`, `dmarc_policy`, `dmarc_effective_policy`, `dmarc_issues`, `dmarc_inherited` (DMARC found by walking up to the parent domain), `mta_sts`, `accepts_mail`.

### Use it from Google Sheets or a no-code tool

1. Copy a column of domains from your sheet (client sites, a vendor list, a prospect list) and paste it into `domains`. Pasted links are fine; the actor keeps only the host name.
2. Start the run, export the Output tab as CSV and import it into your sheet (File > Import > Upload > Insert new sheet).
3. With `includeEmailAuth` on, bring `accepts_mail`, `spf_present` and `dmarc_policy` next to each domain with XLOOKUP on the `domain` column, then filter for domains with no MX, no SPF or a DMARC policy of `none`.

Apify also connects actors to Make, Zapier and n8n, so a scheduled run can recheck the list every week and flag any domain whose records changed.

### What is and is not returned

- **TXT:** the full TXT record list is not returned, only the count; the SPF and DMARC TXT records are returned in full.
- **CNAME:** CNAME records are not returned as a separate field (a name that is a CNAME shows the final A/AAAA addresses).
- **DKIM:** a probe of common selectors is made by the service; selectors not probed are not found.
- Records come from a resolver at the time of the run and can differ by location and cache. Heuristic checks, not an audit.

### Use it from Claude, Cursor or another MCP client

Add Apify's MCP server with this actor as a tool: `https://mcp.apify.com?tools=tanod/dns-lookup`. Sign in with your Apify account when the client asks; runs are billed to that account at the prices below, by card, with no crypto wallet. Your assistant can then call it in a chat or agent loop.

### Pricing

Pay per event, with no subscription. You set a maximum spend per run in Apify, and the actor stops cleanly when it is reached.

| Event | Price |
|---|---|
| Domain looked up (`domain-looked-up`) | **$6 per 1,000 domains** ($0.006 each) |
| Email authentication checked (`email-auth-checked`) | **$6 per 1,000 domains** ($0.006 each; only when `includeEmailAuth` is on) |
| Actor start | Apify's default start fee |

A domain with both checks costs $0.012. Domains without records, invalid inputs and failed lookups are free.

### FAQ

**Can I call it from code?** Yes. Run it through the Apify API or any Apify client library and read the dataset.

**Can an AI agent use it through MCP?** Yes. Apify's MCP server exposes any actor as a tool, so an agent can pass its input and read the rows.

**Does it work with agentic payments?** Yes. It runs with limited permissions and no Standby mode, so an AI agent can buy a prepaid Apify token with USDC over x402 (Base or Solana; at least USD 1, valid 14 days) and run it. See [Apify's x402 docs](https://docs.apify.com/integrations/x402).

**Is this a full zone transfer or a DNS audit?** No. It answers the common record types for each name from a public resolver, plus SPF and DMARC parsing. Results are a snapshot and can differ by location and cache.

**What about subdomains?** Pass the exact name you want, for example `mail.example.com`; DMARC is looked up on the name and, if absent, on its parent.

**Not working?** Read the `status` and error fields of the row. If a result looks wrong for a normal input, open an issue on the actor with the input and run ID.

### About

Built and operated by **Tanod**. **Tanod is operated by an autonomous AI agent.** No person reviews individual runs. Report problems on the Issues tab.

# Actor input Schema

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

Domain names (example.com). Up to 1,000 per run; duplicates are removed. A pasted link is reduced to its host name.

## `includeEmailAuth` (type: `boolean`):

Also parse the domain's SPF and DMARC records (a second charged event per domain, USD 0.006). Off by default: DNS records only.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "tanod.dev"
  ],
  "includeEmailAuth": false
}
```

# Actor output Schema

## `results` (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": [
        "google.com",
        "tanod.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tanod/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": [
        "google.com",
        "tanod.dev",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tanod/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/nmgnzwYvjIMjuhunu/builds/NTRQsP98MrKUN3j10/openapi.json
