# SSL/TLS Certificate Expiry & SANs Subdomain Drift Monitor (`invaluable_rondeau/ssl-tls-certificate-drift-monitor`) Actor

Audit and monitor SSL/TLS certificates across up to 500 hosts per run. Track days until expiration, issuing CA changes, TLS protocol version, and newly added SAN subdomains in Key-Value Store.

- **URL**: https://apify.com/invaluable_rondeau/ssl-tls-certificate-drift-monitor.md
- **Developed by:** [PROOFNEXA](https://apify.com/invaluable_rondeau) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 tls certificate inspecteds

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

## SSL/TLS Certificate Expiry & SANs Subdomain Drift Monitor

Inspect and monitor SSL/TLS certificates across **up to 500 hosts per run** using direct TLS handshakes (`TLSv1.2` / `TLSv1.3`). Track exact days until expiration, issuing Certificate Authority (CA) changes, untrusted/mismatch errors, and newly added or removed **Subject Alternative Name (SAN)** subdomains across scheduled runs.

> **Companion Infrastructure & Domain Tools:**
>
> - Monitor DNS `A` / `AAAA` / `CNAME` / `MX` / `TXT` / `NS` / `CAA` record changes: **[DNS Record Change Monitor (`invaluable_rondeau/dns-record-change-monitor`)](https://apify.com/invaluable_rondeau/dns-record-change-monitor)**
> - Audit corporate domain SPF / DMARC / DKIM / MX email security posture: **[B2B Domain Email Security & Deliverability Auditor (`invaluable_rondeau/b2b-domain-email-security-auditor`)](https://apify.com/invaluable_rondeau/b2b-domain-email-security-auditor)**
> - Monitor OpenAPI endpoint schema drift: **[Third-Party API Contract Drift Monitor (`invaluable_rondeau/third-party-api-contract-drift-monitor`)](https://apify.com/invaluable_rondeau/third-party-api-contract-drift-monitor)**

### Key Capabilities

- **Zero- outage Certificate Expiry Alerts**: Flags certificates within `expiryWarningDays` (default `30` days) as `expiring_soon` and expired certificates as `expired`.
- **SAN Subdomain Discovery & Drift**: Extracts every `DNS:` Subject Alternative Name on the peer certificate and compares it against the previous run's Key-Value Store state (`stateId`), highlighting `addedSans` and `removedSans`.
- **Fast & Lightweight (`256 MB` RAM)**: Uses Node.js native `node:tls` with 10-way concurrency—no headless browser or external API key required.

### Input Example

```json
{
  "hosts": [
    "apify.com",
    "github.com",
    "cloudflare.com"
  ],
  "expiryWarningDays": 30,
  "port": 443,
  "stateId": "production-domains",
  "timeoutMs": 4000
}
```

### Output Example

```json
{
  "host": "apify.com",
  "port": 443,
  "status": "valid",
  "daysRemaining": 71,
  "isExpired": false,
  "isExpiringSoon": false,
  "authorized": true,
  "subjectCn": "apify.com",
  "issuerOrg": "Google Trust Services",
  "validTo": "2026-12-30T00:00:00.000Z",
  "fingerprint256": "AA:BB:CC...",
  "protocol": "TLSv1.3",
  "sanCount": 2,
  "subjectAltNames": ["*.apify.com", "apify.com"],
  "changeType": "baseline",
  "changes": [],
  "addedSans": [],
  "removedSans": [],
  "isBillable": true,
  "checkedAt": "2026-10-20T04:00:00.000Z"
}
```

### Pricing (Pay-Per-Event)

- **Event**: `certificate-checked` (`$0.005` per reachable TLS certificate inspected).
- Unreachable hosts and malformed hostnames are saved to the Dataset for visibility but are **not charged**.

***

### AI Agent (MCP) & Automation Integration (Claude, Cursor, n8n, Clay, Make)

This Actor is **Agentic-Payment & MCP Ready** (`LIMITED_PERMISSIONS`, `256 MB` fast cold-start, synchronous JSON output).

#### 1. Claude Desktop / Cursor / Windsurf MCP Configuration

Add to `claude_desktop_config.json` or `.cursor/mcp.json`:

```json
{
  "mcpServers": {
    "apify-b2b-quant": {
      "command": "npx",
      "args": [
        "-y",
        "@apify/actors-mcp-server",
        "--actors",
        "invaluable_rondeau/ssl-tls-certificate-drift-monitor"
      ],
      "env": {
        "APIFY_TOKEN": "YOUR_APIFY_TOKEN"
      }
    }
  }
}
```

#### 2. Synchronous HTTP Webhook (n8n, Make, Clay, Zapier, cURL)

Call the synchronous dataset endpoint to get clean JSON items in a single HTTP request:

```bash
curl -X POST "https://api.apify.com/v2/acts/invaluable_rondeau~ssl-tls-certificate-drift-monitor/run-sync-get-dataset-items?token=$APIFY_TOKEN&memory=256&clean=true" \
  -H "Content-Type: application/json" \
  -d '{}'
```

#### 3. Search Keywords & Supported Workflows

Compatible with **Model Context Protocol (MCP)**, **Clay.com HTTP API enrichment**, **n8n HTTP Request node**, **Make.com**, **Zapier**, **LangChain**, and **OpenAI Agent SDK**. Built as a high-margin, pay-per-event alternative to rigid monthly SaaS subscriptions (SSL Labs, Censys, Shodan, UptimeRobot SSL certificate expiry monitor, TLS handshake and SAN subdomain drift detector).

# Actor input Schema

## `hosts` (type: `array`):

Up to 500 hostnames or HTTPS URLs to inspect via TLS handshake. CSV/newline text is also supported.

## `expiryWarningDays` (type: `integer`):

Certificates expiring within this many days are flagged with status 'expiring_soon'.

## `port` (type: `integer`):

Target TCP port for TLS handshake (default 443).

## `stateId` (type: `string`):

Identifier used to store certificate fingerprints and SAN lists in Key-Value Store to detect renewals, CA changes, or new subdomains.

## `timeoutMs` (type: `integer`):

Timeout per TLS connection in milliseconds.

## Actor input object example

```json
{
  "hosts": [
    "apify.com",
    "github.com",
    "cloudflare.com"
  ],
  "expiryWarningDays": 30,
  "port": 443,
  "stateId": "default",
  "timeoutMs": 4000
}
```

# 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 = {
    "hosts": [
        "apify.com",
        "github.com",
        "cloudflare.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("invaluable_rondeau/ssl-tls-certificate-drift-monitor").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 = { "hosts": [
        "apify.com",
        "github.com",
        "cloudflare.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("invaluable_rondeau/ssl-tls-certificate-drift-monitor").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 '{
  "hosts": [
    "apify.com",
    "github.com",
    "cloudflare.com"
  ]
}' |
apify call invaluable_rondeau/ssl-tls-certificate-drift-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,invaluable_rondeau/ssl-tls-certificate-drift-monitor"
        }
    }
}
```

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/7quiup37I9VpcVYSZ/builds/xSy3GQxZYodEZHEod/openapi.json
