# Domain Dossier: expiry, SSL, DNS & change alerts (`saksham1341/domain-dossier`) Actor

One record per domain: registration and expiry (RDAP), DNS, TLS certificate and security-header grade, with alerts for expiring domains and certificates. Change mode reports only what changed since the last run: nameservers, MX, registrar, certificate, grade.

- **URL**: https://apify.com/saksham1341/domain-dossier.md
- **Developed by:** [Saksham](https://apify.com/saksham1341) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.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

## Domain Dossier + Change Monitor: RDAP, DNS, SSL certificate and security headers

One record per domain with everything you check by hand when you look after domains, and an optional **change feed** that tells you what changed since the last run. Built for:

- **agencies and MSPs** watching client domains: expiring registrations and certificates, nameserver or MX changes nobody announced
- **domain investors** tracking expiry dates and registry status
- **security teams** watching for hijack signals: registrar, nameservers, A records or certificate issuer changing

### What each record contains

| Section | What |
|---|---|
| **Registration** (official registry RDAP, found through the IANA bootstrap file) | registrar and IANA ID, created / updated / expiry dates, EPP status codes, nameservers, DNSSEC |
| **DNS** | A, AAAA, MX (null MX shown as `0 .`), NS, CAA, SPF and DMARC present |
| **TLS certificate** (port 443) | issuer, subject, number of SANs, valid from / to, protocol, whether it verifies |
| **Security headers** (homepage) | HSTS, Content-Security-Policy, X-Frame-Options (or CSP `frame-ancestors`), X-Content-Type-Options, Referrer-Policy, Permissions-Policy; a 0-100 score and an A-F grade |
| **Computed** | `daysToDomainExpiry`, `daysToCertExpiry`, `alerts` |

Alerts: `domain-expiring`, `domain-expired`, `domain-status-problem` (hold, redemption, pending delete), `domain-not-registered`, `domain-not-resolving`, `cert-expiring`, `cert-expired`, `cert-untrusted`, `no-tls`, `missing-hsts`.

Contact data is never returned. Registries mostly redact it anyway; whatever is published (names, e-mails, phones of registrants or abuse desks) is dropped. A registrant **organisation** name is kept when the registry publishes it.

### Change-feed mode

Set `changesOnly: true` and schedule the Actor (for example daily). The first run saves a baseline in a named key-value store in your account (`stateKey`). Every later run adds a `changes` list per domain:

`registrar-changed`, `nameservers-changed`, `status-changed`, `domain-renewed`, `dnssec-changed`, `a-changed`, `aaaa-changed`, `mx-changed`, `cert-renewed`, `cert-issuer-changed`, `header-grade-dropped`, `header-grade-improved`

Each change has `before` and `after`. A check that fails in one run (for example a registry rate-limiting) is **not** reported as a change, and the previous baseline is kept. Turn on `onlyChangedOrAlerts` to leave quiet domains out of the dataset, and use `ignoreChanges` to mute noisy types (for example `a-changed` for sites behind CDNs).

### Input

```json
{
  "domains": ["github.com", "example.com", "https://www.yourclient.co.uk/"],
  "domainExpiryAlertDays": 30,
  "certExpiryAlertDays": 14,
  "changesOnly": true,
  "onlyChangedOrAlerts": true,
  "ignoreChanges": ["a-changed"],
  "stateKey": "client-domains"
}
```

### Output (shortened)

```json
{
  "domain": "github.com",
  "registrar": "MarkMonitor Inc.",
  "expiresAt": "2028-10-09T18:20:50Z",
  "daysToDomainExpiry": 700,
  "certIssuer": "Sectigo Limited",
  "certValidTo": "2027-01-27T23:59:59Z",
  "daysToCertExpiry": 79,
  "headerGrade": "A",
  "rdap": {"ok": true, "registrar": {"name": "MarkMonitor Inc.", "ianaId": "292"}, "statusCodes": ["clientdeleteprohibited", "clienttransferprohibited", "clientupdateprohibited"], "nameservers": ["dns1.p08.nsone.net", "..."], "dnssec": false, "createdAt": "2007-10-09T18:20:50Z"},
  "dns": {"a": ["20.207.73.82"], "mx": ["0 github-com.mail.protection.outlook.com"], "caa": ["0 issue \"digicert.com\"", "..."], "spf": true, "dmarc": true},
  "tls": {"ok": true, "issuer": "Sectigo Limited", "sanCount": 2, "protocol": "TLSv1.3", "trusted": true},
  "headers": {"ok": true, "score": 90, "grade": "A", "missing": ["permissionsPolicy"]},
  "alerts": [],
  "changes": [{"type": "nameservers-changed", "before": ["ns1.old.example"], "after": ["dns1.p08.nsone.net", "..."]}],
  "firstRun": false,
  "errors": []
}
```

### Pricing

- **$0.004 per domain checked**
- **$0.01 per domain with at least one change** (change-feed mode only)

Domains where every check failed are not charged. With `onlyChangedOrAlerts`, quiet domains are still checked and charged as checked.

### Limits

- **RDAP coverage:** registration data comes from each registry's own RDAP service. TLDs without one (or not yet listed by IANA) return DNS, certificate and header data only, with an `rdap` error. Added by hand: `.de` (DENIC), `.io`, `.ac`, `.sh`. Not covered: `.ch` and `.li` (the registry's terms only allow narrow uses).
- **What registries publish varies:** `.de` has no registrar or expiry date in RDAP; some ccTLDs give no expiry date. Those fields are then `null` and no expiry alert can fire.
- **Rate limits:** requests to each registry are spaced out and a `429` is retried once or twice, honouring `Retry-After`. If the registry keeps refusing, the domain is returned with an `rdap` error saying so; rerun later. Large lists on one TLD take longer for this reason.
- **Sub-domains** are looked up at their registered parent (for example `www.python.org` at `python.org`).
- **CDNs and load balancers** can return different IP addresses or certificates from run to run; mute `a-changed` / `aaaa-changed` if that is noise for you.
- The certificate and headers are read from the domain, or from `www.` if the bare domain does not answer. Homepages disallowed by robots.txt are not fetched.
- RDAP data is provided by the registries for information only. Use it for looking after domains, not for marketing.

# Actor input Schema

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

Domains to check, e.g. example.com. URLs are accepted and trimmed to the host name.

## `domainExpiryAlertDays` (type: `integer`):

Raise a `domain-expiring` alert when the registration expires in fewer days than this.

## `certExpiryAlertDays` (type: `integer`):

Raise a `cert-expiring` alert when the TLS certificate expires in fewer days than this.

## `changesOnly` (type: `boolean`):

Compare each domain with the previous run (stored under `stateKey`) and add a `changes` list: nameservers, MX, A/AAAA, registrar, status codes, renewals, certificate renewed or issuer changed, header grade dropped. The first run saves the baseline.

## `onlyChangedOrAlerts` (type: `boolean`):

Leave quiet domains out of the dataset. They are still checked (and charged as checked).

## `ignoreChanges` (type: `array`):

For example `a-changed` for sites behind CDNs whose IP addresses rotate.

## `stateKey` (type: `string`):

Named key-value store in your account that remembers the last run. Use different names for separate watch lists.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "example.com"
  ],
  "domainExpiryAlertDays": 30,
  "certExpiryAlertDays": 14,
  "changesOnly": false,
  "onlyChangedOrAlerts": false,
  "stateKey": "domain-dossier-state"
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("saksham1341/domain-dossier").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",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("saksham1341/domain-dossier").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",
    "example.com"
  ]
}' |
apify call saksham1341/domain-dossier --silent --output-dataset

```

## MCP server setup

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

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/x8gUDSWgjhFQy8Urr/builds/OWQEzLJkLipnu7Uuu/openapi.json
