# Spf Dmarc Email Auth Checker (`real-estate-api/spf-dmarc-email-auth-checker`) Actor

This Actor audits and analyzes domain email authentication records, including SPF, DKIM, and DMARC configurations. It extracts policy statuses, alignment details, and security warnings to improve email deliverability, prevent spoofing, and protect brand reputation.

- **URL**: https://apify.com/real-estate-api/spf-dmarc-email-auth-checker.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### SPF/DMARC Email Auth Checker — Domain Email Security and DNS Authentication Analysis

![SPF/DMARC Email Auth Checker cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/spf-dmarc-email-auth-checker-cover.png)

Check SPF and DMARC email authentication records for multiple domains using public DNS information. Review authentication policies, DNS records, reporting addresses, alignment settings, and DNS diagnostics. Export structured results in JSON, CSV, or Excel formats.

### Overview

This actor checks SPF and DMARC records for each supplied domain using Cloudflare DNS-over-HTTPS.

It retrieves TXT records from the domain and its corresponding `_dmarc` subdomain, then extracts email authentication settings and DNS information.

Results are deduplicated using a stable row hash and capped according to the `maxItems` setting.

### Features

- Check SPF and DMARC records for multiple domains.
- Identify whether SPF and DMARC records exist.
- Extract complete SPF and DMARC TXT records.
- Analyze SPF policies, mechanisms, and included domains.
- Retrieve SPF IPv4, IPv6, and redirect information.
- Extract DMARC policies and subdomain policies.
- Collect aggregate and forensic reporting addresses.
- Review SPF and DKIM alignment settings.
- Retrieve DNS response codes, answer counts, TTL, and DNSSEC information.
- Export structured results in JSON, CSV, and Excel formats.

### Collection Mode

**SPF + DMARC Check**

Checks TXT records for each supplied domain and its `_dmarc` subdomain to collect email authentication and DNS information.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `mode` | String | Yes | `check` | Selects the SPF and DMARC checking mode. |
| `domains` | Array | Yes | — | List of domains to check. |
| `maxItems` | Integer | No | `50` | Maximum number of results to collect. |
| `requestDelaySecs` | Number | No | `1` | Delay between domain checks in seconds. |

### Example Input

```json
{
  "mode": "check",
  "domains": ["google.com"],
  "maxItems": 50,
  "requestDelaySecs": 1
}
```

### Extracted Data

#### Domain Information

| Field | Description |
|---|---|
| `domain` | Domain name being checked. |

#### Authentication

| Field | Description |
|---|---|
| `spf_found` | Indicates whether an SPF record was found. |
| `dmarc_found` | Indicates whether a DMARC record was found. |
| `email_authentication` | Overall email authentication information or status. |

#### DNS Records

| Field | Description |
|---|---|
| `spf_record` | SPF TXT record content. |
| `dmarc_record` | DMARC TXT record content. |
| SPF record count | Number of SPF TXT records found. |
| DMARC record count | Number of DMARC TXT records found. |
| All SPF/DMARC TXT records | Complete TXT record values returned for the checked domains. |

#### SPF Policy

| Field | Description |
|---|---|
| `spf_policy` | SPF policy information. |
| `spf_all` | SPF `all` mechanism and its qualifier. |
| `spf_mechanisms` | SPF mechanisms defined in the record. |

#### SPF Details

- Included domains (`include`).
- Authorized IPv4 ranges (`ip4`).
- Authorized IPv6 ranges (`ip6`).
- Redirect destination (`redirect`).
- DNS lookup-related terms and mechanisms.

#### DMARC Policy

| Field | Description |
|---|---|
| `dmarc_policy` | Main DMARC policy. |
| `dmarc_subdomain_policy` | DMARC policy applied to subdomains. |
| Percentage | Percentage of messages subject to the DMARC policy (`pct`). |

#### DMARC Reports

- Aggregate report addresses (`rua`).
- Forensic report addresses (`ruf`).

#### DMARC Alignment

- DKIM alignment (`adkim`).
- SPF alignment (`aspf`).
- Failure reporting options (`fo`).

#### DNS Diagnostics

| Field | Description |
|---|---|
| DNS response codes | DNS response status codes. |
| Answer counts | Number of DNS answers returned. |
| Minimum TTL | Minimum time-to-live value among DNS answers. |
| DNSSEC | DNSSEC-related information or status. |

#### Timestamp

| Field | Description |
|---|---|
| `checked_at` | Date and time when the domain authentication check was performed. |

### Example Output

```json
{
  "domain": "google.com",
  "spf_found": true,
  "dmarc_found": true,
  "email_authentication": "SPF and DMARC records found",
  "spf_record": "v=spf1 include:_spf.google.com ~all",
  "dmarc_record": "v=DMARC1; p=reject; rua=mailto:mailauth-reports@google.com",
  "spf_policy": "v=spf1",
  "spf_all": "~all",
  "spf_mechanisms": [
    "include:_spf.google.com"
  ],
  "dmarc_policy": "reject",
  "dmarc_subdomain_policy": null,
  "rua": [
    "mailto:mailauth-reports@google.com"
  ],
  "ruf": [],
  "checked_at": "2026-10-26T00:00:00+00:00"
}
```

*The example illustrates the record structure. Actual extracted values depend on the domain's DNS configuration.*

### Use Cases

- **Email deliverability audits:** Check whether domains have SPF and DMARC authentication records configured.
- **Security reviews:** Identify domains with missing or weak DMARC policies.
- **Bulk domain checks:** Audit multiple customer, brand, or business domains and export the results.
- **DNS monitoring:** Schedule recurring checks to identify changes in email authentication records.
- **Domain security research:** Review SPF mechanisms, DMARC alignment, and reporting configurations.

### FAQ

**Who is this actor for?**

It is useful for email administrators, security analysts, marketers, and developers who need SPF and DMARC information in a structured dataset.

**What export formats are available?**

You can export dataset results in JSON, CSV, Excel, and other supported Apify dataset formats.

**Can I run it on a schedule?**

Yes. You can use Apify Schedules to perform recurring domain authentication checks automatically.

**What does the actor check?**

It checks SPF TXT records at the supplied domain and DMARC TXT records at its `_dmarc` subdomain. It also extracts policy settings, reporting addresses, alignment options, and DNS diagnostics.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

## `mode` (type: `string`):

What to scrape. SPF + DMARC check queries TXT at the domain and at \_dmarc.domain via Cloudflare DoH.

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

Domains to check, one per line.

## `maxItems` (type: `integer`):

Stop after this many successful rows. Hard max is 1000.

## `requestDelaySecs` (type: `number`):

Seconds to wait between requests.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "mode": "check",
  "domains": [
    "google.com"
  ],
  "maxItems": 100,
  "requestDelaySecs": 1,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

## `dataset` (type: `string`):

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/spf-dmarc-email-auth-checker").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"] }

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/spf-dmarc-email-auth-checker").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"
  ]
}' |
apify call real-estate-api/spf-dmarc-email-auth-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/spf-dmarc-email-auth-checker"
        }
    }
}
```

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/vPugLDw9T6argKdM9/builds/67sLNvWN7r6iSLLzl/openapi.json
