# Domain DNS Facts: Mail Provider, SPF and DMARC (`edgef-4/domain-dns-facts`) Actor

Bulk DNS facts for agency client and prospect lists: mail provider, DNS host, SPF all rule, DMARC policy and DNSSEC flag, up to 2,000 domains per run over public DNS. $1.00 per 1,000 domains; missing domains and failures are free.

- **URL**: https://apify.com/edgef-4/domain-dns-facts.md
- **Developed by:** [Edge](https://apify.com/edgef-4) (community)
- **Categories:** Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 domain checkeds

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

**For email, deliverability, IT and marketing agencies that manage many client domains.** Domain DNS Facts reads public DNS for a list of up to 2,000 domains per run and returns, per domain: where mail goes and which provider runs it, who hosts the DNS, the SPF `all` rule, the DMARC policy and the DNSSEC validation flag.

**The job in one line:** paste client or prospect domains, get one row per domain showing how mail is set up and how strict SPF and DMARC are.

**What one run costs (pay per event):**

| Event | Price |
|---|---|
| Domain checked (one domain with status `ok`) | $0.001 |
| Actor start (once per run, Apify's standard fee) | $0.00005 |

1,000 domains cost $1.00. Domains that do not exist, rejected lines and resolver failures are free, and a repeated domain is charged once. A real run on 17 Oct 2026 (python.org, example.com, gmail.com) took 6.5 seconds, returned 3 `ok` domains and cost a buyer $0.00305.

### Quick start

```json
{
    "domains": ["python.org", "example.com", "gmail.com"],
    "dohProvider": "google"
}
```

`domains` takes bare domain names, one per line (no `https://`, path or port). `dohProvider` is `google` (default) or `cloudflare`.

### Output example

A REAL record, read on 8 Oct 2026 at 01:55 UTC through dns.google by this Actor. DNS answers change, so a later run can differ.

```json
{
  "id": "f731bf51ae1d57b8152f",
  "input": "stripe.com",
  "domain": "stripe.com",
  "status": "ok",
  "error": null,
  "mail_route": "mx",
  "mx_hosts": ["aspmx.l.google.com", "alt1.aspmx.l.google.com", "alt2.aspmx.l.google.com"],
  "mx_provider": "google",
  "ns_hosts": ["ns-1087.awsdns-07.org", "ns-1882.awsdns-43.co.uk", "ns-423.awsdns-52.com", "ns-705.awsdns-24.net"],
  "ns_host_count": 4,
  "ns_provider": "aws_route53",
  "has_a": true,
  "spf_present": true,
  "spf_record_count": 1,
  "spf_all": "~all",
  "dmarc_present": true,
  "dmarc_policy": "reject",
  "dmarc_subdomain_policy": null,
  "dnssec_validated": false,
  "lookup_errors": [],
  "source_url": "https://dns.google/resolve?name=stripe.com&type=MX",
  "source_urls": [
    "https://dns.google/resolve?name=stripe.com&type=MX",
    "https://dns.google/resolve?name=stripe.com&type=NS",
    "https://dns.google/resolve?name=stripe.com&type=A",
    "https://dns.google/resolve?name=stripe.com&type=TXT",
    "https://dns.google/resolve?name=_dmarc.stripe.com&type=TXT"
  ],
  "fetched_at": "2026-10-08T01:55:31Z"
}
```

Key fields:

- `status`: `ok`; `not_found` (the name does not exist in DNS); `error` (rejected line or resolver failure); `blocked` (resolver rate limit).
- `mail_route`: `mx`, `null_mx` (the domain declares it takes no mail), `a_fallback` (no MX, mail would go to the A address) or `none`.
- `spf_all`: the `all` rule of the first SPF record (`-all`, `~all`, `?all`, `+all`), or null.
- `dmarc_policy` and `dmarc_subdomain_policy`: `none`, `quarantine` or `reject`, or null.
- `mx_provider` and `ns_provider`: guesses from host names, null when no rule matches.
- `source_urls`: every lookup used, so each fact points back to its source.

### Three agency use cases

1. **DMARC and SPF audit across the client book.** Run every client domain once a month. Sort by `dmarc_policy` and `spf_all` to see which clients still sit at `none` or `~all`, and turn that into the next quarter's deliverability work.
2. **Prospect qualification.** Before outreach to a list of companies, check which mail provider and DNS host each one uses and whether email authentication is set up. A domain with no DMARC record is a concrete talking point for a deliverability or security offer.
3. **Onboarding check for a new client.** On day one, run the client's brand and campaign domains to record the starting state: mail route, provider, SPF, DMARC and DNSSEC flag, each with the DNS lookup address behind it.

### Limits and what it does not do

- Public DNS over HTTPS only. No registry, website or mail server is contacted.
- No registration data (creation or expiry dates, registrar): the large registries forbid bulk automated use of their registration data service.
- No DKIM check: DKIM records live under selectors that cannot be listed from DNS.
- At most 2,000 domains per run, about 1 second per domain. For a longer list, split it into several runs.
- A subdomain is looked up exactly as given; the parent domain's records are not consulted.
- Provider guesses come from a short built-in list of host name patterns and say nothing about plans or contracts.
- `dnssec_validated` is the resolver's flag on the MX answer; a signed zone that the resolver does not validate shows `false`.

### FAQ

**Does `not_found` mean the domain is free to register?** No. It only means the name does not resolve in DNS today.

**Can I paste website addresses?** Only bare domains. Remove `https://`, paths and ports first. Rejected lines come back as `error` with `invalid_domain` and are not charged.

**What does a null field mean?** Unknown, never absent. When a lookup after the MX one fails, it is listed in `lookup_errors`, the record stays `ok` and those fields stay null.

**Is anything stored between runs?** No. Each run reads DNS fresh for your list and keeps nothing afterwards.

**How do I cap my spend?** Set a maximum cost per run in the run options. The run stops cleanly when it is reached.

Keywords: DMARC checker bulk, SPF record checker, email deliverability audit, mail provider lookup, MX record lookup, DNS host lookup, domain list enrichment for agencies

# Changelog

This Actor's version history is a separate document: https://apify.com/edgef-4/domain-dns-facts/changelog.md

# Actor input Schema

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

One bare domain per line, such as example.com (no https://, no path, no @). Blank lines and repeats are skipped. At most 2,000 per run.

## `dohProvider` (type: `string`):

Public resolver used for all lookups.

## Actor input object example

```json
{
  "domains": [
    "python.org",
    "example.com",
    "gmail.com"
  ],
  "dohProvider": "google"
}
```

# Actor output Schema

## `results` (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": [
        "python.org",
        "example.com",
        "gmail.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("edgef-4/domain-dns-facts").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": [
        "python.org",
        "example.com",
        "gmail.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("edgef-4/domain-dns-facts").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": [
    "python.org",
    "example.com",
    "gmail.com"
  ]
}' |
apify call edgef-4/domain-dns-facts --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,edgef-4/domain-dns-facts"
        }
    }
}
```

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/EM56daCdA1ZJHMdaX/builds/7mnHGeeiKPL15O7uf/openapi.json
