# SSL Certificate Checker - Bulk Expiry, Issuer & Trust Monitor (`extas_corp/ssl-certificate-checker`) Actor

Check the SSL/TLS certificate of thousands of domains: expiry date and days left, issuer, alternative names, hostname mismatch, untrusted or self-signed chain, TLS version. One ok column for monitoring and alerts. No login, no browser, no proxy.

- **URL**: https://apify.com/extas_corp/ssl-certificate-checker.md
- **Developed by:** [Extas Corp](https://apify.com/extas_corp) (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

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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 Checker: Bulk Expiry, Issuer & Trust Monitor

Paste a list of domains and get, for each one, **when its SSL/TLS certificate expires**, who issued it, which names it covers and whether a normal client would trust it. Schedule it daily and you have a certificate expiry monitor for all your sites, your clients' sites or your vendors.

No login, no browser, no proxies: one TLS handshake per host, nothing is downloaded from the site.

- **Expiry**: `validTo`, `daysLeft`, `expired`, and `expiresSoon` with your own threshold (default 30 days)
- **Trust**: `trusted` is false when the chain is untrusted, self-signed, expired or the **hostname does not match**, with the exact reason in `trustError`
- The certificate is still read and reported when it is not trusted (that is when you need the details most)
- Issuer, subject, all alternative names (SANs), wildcard flag, serial number, signature hash
- Negotiated TLS version and cipher
- Any TLS port: `example.com:8443`, `smtp.example.com:465`, `imap.example.com:993`
- DNS, connection and timeout errors are reported per host, they never stop the run
- One `ok` column to filter and alert on: trusted, not expired, not expiring soon
- Up to 100 hosts in parallel
- **Free during launch**: no per-host fee at the moment, you only pay Apify platform usage (covered by the Free plan's monthly credit for normal use).

### Input example

```json
{
  "domains": ["apify.com", "https://github.com/login", "smtp.gmail.com:465", "expired.badssl.com"],
  "warnDays": 30
}
```

Full URLs are accepted: only the host and port are used. Duplicates are checked once.

### Example output

A healthy certificate (real run):

```json
{
  "host": "github.com",
  "port": 443,
  "ok": true,
  "trusted": true,
  "error": null,
  "warnings": [],
  "subject": "github.com",
  "issuer": "Sectigo Limited",
  "issuerCommonName": "Sectigo Public Server Authentication CA DV E36",
  "validFrom": "2026-10-30T00:00:00+00:00",
  "validTo": "2027-01-27T23:59:59+00:00",
  "daysLeft": 75,
  "expired": false,
  "expiresSoon": false,
  "selfSigned": false,
  "altNames": ["github.com", "www.github.com"],
  "altNameCount": 2,
  "wildcard": false,
  "serialNumber": "3E1D6026B4B0AEA279DCA2EFBBCED82B",
  "signatureAlgorithm": "sha256",
  "trustError": null,
  "tlsVersion": "TLSv1.3",
  "cipher": "TLS_AES_128_GCM_SHA256"
}
```

A certificate served for the wrong host (shortened):

```json
{
  "host": "wrong.host.badssl.com",
  "ok": false,
  "trusted": false,
  "trustError": "Hostname mismatch, certificate is not valid for 'wrong.host.badssl.com'.",
  "warnings": ["not trusted: Hostname mismatch, certificate is not valid for 'wrong.host.badssl.com'."],
  "subject": "*.badssl.com",
  "daysLeft": 45
}
```

A host that cannot be reached has `error` set (for example a DNS failure or `TimeoutError`) and no certificate fields.

### Use cases

- **Expiry monitoring**: schedule the Actor daily and alert (Make, Zapier, n8n, webhooks, e-mail) when `ok` is false or `daysLeft` drops below your limit
- **Agencies and hosting providers**: one run for every client domain, exported as CSV or Excel
- **After a migration or CDN change**: check that every hostname (www, apex, subdomains) serves a certificate that actually covers it
- **Vendor and third-party checks**: issuer, expiry and TLS version of the services you depend on
- **Mail and other TLS services**: SMTPS 465, IMAPS 993, custom ports

### Integrations

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("extas_corp/ssl-certificate-checker").call(run_input={"domains": ["example.com"], "warnDays": 21})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if not item["ok"]:
        print(item["host"], item.get("daysLeft"), item["warnings"], item["error"])
```

Results can be exported as CSV, Excel or JSON from the dataset, or pushed to Google Sheets, Make, Zapier or n8n.

### Limits

- It checks the certificate the server presents to a standard client (SNI = the host you gave). It is not a full TLS security scan: no cipher suite enumeration, no protocol downgrade tests, no vulnerability checks.
- Trust is evaluated against the public CA bundle of the Actor's image. A private or corporate CA is reported as not trusted.
- Revocation (OCSP / CRL) is not checked.
- Servers that only speak TLS 1.0 / 1.1 are reported as an `error` (handshake refused), not as a certificate.
- STARTTLS ports (SMTP 25/587, IMAP 143) are not supported: only ports that speak TLS from the first byte.
- It sees the certificate from Apify's datacenter. A CDN may serve a different certificate in another region.

### FAQ

**Does it need a proxy or a browser?** No. One direct TLS handshake per host.

**Why is `ok` false although the site opens in my browser?** Most often the certificate expires within `warnDays` (see `expiresSoon`), or the server does not send its intermediate certificate: browsers can repair that, strict clients such as API clients and bots cannot. `trustError` gives the reason.

**Can I check an internal host?** Only hosts reachable from the public internet.

**Do I need to pay to try it?** The Apify Free plan includes monthly platform credit, enough to check thousands of hosts.

# Actor input Schema

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

One host per line: example.com, example.com:8443 (any TLS port, e.g. 465 or 993 for mail), or a full URL (only the host and port are used). Duplicates are checked once.

## `warnDays` (type: `integer`):

A certificate that expires within this many days gets expiresSoon = true and ok = false.

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

How many hosts are checked at the same time (1-100).

## `timeoutSecs` (type: `integer`):

Give up on a host after this many seconds.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "expired.badssl.com",
    "wrong.host.badssl.com"
  ],
  "warnDays": 30,
  "concurrency": 20,
  "timeoutSecs": 15
}
```

# 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": [
        "apify.com",
        "github.com",
        "expired.badssl.com",
        "wrong.host.badssl.com"
    ]
};

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

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

```

## MCP server setup

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