# SSL Certificate Checker: Expiry, Issuer, SAN, TLS (`klyve1/ssl-certificate-checker`) Actor

Check the SSL/TLS certificate of any list of domains: issuer, validity dates, days until expiry, SAN names, hostname match, chain, TLS version and cipher. Monitor expiring certificates in bulk.

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

## Pricing

from $1.00 / 1,000 certificate 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 Checker: Expiry, Issuer, SAN, TLS

Check the SSL/TLS certificate of hundreds of domains in one run: validity, days left before expiry, issuer, SAN names, hostname match, trust chain, TLS version, cipher and key type. Every domain gets a clear status: `ok`, `expiring-soon`, `expired`, `hostname-mismatch`, `self-signed`, `untrusted` or `error`.

### What people use it for

- **Expiry monitoring**: schedule a daily or weekly run on all your domains and subdomains and get alerted (Apify integrations: email, Slack, webhooks) before a certificate expires.
- **Agencies and MSPs**: audit the certificates of every client website in one go.
- **Security and compliance audits**: spot weak TLS versions, untrusted chains, self-signed or mismatched certificates.
- **Inventory**: list issuers, SAN names, wildcard certificates and fingerprints across your infrastructure.
- **Mail and custom ports**: check `mail.example.com:993`, `:465`, `:8443` and any TLS port.

### Example output

```json
{
  "domain": "github.com",
  "port": 443,
  "status": "ok",
  "valid": true,
  "daysLeft": 70,
  "validFrom": "2026-10-30T00:00:00.000Z",
  "validTo": "2027-01-27T23:59:59.000Z",
  "subject": "github.com",
  "issuer": "Sectigo Public Server Authentication CA DV E36",
  "issuerOrganization": "Sectigo Limited",
  "sanNames": ["github.com", "www.github.com"],
  "sanCount": 2,
  "wildcard": false,
  "hostnameMatches": true,
  "chainTrusted": true,
  "selfSigned": false,
  "keyType": "EC P-256",
  "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",
  "validityDays": 90,
  "tlsVersion": "TLSv1.3",
  "cipher": "TLS_AES_128_GCM_SHA256",
  "alpn": "h2",
  "ipAddress": "140.82.121.4",
  "handshakeMs": 152,
  "chain": [{ "subject": "github.com", "issuer": "Sectigo Public Server Authentication CA DV E36", "validTo": "2027-01-27T23:59:59.000Z" }],
  "error": null,
  "checkedAt": "2026-11-18T17:58:47.061Z"
}
```

A summary with the number of domains per status is saved in the run's key-value store under `SUMMARY`.

### Input

| Field | What it does |
|---|---|
| Domains | Domains, `host:port` pairs or URLs, one per line. |
| Warn when expiring within (days) | Threshold for the `expiring-soon` status, default 30. |
| Include certificate chain | Add leaf, intermediate and root certificates. |
| Timeout per domain | Default 15 seconds. |
| Parallel checks | Default 10. |

### Pricing

Pay per result: **$0.001 per certificate checked** ($1 per 1,000 domains). Domains that cannot be reached (DNS error, timeout, refused connection) are reported but free.

### Good to know

- The Actor only opens a TLS handshake with each host, like a browser does. It does not download pages.
- Expired and invalid certificates are still read and reported in detail: the check never fails on a bad certificate.
- Hostname validation follows the same rules as Node.js and browsers (wildcards included).

# Actor input Schema

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

Domains, host:port pairs or URLs, one per line, for example example.com, mail.example.com:993 or https://shop.example.com/page.

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

Certificates that expire within this number of days get the status expiring-soon.

## `includeChain` (type: `boolean`):

Add the subject, issuer and dates of every certificate in the chain (leaf, intermediates, root).

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

A connection that takes longer is reported as an error (free).

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

How many domains are checked at the same time.

## Actor input object example

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

# Actor output Schema

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

All rows produced by the run.

# 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("klyve1/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("klyve1/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 klyve1/ssl-certificate-checker --silent --output-dataset

```

## MCP server setup

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