# DMARC, SPF, MX & Domain Security Scraper ($0.50/1k) (`desastreger/b2b-domain-mail-security-posture`) Actor

Bulk B2B domain email security & infrastructure scraper via live DNS (MX, SPF, DMARC), TLS X.509, IANA RDAP & RIPEstat BGP ASN. Flags spoofing-vulnerable domains for MSP sales. Early-bird $0.50/1k (rises to $1.50/1k). +MCP.

- **URL**: https://apify.com/desastreger/b2b-domain-mail-security-posture.md
- **Developed by:** [Ignacio De Saeger](https://apify.com/desastreger) (community)
- **Categories:** Developer tools, Lead generation, MCP servers
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 b2b domain mail, tls, rdap & tech stack posture audits

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 DMARC, SPF, MX, TLS & RDAP Domain Security Scraper

The **DMARC, SPF, MX & Domain Security Scraper** audits bulk B2B domains, URLs, and email addresses across four authoritative internet protocol layers using pure native RFC lookups. Instead of brittle HTML scraping or headless browsers, it runs live DNS queries (`MX`, `SPF`, `DMARC`, `NS`, root `TXT`), direct port `443` TLS X.509 certificate handshakes, official **IANA RDAP** bootstrap WHOIS checks (`data.iana.org`), and **RIPEstat BGP ASN** lookups (`stat.ripe.net`). Output records include `emailProvider` (`Google Workspace`, `Microsoft 365`, `Proofpoint`, `Mimecast`, `Proton Mail`), `spfAllQualifier`, `detectedSaasSenders` (`HubSpot`, `Salesforce`, `SendGrid`, `Zendesk`), `dmarcPolicy`, `emailSpoofingVulnerable`, `daysUntilCertExpiry`, `sampleSubdomains`, `registrarName`, `domainAgeDays`, `asnHolder`, `securityScore` (`0–100`), and `mspSalesTrigger`. Built in fast 128MB Node.js with native Standby MCP Server support. **No external API key or proxy required.**

### Use cases

- **MSP & Cybersecurity Outbound Lead Scoring:** Identify SMB and mid-market prospects missing DMARC or running `p=none` (`emailSpoofingVulnerable: true`) with ready-to-send `mspSalesTrigger` outreach hooks.
- **B2B SaaS & GTM Technographic Enrichment:** Classify prospects by email suite (`Google Workspace` vs `Microsoft 365`), email security gateway (`Proofpoint`, `Mimecast`, `Barracuda`), and SPF/TXT SaaS stack (`HubSpot`, `Salesforce`, `Slack`, `DocuSign`).
- **Automated Clay, n8n & Make Domain Audits:** Enrich CRM domain lists at `$0.50 per 1,000 domains` launch pricing without hitting third-party WHOIS or DNS API rate limits.
- **Vendor Risk & TLS Expiry Monitoring:** Audit partner domains for expiring SSL/TLS certificates (`daysUntilCertExpiry`), weak trust status, and newly registered shell domains (`newlyRegisteredShellRisk`).
- **Cloud Hosting & Infrastructure Attribution:** Map domains to `asn`, `asnHolder`, `bgpPrefix`, and `nameserverProvider` (`Cloudflare`, `AWS Route53`, `Azure DNS`).
- **AI Agent Security Audits (MCP):** Let Claude Desktop, Cursor, or Google Antigravity inspect domain posture in real time via `/mcp`.

***

### Transparent Pay-Per-Event Launch Pricing

> \[!IMPORTANT]
> **Early-Adopter Launch Rate (`$0.50 / 1,000 domains`):** Temporary promotional pricing for early Apify Store adopters & integrations.
> **Upcoming Standard Rate (`$1.50 / 1,000 domains`):** Price will step up once initial launch benchmarks are met — and even the permanent standard rate remains **75%–95% lower** than comparable Apify Store domain/technographic scrapers (`$10–$80/1k`).

Pay only per normalized domain audited—no recurring subscriptions or third-party DNS/WHOIS fees:

| Plan Tier | Event (`domain-security-audit`) | Effective Rate |
| :--- | :--- | :--- |
| **Early-Bird Launch / Free** | `$0.00050` per domain | **$0.50 per 1,000 domains** |
| **Bronze** | `$0.00045` per domain | **$0.45 per 1,000 domains** |
| **Silver** | `$0.00040` per domain | **$0.40 per 1,000 domains** |
| **Gold** | `$0.00035` per domain | **$0.35 per 1,000 domains** |
| **Scheduled Standard Rate** | `$0.00150` per domain | **$1.50 per 1,000 domains** |

***

### 1-Click JSON Input Example

```json
{
  "domains": [
    "apify.com",
    "stripe.com",
    "https://www.cloudflare.com",
    "sales@hubspot.com"
  ],
  "includeTlsCertCheck": true,
  "includeRdapDomainAge": true,
  "includeBgpAsnLookup": true,
  "concurrency": 5
}
```

***

### Sample Output Record

```json
{
  "queriedInput": "stripe.com",
  "domain": "stripe.com",
  "domainExists": true,
  "securityScore": 92,
  "securityGrade": "A",
  "emailProvider": "Google Workspace",
  "primaryMx": "aspmx.l.google.com",
  "hasEmailSecurityGateway": false,
  "spfPresent": true,
  "spfAllQualifier": "softfail (~all)",
  "detectedSaasSenders": ["Greenhouse", "Qualtrics"],
  "dmarcPresent": true,
  "dmarcPolicy": "reject",
  "dmarcPct": 100,
  "dmarcRua": "mailto:dmarc-reports@stripe.com",
  "emailSpoofingVulnerable": false,
  "nameserverProvider": "AWS Route53",
  "asn": 16509,
  "asnHolder": "AMAZON-02 - Amazon.com, Inc.",
  "bgpPrefix": "18.202.0.0/15",
  "tlsReachable": true,
  "tlsAuthorized": true,
  "issuerOrg": "DigiCert, Inc.",
  "daysUntilCertExpiry": 179,
  "sanCount": 2,
  "sampleSubdomains": ["stripe.com", "www.stripe.com"],
  "registrarName": "SafeNames Ltd.",
  "registeredAt": "1995-09-12T04:00:00.000Z",
  "domainAgeDays": 11383,
  "newlyRegisteredShellRisk": false,
  "riskAndSalesSignals": ["SOFTFAIL_SPF"],
  "mspSalesTrigger": [
    "SPF uses softfail (~all); can be hardened to -all after auditing third-party SaaS senders."
  ]
}
```

***

### API Quickstart (cURL, Node.js & Python)

#### cURL (Synchronous Run + Dataset Items)

```bash
curl -X POST "https://api.apify.com/v2/acts/desastreger~b2b-domain-mail-security-posture/run-sync-get-dataset-items?token=<APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["apify.com", "stripe.com"],
    "includeTlsCertCheck": true,
    "includeRdapDomainAge": true,
    "includeBgpAsnLookup": true,
    "concurrency": 5
  }'
```

#### Node.js (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('desastreger/b2b-domain-mail-security-posture').call({
  domains: ['apify.com', 'stripe.com', 'cloudflare.com'],
  includeTlsCertCheck: true,
  includeRdapDomainAge: true,
  includeBgpAsnLookup: true,
  concurrency: 10,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python (`apify-client`)

```python
import os
from apify_client import ApifyClient

client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("desastreger/b2b-domain-mail-security-posture").call(run_input={
    "domains": ["apify.com", "stripe.com"],
    "includeTlsCertCheck": True,
    "includeRdapDomainAge": True,
    "includeBgpAsnLookup": True,
    "concurrency": 5,
})
items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
print(items)
```

***

### Model Context Protocol (MCP) Integration

Connect **Claude Desktop**, **Cursor**, or **Google Antigravity** directly to the live Standby MCP server at `/mcp`:

```json
{
  "mcpServers": {
    "domain-security-audit": {
      "url": "https://desastreger--b2b-domain-mail-security-posture.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <APIFY_TOKEN>"
      }
    }
  }
}
```

**Exposed MCP Tools:**

- `audit_domain_posture`: Real-time single-domain mail, TLS, RDAP, and BGP technographic + security audit.
- `batch_audit_domains`: Parallel multi-domain posture audit (up to 50 domains per call).

# Actor input Schema

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

List of raw domains, website URLs, or email addresses to audit (e.g., \["apify.com", "stripe.com", "https://www.cloudflare.com", "sales@hubspot.com"]). Automatically normalized and deduplicated to clean host/root domains.

## `includeTlsCertCheck` (type: `boolean`):

Connect directly to port 443 via native TLS SNI to inspect issuer CA, certificate validity/expiry countdown, trust authorization status, and Subject Alternative Name (SAN) subdomains.

## `includeRdapDomainAge` (type: `boolean`):

Query the authoritative TLD registry via official IANA RDAP bootstrap (data.iana.org) for domain registration date, expiration date, age in days, registrar name, and newly-registered shell risk (<90 days).

## `includeBgpAsnLookup` (type: `boolean`):

Query RIPEstat prefix-overview for primary IPv4 autonomous system number (ASN), ASN holder organization (AWS, Cloudflare, Google, Fastly, etc.), and BGP prefix.

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

Number of domains to inspect concurrently in parallel (1 to 20).

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "stripe.com"
  ],
  "includeTlsCertCheck": true,
  "includeRdapDomainAge": true,
  "includeBgpAsnLookup": true,
  "concurrency": 5
}
```

# Actor output Schema

## `domainAudits` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("desastreger/b2b-domain-mail-security-posture").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("desastreger/b2b-domain-mail-security-posture").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 '{}' |
apify call desastreger/b2b-domain-mail-security-posture --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,desastreger/b2b-domain-mail-security-posture"
        }
    }
}
```

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/LWhw1smfP1Nev0E2J/builds/Yem4LL89FI409cPgw/openapi.json
