# SPF and DMARC Checker: Email Security Records for Any Domain (`pvalyou/spf-dmarc-checker`) Actor

Check the email security records of any domain, in bulk: the SPF record as published and its all rule and includes, the DMARC record with its policy, subdomain policy, enforcement percentage and report addresses, the mail servers and the email provider. $0.001 a domain.

- **URL**: https://apify.com/pvalyou/spf-dmarc-checker.md
- **Developed by:** [Pvalyou](https://apify.com/pvalyou) (community)
- **Categories:** Developer 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 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.
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 and DMARC Checker](https://apify.com/actor-badge?actor=pvalyou/spf-dmarc-checker)](https://apify.com/pvalyou/spf-dmarc-checker)

**Check the email security records of any domain, in bulk: the SPF record as published and its all rule and includes, the DMARC record with its policy, subdomain policy, enforcement percentage and report addresses, the mail servers and the email provider.** $0.001 a domain.

**Try it now with the prefilled input:** three well-known domains, then paste your own list, one per line.

**What you get**

- ✅ **The SPF record as published,** with its `all` rule (`-all`, `~all`, `?all`) and the services it includes, and how many SPF records the domain has (more than one is an error).
- ✅ **The DMARC record,** with its policy (none, quarantine or reject), subdomain policy, enforcement percentage and report addresses.
- ✅ **Mail servers and the email provider:** Google Workspace, Microsoft 365, Zoho and the rest, from the MX records.
- ✅ **The services allowed to send its email,** named from the SPF includes (SendGrid, Mailchimp, Zendesk and more).

### 👥 Who uses it

- **Deliverability and cold email teams** checking a sending domain before a campaign.
- **Security and compliance reviews** of vendors and partners: no DMARC, or a `p=none` policy, is a spoofing risk.
- **MSPs and IT teams** auditing many client domains at once.
- **Sales teams** finding companies on a given email provider.
- **AI agents** that answer "is this domain protected against spoofing".

### 📦 Example item

A real `domain` item from this check, shortened to this Actor's fields:

```json
{
  "type": "domain",
  "domain": "github.com",
  "charged": true,
  "charged_event": "domain_check",
  "state": "LIVE",
  "dns": {
    "has_mx": true,
    "mx_hosts": [
      "github-com.mail.protection.outlook.com"
    ],
    "email_provider": "Microsoft 365",
    "spf_present": true,
    "dmarc_policy": "quarantine",
    "spf_record": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com include:_netblocks.google.com include:mail.zendesk.com include:sendgrid.net ~all",
    "dmarc_record": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:dmarc@github.com; ruf=mailto:dmarc@github.com; fo=1",
    "email_auth": {
      "spf_records_found": 1,
      "spf_all": "~all",
      "spf_includes": [
        "spf.protection.outlook.com",
        "_netblocks.google.com",
        "mail.zendesk.com",
        "sendgrid.net"
      ],
      "dmarc_policy": "quarantine",
      "dmarc_subdomain_policy": "reject",
      "dmarc_pct": 100,
      "dmarc_rua": [
        "mailto:dmarc@github.com"
      ],
      "dmarc_ruf": [
        "mailto:dmarc@github.com"
      ]
    }
  },
  "tech": {
    "email_senders": [
      "Zendesk",
      "SendGrid"
    ]
  }
}
```

### 🤖 Using this Actor from an AI agent

**Call it when** you have one or more domains and need the answer above. Smallest useful input:

```json
{"domains": ["stripe.com"]}
```

Each domain comes back as one `domain` item. An entry that is not a domain is an uncharged `error` item with the reason.

### 💰 Pricing

$0.001 per domain checked, whatever it finds, plus $0.00005 to start the run. 1,000 domains cost $1. An entry that is not a domain is free.

### 📋 Input

| field | what it does |
|---|---|
| `domains` | Domains, website URLs or email addresses, one per line. Duplicates are checked once. |

### 🔗 Works well with

The same list of domains opens the rest of the family at the same price: [WHOIS Lookup](https://apify.com/pvalyou/whois-lookup), [Domain Expiry Checker](https://apify.com/pvalyou/domain-expiry-checker) and [Website Tech Stack Detector](https://apify.com/pvalyou/website-tech-stack). For all of it in one row with a live, parked or dead verdict, use [Website Status Checker](https://apify.com/pvalyou/website-liveness-check).

### ❓ Questions

**How fresh is it?** Every domain is read live on every run, from its own DNS, registry and homepage.

**How large a list can I send?** Thousands of domains in one run. They are checked in parallel and the run resumes where it was if the platform restarts it.

**Can I export the results?** As JSON, CSV, Excel or XML from the dataset, or through the Apify API.

**What else is in each row?** Every field is the domain's own DNS answer. A record the domain does not publish is empty, which is itself the finding: no DMARC record means no DMARC protection.

**Everything at once.** [Website Status Checker](https://apify.com/pvalyou/website-liveness-check) returns all of it in one row per domain: the live or dead verdict, registration, email security, tech stack and links. The same data split by question: [WHOIS Lookup](https://apify.com/pvalyou/whois-lookup), [Domain Expiry Checker](https://apify.com/pvalyou/domain-expiry-checker), [Website Tech Stack Detector](https://apify.com/pvalyou/website-tech-stack).

# Actor input Schema

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

One per line: a domain (acme.com), a website URL or an email address (the domain part is used).

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "notion.so",
    "monday.com"
  ]
}
```

# Actor output Schema

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

Every item with every field.

## `table` (type: `string`):

This Actor's columns, one row per domain.

# 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": [
        "stripe.com",
        "notion.so",
        "monday.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pvalyou/spf-dmarc-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": [
        "stripe.com",
        "notion.so",
        "monday.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pvalyou/spf-dmarc-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": [
    "stripe.com",
    "notion.so",
    "monday.com"
  ]
}' |
apify call pvalyou/spf-dmarc-checker --silent --output-dataset

```

## MCP server setup

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