# Bulk SSL Expiry Checker: Certificate Days Left & Chain (`quanta1810/ssl-certificate-checker`) Actor

Bulk SSL certificate checker: expiry date and days left, issuer, SAN names, hostname match, chain trust, TLS version and key size for every domain, with a plain-English summary per row. Any port. $0.50 per 1,000 domains, no start fee; unreachable hosts are free. API, MCP, n8n.

- **URL**: https://apify.com/quanta1810/ssl-certificate-checker.md
- **Developed by:** [Quan Ta](https://apify.com/quanta1810) (community)
- **Categories:** Developer tools, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$0.50 / 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

## SSL Certificate Expiry Checker

Paste a list of domains and get **one row per site** with the **SSL / TLS certificate expiry date, days left**, issuer, the names the certificate covers (SAN), **hostname match**, **chain trust**, TLS version and key size — plus a **plain-English `summary`** and a single **`topIssue`** code per row, so a person, a spreadsheet filter or an AI agent can act on it straight away.

| What | Details |
|---|---|
| **Expiry** | `validTo`, `validFrom`, `daysLeft` (negative = expired), `expired`, status `expiring-soon` at or below your threshold (default 30 days) |
| **Does it cover the host?** | `hostnameMatch` against CN / SAN, wildcards included (`*.example.com`), `subjectAltNames`, `sanCount` |
| **Is it trusted?** | `chainTrusted` against the standard public root store, `trustError`, `selfSigned`, missing intermediate (incomplete chain), untrusted root, expired intermediate |
| **Certificate** | `issuer` (Let's Encrypt, DigiCert, Sectigo …), `issuerCN`, `subjectCN`, organisation, `serialNumber`, SHA-256 `fingerprintSha256`, lifetime `validityDays` |
| **Connection** | `tlsVersion` (TLSv1.3 / 1.2 / 1.1 / 1.0), `cipher`, key type and size (`keyType`, `keyBits`, `keyCurve`), answering `ip`, handshake time |
| **Any port** | `host:port` per line (`smtp.gmail.com:465`, `example.com:8443`) or a default port for the whole list |

No browser, no proxy, no API key. In our test, **99 popular domains took about 7 seconds in total** (20 in parallel, start-up included, measured on a local test run). **$0.0005 per domain checked ($0.50 per 1,000), no start fee** — hosts that can't be reached and invalid lines are free.

### Who is it for?

- **Web agencies & freelancers** monitoring client websites: one list of every client domain, a weekly schedule, and a sheet sorted by `daysLeft` — never let a client site show a browser security warning again.
- **MSPs & IT teams**: check HTTPS, mail (`:465`, `:993`), VPN and admin ports across all customers in one run.
- **DevOps / SRE**: catch certificates that auto-renewal (certbot, ACME, cloud load balancers) silently failed to renew, wrong certificates on a new server (`HOSTNAME_MISMATCH`), and servers that forget the intermediate certificate (`INCOMPLETE_CHAIN`).
- **SEO & security audits**: an HTTPS check for a whole portfolio of sites before a pitch or a migration.
- **AI agents & automations**: each row has a one-sentence `summary` and a `topIssue` code — no certificate knowledge needed to read the result.

### How to use

1. Put your sites in **Domains or URLs** — one per line. `example.com`, `https://www.example.com/any/page` (only the host is used), `host:port` and public IPv4 addresses all work. A port written in an entry always wins over the **Default port**; `www.` and non-`www`, `http://` and `https://` of the same host and port are checked once.
2. Optional: change **Expiring-soon threshold (days)** (default 30) and the **Default port** (443).
3. Click **Start**, then download the results as **CSV, Excel, JSON**, or read them with the API.

#### Input example

```json
{
  "domains": ["github.com", "wikipedia.org", "expired.badssl.com", "wrong.host.badssl.com", "smtp.gmail.com:465"],
  "expiryThresholdDays": 30
}
```

#### Output example (real rows, 19 November 2026)

```json
{
  "input": "github.com",
  "url": "https://github.com/",
  "status": "ok",
  "charged": true,
  "errorCode": null,
  "error": null,
  "host": "github.com",
  "port": 443,
  "summary": "Valid certificate for github.com, issued by Sectigo Limited, expires 2027-01-27 (69 days left).",
  "topIssue": null,
  "issues": [],
  "daysLeft": 69,
  "validTo": "2027-01-27T23:59:59.000Z",
  "validFrom": "2026-10-30T00:00:00.000Z",
  "expired": false,
  "hostnameMatch": true,
  "chainTrusted": true,
  "trustError": null,
  "selfSigned": false,
  "subjectCN": "github.com",
  "subjectAltNames": ["github.com", "www.github.com"],
  "sanCount": 2,
  "issuer": "Sectigo Limited",
  "issuerCN": "Sectigo Public Server Authentication CA DV E36",
  "serialNumber": "3E1D6026B4B0AEA279DCA2EFBBCED82B",
  "fingerprintSha256": "7D:C4:D8:5C:F1:E3:10:97:12:25:BC:9A:92:57:67:90:43:A2:43:D7:0A:3C:C2:A9:1C:C5:D3:89:89:2C:27:76",
  "keyType": "EC",
  "keyBits": 256,
  "keyCurve": "prime256v1",
  "validityDays": 90,
  "chainLength": 4,
  "tlsVersion": "TLSv1.3",
  "cipher": "TLS_AES_128_GCM_SHA256",
  "legacyTlsOnly": false,
  "ip": "20.205.243.166",
  "handshakeMs": 68
}
```

The same run, in short:

| Input | `status` | `topIssue` | `summary` |
|---|---|---|---|
| `expired.badssl.com` | `expired` | `CERT_EXPIRED` | EXPIRED 4239 day(s) ago (2015-04-12) — browsers show a security warning. |
| `wrong.host.badssl.com` | `mismatch` | `HOSTNAME_MISMATCH` | Certificate does not cover wrong.host.badssl.com (it is for \*.badssl.com, badssl.com). Expires 2026-12-28 (39 days left). |
| `incomplete-chain.badssl.com` | `untrusted` | `INCOMPLETE_CHAIN` | Not trusted by browsers: the server does not send its intermediate certificate (incomplete chain). |
| `tls-v1-0.badssl.com:1010` | `ok` | `OLD_TLS_VERSION` | Valid certificate … Also: old protocol TLSv1. |
| `this-domain-does-not-exist-zz9q.com` | `unreachable` | `DNS_NOT_FOUND` | No certificate checked: Domain name does not resolve (DNS: not found). — **not charged** |

### Status column

| `status` | Meaning | Charged? |
|---|---|---|
| `ok` | Valid, trusted, covers the host, not expiring within your threshold (minor notes such as `OLD_TLS_VERSION` can still be in `issues`) | Yes |
| `expiring-soon` | `daysLeft` is at or below **Expiring-soon threshold (days)** (`EXPIRING_SOON`) | Yes |
| `expired` | The end date has passed (`CERT_EXPIRED`) | Yes |
| `mismatch` | Trusted, but does not cover this host name (`HOSTNAME_MISMATCH`) | Yes |
| `untrusted` | Browsers would not trust it: self-signed, unknown root, incomplete chain, expired intermediate, too-small key or not valid yet | Yes |
| `unreachable` | No certificate could be retrieved: `DNS_NOT_FOUND`, `DNS_ERROR`, `TIMEOUT`, `CONNECTION_REFUSED`, `CONNECTION_RESET`, `HOST_UNREACHABLE`, `NO_TLS` (the port speaks plain HTTP), `TLS_HANDSHAKE_FAILED`, `NO_CERTIFICATE` | No |
| `blocked` | The name resolves to a private / internal address (`PRIVATE_ADDRESS`) — never connected to | No |
| `invalid` | The line is not a public domain, URL or IP address (`INVALID_INPUT`) | No |
| `skipped` | Your **Max cost per run** was reached before this host | No |
| `error` | Unexpected internal error (please open an issue) | No |

#### Issue codes (`issues`, worst first; `topIssue` = the first one)

| Code | Meaning |
|---|---|
| `CERT_EXPIRED` | The certificate end date has passed |
| `CERT_NOT_YET_VALID` | The start date is in the future |
| `SELF_SIGNED` | Self-signed certificate |
| `UNTRUSTED_ROOT` | The chain ends in a root that browsers do not trust |
| `INCOMPLETE_CHAIN` | The server does not send its intermediate certificate. Some browsers repair this themselves, but many apps, APIs, `curl` and older phones fail |
| `CHAIN_CERT_EXPIRED` | The site certificate is fine but an intermediate in the chain has expired |
| `UNTRUSTED_CHAIN` | Any other chain error (see `trustError`) |
| `WEAK_KEY` | RSA key below 2048 bits or EC key below 256 bits (with `EE_KEY_TOO_SMALL` the key is the reason it is untrusted) |
| `HOSTNAME_MISMATCH` | The certificate does not list this host in its names |
| `EXPIRING_SOON` | `daysLeft` at or below your threshold |
| `OLD_TLS_VERSION` | The server only negotiates TLS 1.0 or 1.1 |
| `VALIDITY_TOO_LONG` | A publicly trusted certificate issued after 1 Sep 2020 lasting more than 398 days (browsers reject those) |

The dataset has two ready-made views: **Overview** (host, status, days left, expiry, issuer, top issue, summary) and **Certificate details**.

### Monitor certificates every week (Schedules, n8n, Make, Zapier, Google Sheets)

- **Apify Schedules** — save your list as a **task**, add a **Schedule** (weekly or daily), and connect the email or Slack integration. Sort or filter by `daysLeft` / `status` to see what needs renewing.
- **Google Sheets / Excel** — download the dataset as CSV / Excel, or use the Google Sheets integration to append each run.
- **n8n** — Apify node: *Run an Actor* → *Get dataset items* → IF `status` ≠ `ok` → Slack / email / ticket.
- **Make / Zapier** — Apify app (Make: *Run an Actor* / *Watch Actor Runs*; Zapier: action *Run Actor*, trigger *Finished Actor Run*).
- **API (small lists)** — `POST https://api.apify.com/v2/acts/quanta1810~ssl-certificate-checker/run-sync-get-dataset-items?token=YOUR_TOKEN` with the input JSON returns the rows in one call (synchronous calls time out after 300 s).
- **API (big lists)** — `POST …/acts/quanta1810~ssl-certificate-checker/runs?token=YOUR_TOKEN`, then read `GET …/datasets/{defaultDatasetId}/items`, or attach a webhook for *run succeeded*.
- **…or domains from a dataset** — point **…or domains from a dataset** at the output of another Actor (a crawler, a Google Maps scraper, a sitemap); fields `finalUrl` / `url` / `website` / `domain` / `host` are read.

### Pricing

Pay only for results: **$0.0005 per domain checked ($0.50 per 1,000)**. There is **no start fee**.

- A row is charged only when a certificate was actually retrieved and analysed — good or bad (expired, mismatch, untrusted are exactly the findings you run it for).
- Hosts that are **unreachable** (DNS, timeout, refused, no TLS), **internal addresses**, **invalid lines** and **skipped** rows are listed with the reason and **not charged**.
- `www.` / non-`www.`, `http://` / `https://` and different pages of the same host and port count once.
- Set **Max cost per run** in the run options to cap your spend; hosts that don't fit are listed as `skipped`.

### Limits & notes

- Up to **50,000 hosts per run**. Speed depends on the hosts: 99 popular domains took 7 s; a host that never answers takes up to about twice the timeout (default 10 s, one retry) and is free. At the minimum memory (256 MB) up to 16 hosts are checked in parallel, at 512 MB the default 20.
- At most 3 hosts of the same domain (e.g. many subdomains of one company) are checked at once, to be polite to shared servers.
- **Revocation is not checked** (no OCSP / CRL lookups): a revoked certificate that is otherwise valid shows as `ok`.
- Trust is judged against the standard public root store (the Mozilla list used by Node.js). Certificates from a private / company CA show as `untrusted` — expected for internal PKI.
- Only the certificate is checked — not the web page, HTTP → HTTPS redirects or security headers.
- Checks run from Apify's datacenter. A server that drops connections from datacenter IPs shows as `unreachable` (free).
- IP addresses: IPv4 only — IPv6 literals such as `[2001:db8::1]` are refused (use the host name).
- Only public hosts are checked. `localhost`, `10.x`, `127.x`, `192.168.x`, `169.254.169.254` and names that resolve to such addresses are refused. STARTTLS (SMTP port 25/587, IMAP 143) is not supported — use the implicit-TLS ports (465, 993, 995).

### FAQ

**Is this a bulk SSL checker?** Yes — paste up to 50,000 domains per run; each gets its own row.

**How do I find SSL certificates that expire soon?** Set **Expiring-soon threshold (days)** (e.g. 14 or 30) and filter `status = expiring-soon`, or sort by `daysLeft`.

**Can it monitor certificate expiration automatically?** Yes — save the list as a task and add a weekly Apify Schedule with an email / Slack notification, or pull results into n8n, Make, Zapier or Google Sheets.

**Does it check TLS version and HTTPS configuration?** It reports the negotiated TLS version, cipher, key type and size, and flags TLS 1.0 / 1.1 and weak keys. It is not a full TLS scanner (no cipher-suite enumeration or vulnerability tests).

**Does it work for wildcard certificates and SAN certificates?** Yes — `hostnameMatch` follows the browser rules for `*.example.com`, and all names are in `subjectAltNames`.

**Can I check ports other than 443?** Yes — write `host:port` on the line, or change **Default port** for the whole list. The port must speak TLS directly.

**Why does a site show `INCOMPLETE_CHAIN` when it opens fine in Chrome?** Chrome downloads missing intermediate certificates by itself; many apps, API clients, `curl` and older Android phones do not. Install the full chain on the server.

**Why was a host not charged?** Only rows where a certificate was retrieved are charged — see the `status` and `charged` columns.

**Found a bug or need another check?** Open an issue on the Issues tab — requests from real users decide what gets built next.

### Related tools

Other bulk checkers by the same developer, built to run on the same list of sites:

- **[Bulk Website Audit](https://apify.com/quanta1810/website-health-audit)** — one health score per site: on-page SEO, SSL, security headers, SPF/DMARC email DNS and public contact emails.
- **[Bulk Redirect Checker](https://apify.com/quanta1810/bulk-redirect-checker)** — every hop of the redirect chain, loops, 302 vs 301, redirect-map validation.

### Support & changelog

Issues opened on the **Issues** tab are answered within 5 business days.

- **0.1.0 (November 2026)** — first release.

# Actor input Schema

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

Domains (example.com), URLs (https://example.com/page — only the host is used), host:port (mail.example.com:993) or public IPv4 addresses, one per line. Entries that reach the same host and port (www / non-www, http / https, different pages) are checked once. Private / internal addresses are refused.

## `expiryThresholdDays` (type: `integer`):

A certificate with this many days left or fewer gets status "expiring-soon" and the EXPIRING_SOON issue.

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

TLS port used for entries without a port. 443 = HTTPS. A port written in an entry (host:8443) always wins.

## `datasetId` (type: `string`):

Optional: ID of an Apify dataset (for example the results of another Actor). Fields finalUrl / url / website / domain / host are used.

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

Stop after this many domains — handy for a quick test on a big list.

## `maxConcurrency` (type: `integer`):

How many hosts to check at the same time.

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

Give up on a TLS connection after this many seconds (one retry on timeout). A host that never answers is reported as unreachable and not charged.

## Actor input object example

```json
{
  "domains": [
    "github.com",
    "wikipedia.org",
    "expired.badssl.com",
    "wrong.host.badssl.com"
  ],
  "expiryThresholdDays": 30,
  "port": 443,
  "maxItems": 0,
  "maxConcurrency": 20,
  "requestTimeoutSecs": 10
}
```

# Actor output Schema

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

No description

## `overview` (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",
        "wikipedia.org",
        "expired.badssl.com",
        "wrong.host.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("quanta1810/ssl-certificate-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": [
        "github.com",
        "wikipedia.org",
        "expired.badssl.com",
        "wrong.host.badssl.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("quanta1810/ssl-certificate-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": [
    "github.com",
    "wikipedia.org",
    "expired.badssl.com",
    "wrong.host.badssl.com"
  ]
}' |
apify call quanta1810/ssl-certificate-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,quanta1810/ssl-certificate-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/f2CPcyptraamDEkO5/builds/7ZmtHO7gESfuMbGez/openapi.json
