# Domain Security Checker: DNS, SPF/DMARC, TLS, Headers, Tech (`ai_solution/website-domain-snapshot`) Actor

One call, one JSON per domain: DNS records, SPF/DKIM/DMARC email-auth grade, TLS certificate, security-header score, detected tech stack and a prioritised findings list. Ideal for agencies, security checks and AI agents.

- **URL**: https://apify.com/ai_solution/website-domain-snapshot.md
- **Developed by:** [MB AISolution](https://apify.com/ai_solution) (community)
- **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 snapshots

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

## Domain Security Checker: DNS, SPF/DKIM/DMARC, TLS, Security Headers & Tech Stack

**One input, one clean JSON record per domain.** Combine DNS records, email-authentication grade (SPF, DKIM, DMARC, MTA-STS), TLS certificate details, HTTP security-header score, cookie flags and detected technology stack - plus a prioritised list of findings. No browser, no proxies, no API keys needed. Built for agencies, IT/security teams, sales prospecting and AI agents that need a quick, structured "state of this domain".

### What you get per domain

| Block | Contents |
|---|---|
| `dns` | A, AAAA, CNAME, MX, NS, CAA, SOA, reverse DNS of the first IP |
| `emailAuth` | SPF (with DNS-lookup count and `all` policy), DMARC (policy, pct, report domains), DKIM selectors found among ~25 common ones, MTA-STS, TLS-RPT, BIMI, score 0-100 and grade A-F |
| `tls` | Protocol, cipher, ALPN, issuer, validity dates, **days remaining**, SANs, trust status, hostname match, key type/size |
| `http` / `securityHeaders` | Final URL and redirect chain, http-to-https redirect, server, HSTS details, CSP, X-Frame-Options, Referrer-Policy etc., score and grade |
| `cookies` | Count and how many lack Secure / HttpOnly / SameSite (cookie values are never stored) |
| `page` | Title, meta description, language, canonical, Open Graph / structured-data flags, external script domains |
| `technologies` | CMS, frameworks, analytics, CDN, hosting, web server, payments, consent tools - with version and evidence when available |
| `findings` | Sorted issues (`high` / `medium` / `low` / `info`) with stable `code` values such as `SPF_MISSING`, `DMARC_P_NONE`, `CERT_EXPIRES_SOON`, `NO_HSTS` |
| `summary` | Quick fields for sorting: grades, finding counts, certificate days left, technology names |

### Use cases

- **Agencies / freelancers**: audit prospects' email deliverability and security basics before a pitch.
- **IT & security teams**: monitor certificate expiry, missing SPF/DMARC, weak headers across many domains on a schedule.
- **Sales intelligence**: find which sites run Shopify, WordPress, HubSpot, Cloudflare and so on.
- **Due diligence / vendor checks**: quick external hygiene check of a supplier domain.
- **AI agents**: a single tool call that returns structured, machine-readable domain facts.

### Input

```json
{
  "domains": ["github.com", "https://www.example.org/"],
  "checkDns": true,
  "checkEmailAuth": true,
  "checkTls": true,
  "checkHttp": true,
  "detectTechStack": true,
  "dkimSelectors": ["myselector"],
  "maxItems": 100
}
```

All checks are on by default; switch off what you do not need. `maxItems` caps billed results. For email results use the **apex domain** (e.g. `example.com`), because SPF/DMARC usually live there rather than on `www`.

### Output (abridged)

```json
{
  "recordType": "domain_snapshot",
  "url": "https://github.com/",
  "domain": "github.com",
  "dns": { "a": ["140.82.121.4"], "mx": [{ "priority": 1, "exchange": "aspmx.l.google.com" }], "ns": ["dns1.p08.nsone.net"], "caa": [] },
  "emailAuth": { "spf": { "found": true, "all": "~all", "dnsLookups": 10 }, "dmarc": { "found": true, "policy": "quarantine", "pct": 100 }, "score": 90, "grade": "A" },
  "tls": { "protocol": "TLSv1.3", "issuer": "Sectigo Limited", "daysRemaining": 59, "certificateTrusted": true },
  "securityHeaders": { "score": 80, "grade": "B", "missing": ["Permissions-Policy"] },
  "technologies": [{ "name": "Cloudflare", "category": "CDN", "version": null, "evidence": ["header"] }],
  "findings": [{ "area": "dns", "severity": "info", "code": "NO_CAA", "message": "No CAA records: ..." }],
  "summary": { "highFindings": 0, "mediumFindings": 0, "emailGrade": "A", "headersGrade": "B", "tlsDaysRemaining": 59 },
  "scrapedAt": "2026-10-01T19:30:00.000Z"
}
```

Domains that do not exist, or that fail unexpectedly, produce a free `recordType: "error"` record and never stop the run.

### How much does it cost?

Pay per event: **0.006 USD per successfully analysed domain** (6.00 USD per 1,000) plus a start fee of 0.00005 USD per run. Failed and non-existent domains produce a free `error` record. Platform usage is included in the event price.

| Scenario | Results | Approx. cost |
|---|---|---|
| Quick check of one prospect | 1 | 0.006 USD |
| Audit 100 client or prospect domains | 100 | 0.60 USD |
| Weekly monitoring of 50 domains (about 4.3 runs/month) | 50 per run | 0.30 USD per run, about 1.29 USD/month |
| Bulk list of 1,000 domains | 1,000 | 6.00 USD |
| One run with default settings (`maxItems` 100) | max 100 | max 0.60 USD |

**Cost control:** `maxItems` caps billed results per run (default 100); the Actor also stops when your run's *maximum cost per run* setting is reached. Test with 3-5 domains first.

### Why this Actor (vs. alternatives)

Several Store Actors cover parts of this: email-deliverability checkers (SPF/DKIM/DMARC), DNS/WHOIS lookups, tech-stack detectors and security-posture checkers. This one returns **DNS + email-auth grade + TLS + security-header score + cookie flags + tech stack + a prioritised findings list in one record per domain**, with stable finding codes for alerting. It does **not** include WHOIS/RDAP or DNSSEC validation (some alternatives do) and it is not a vulnerability scanner. Prices of other Actors differ and change; compare on the Store page. (Based on public Store listings, 2026-10-02.)

### Use it from n8n, Make, code and AI agents

- **n8n / Make**: "Run Actor" (Apify node/module) with `{"domains": ["{{domain}}"]}`, then read dataset items; route on `summary.highFindings > 0` to alert your team.
- **API**:

```bash
curl -X POST "https://api.apify.com/v2/acts/ai_solution~website-domain-snapshot/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H 'Content-Type: application/json' -d '{"domains":["example.com"]}'
```

- **MCP / AI agents**: available through the Apify MCP server (`https://mcp.apify.com`, tool `ai_solution/website-domain-snapshot`). Fields and stable `code` values make results easy for an LLM to reason about.

### Scheduling and webhooks

1. In Apify Console open *Schedules*, create e.g. `0 6 * * 1` (Mondays 06:00 UTC) and add this Actor with your domain list.
2. Add a **webhook** for `ACTOR.RUN.SUCCEEDED` (Actor *Integrations* tab) to your endpoint or an n8n/Make *Webhook* node; the payload contains `resource.defaultDatasetId`.
3. Read `GET https://api.apify.com/v2/datasets/<defaultDatasetId>/items?token=...` and alert when `summary.highFindings > 0` or `summary.tlsDaysRemaining < 14`, or diff `findings` against the previous run.

### How it works and good-citizen behaviour

DNS queries go to public resolvers (1.1.1.1 / 8.8.8.8). TLS is a single normal handshake. HTTP is one GET to the homepage like a browser would make, preceded by a robots.txt check; if the homepage is disallowed for this Actor the HTTP part is skipped and reported. The Actor identifies itself in its User-Agent, throttles per host and refuses private/localhost targets. It does not port-scan, brute-force subdomains or probe vulnerabilities, and it does not bypass bot protection.

### Limitations

- DKIM selectors cannot be enumerated via DNS, so only ~25 common plus your custom selectors are probed; "not found" does not prove DKIM is absent.
- Technology detection uses an independent, built-in signature set based on headers, cookies, meta tags and script/link URLs of the homepage. It is not exhaustive and cannot see server-side-only technology.
- No WHOIS/RDAP data and no DNSSEC validation.
- Sites behind bot protection may return a challenge page; the Actor reports what it receives and does not try to bypass it.
- Grades are heuristics for triage, not a security audit.

### Changelog

- **1.0.4** - Lower price: 0.006 USD per result (was 0.008 USD). No other changes.
- **1.0.3** - Clearer README (cost examples, comparison, scheduling), new Store title and description. No changes to input, output fields, behaviour or pricing.
- **1.0.2** - Output schema (dataset views in the Output tab).
- **1.0.0** - First release.

### Support / Issues

Found a bug or need another check? Open a ticket in this Actor's **Issues** tab in Apify Console.

### Legal

Only public DNS data, public TLS handshake data and a single public homepage request are used. No personal data is collected (DMARC report addresses are reduced to domains; cookie values are not stored). You are responsible for using the results lawfully.

# Actor input Schema

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

Domains or URLs to analyse (host only is used). Example: example.com, https://www.github.com/. For email-authentication results use the main (apex) domain, because SPF/DMARC usually live there.

## `checkDns` (type: `boolean`):

A, AAAA, CNAME, MX, NS, CAA, SOA records and reverse DNS of the first IP.

## `checkEmailAuth` (type: `boolean`):

Parses SPF (incl. DNS-lookup count), DMARC policy, probes ~25 common DKIM selectors, MTA-STS, TLS-RPT and BIMI, and returns a grade A-F.

## `checkTls` (type: `boolean`):

One TLS handshake on port 443: protocol, cipher, certificate issuer, validity, days remaining, SANs, trust and hostname match.

## `checkHttp` (type: `boolean`):

One GET of the homepage over HTTPS (skipped if robots.txt disallows it) plus a http-to-https redirect check. Returns security-header score, cookie flags, page title/description and detected technologies.

## `detectTechStack` (type: `boolean`):

Detect CMS, frameworks, analytics, CDN, hosting and web server from headers, cookies, meta tags and script URLs (requires 'HTTP headers' to be enabled).

## `dkimSelectors` (type: `array`):

Optional additional DKIM selectors to probe, e.g. your email provider's custom selector. About 25 common selectors are always checked.

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

Hard cap on billed results (one per successfully analysed domain). Failed or non-existent domains are never billed.

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

Timeout for each network request / handshake.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "example.org"
  ],
  "checkDns": true,
  "checkEmailAuth": true,
  "checkTls": true,
  "checkHttp": true,
  "detectTechStack": true,
  "dkimSelectors": [
    "selector42"
  ],
  "maxItems": 100,
  "requestTimeoutSecs": 20
}
```

# Actor output Schema

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

All records in the default dataset.

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

Overview view of the default dataset.

## `errors` (type: `string`):

Errors view of the default dataset.

# 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": [
        "github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("ai_solution/website-domain-snapshot").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": ["github.com"] }

# Run the Actor and wait for it to finish
run = client.actor("ai_solution/website-domain-snapshot").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": [
    "github.com"
  ]
}' |
apify call ai_solution/website-domain-snapshot --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ai_solution/website-domain-snapshot"
        }
    }
}
```

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/zJG6eN5r1LeLtoZLH/builds/Sd4vRXG5E20QeKTho/openapi.json
