# SSL Certificate Checker – Bulk Expiry, Chain & TLS Audit (`gazidev/ssl-certificate-checker`) Actor

Check SSL/TLS certificates for any list of domains: expiry date, days left, issuer, SANs, TLS version, cipher, hostname match and chain validity. Filter to expiring or broken certificates and schedule it as an expiry alert. No page content is read. $0.50 per 1,000.

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

## Pricing

from $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 Checker – Bulk Expiry, Chain & TLS Audit

Check the SSL/TLS certificates of any list of domains: expiry date, days left, issuer, SANs, TLS version, cipher, hostname match and chain validity. Filter to expiring or broken certificates, and schedule it as an expiry check.

It only performs a TLS handshake. No HTTP request is sent and no page content is read.

### What you can do with it

- **Avoid surprise expiries:** schedule a run for all your domains or your clients' and act on `expiring-soon`.
- **Audit a domain list:** find expired, mismatched, self-signed and untrusted certificates in one table.
- **Spot changes:** with `onlyChanged`, see only domains whose certificate, TLS version or problem changed since the last run.
- **Automate:** connect the dataset to n8n, Make or the Apify API. One flat row per domain.

### Problems detected

| `problem` | Meaning |
|---|---|
| `expired` | The certificate's end date has passed |
| `not-yet-valid` | The certificate's start date is in the future |
| `hostname-mismatch` | The certificate does not cover this name |
| `self-signed` | The certificate, or a certificate in its chain, is self-signed and not trusted |
| `untrusted-chain` | Any other chain failure, such as a missing intermediate or an unknown root |
| `legacy-tls` | The server fails a modern handshake (TLS 1.2+ with default security) but answers an old one |
| `expiring-soon` | Valid, with `expiringWithinDays` days left or fewer |
| `null` | No problem found |

Each row has one `problem`, the most serious first. **When verification fails, the Actor connects a second time without verifying**, so you still get the issuer, dates and SANs of the broken certificate. `valid` stays `false`.

### Input example

```json
{
  "domains": ["stripe.com", "example.com:443", "https://expired.badssl.com/"],
  "expiringWithinDays": 30,
  "onlyProblems": false
}
```

| Field | Default | Notes |
|---|---|---|
| `domains` | 3 sample domains | Host name, `host:port`, or URL (reduced to its host). Duplicates are skipped |
| `port` | 443 | For domains that do not name a port |
| `expiringWithinDays` | 30 | Threshold for `expiring-soon` |
| `onlyProblems` | `false` | Output only problems and unreachable domains |
| `onlyChanged` | `false` | Output only domains first seen, or changed, since the last run |
| `timeoutSeconds` | 8 | Per handshake |
| `maxConcurrency` | 20 | Up to 50 |

**The filters hide rows. They do not make checks free:** a domain whose certificate was read is charged, shown or not. `OUTPUT` reports `hiddenByFilters`.

**`onlyChanged`** compares the certificate fingerprint, `problem`, `valid` and `tlsVersion` with the previous run. The state is kept in a key-value store named `ssl-certificate-checker-state` in your account, per `domain:port`. Delete that store to start over. Changed rows carry `changeType` (`first-seen` or `changed`) and `changedFields`.

### Output example

```json
{
  "domain": "expired.badssl.com",
  "port": 443,
  "valid": false,
  "problem": "expired",
  "verifyMessage": "certificate has expired",
  "notBefore": "2015-04-09T00:00:00Z",
  "notAfter": "2015-04-12T23:59:59Z",
  "daysLeft": -4226,
  "issuer": "COMODO CA Limited",
  "subject": "*.badssl.com",
  "sans": ["*.badssl.com", "badssl.com"],
  "hostnameMatch": true,
  "tlsVersion": "TLSv1.2",
  "cipher": "ECDHE-RSA-AES128-GCM-SHA256",
  "signatureAlgorithm": "sha256WithRSAEncryption",
  "keyType": "RSA",
  "keyBits": 2048,
  "chainLength": 3,
  "fingerprintSha256": "…",
  "checkedAt": "2026-11-06T14:00:00Z",
  "error": null
}
```

`chainLength` is the number of certificates the server sent, not the verified path. `issuer` is the issuing organization or, without one, its common name. A run summary is saved as `OUTPUT` in the key-value store.

### Limits

- **No revocation check.** OCSP, CRLs and Certificate Transparency are not consulted, so a revoked certificate can show as valid.
- **Trust comes from Mozilla's root list** (the `certifi` bundle). Certificates from private or company CAs show as `untrusted-chain` or `self-signed`, even when your own devices trust them.
- **One view of the server.** Sites behind several servers or a CDN can serve different certificates, and only one is checked. No client certificates are sent.
- **Other ports can fail.** Port 443 is the normal case, and other ports may be blocked or may not speak TLS directly (STARTTLS is not supported).
- **Private and local addresses are refused** (a free error row), including public names that resolve to them.

### Pricing

Pay per event.

| Event | Price | When |
|---|---|---|
| `domain-checked` | $0.0005 | A certificate was read ($0.50 per 1,000), valid or not |
| `apify-actor-start` | $0.00005 | Once per run |

Free: unreachable domains (DNS failure, refused connection, timeout, failed handshake), invalid input and skipped duplicates. If the run's maximum total charge is reached, it stops cleanly with `stoppedAtMaxCharge: true` in `OUTPUT`.

### Related

- [Bulk DNS Lookup](https://apify.com/gazidev/bulk-dns-lookup) for DNS, MX, SPF, DMARC and DKIM records.
- [Domain Intel](https://apify.com/gazidev/domain-intel) for a wider domain report, with SSL expiry as one field.

# Actor input Schema

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

One per line: a host name, optionally with a port (example.com:8443). Full URLs are accepted and reduced to the host. Duplicates are skipped. Private and local addresses are refused.

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

TLS port used for domains that do not name their own.

## `expiringWithinDays` (type: `integer`):

A valid certificate with this many days left or fewer gets problem = expiring-soon.

## `onlyProblems` (type: `boolean`):

Output only certificates with a problem, plus unreachable domains. Healthy domains are still checked and still charged: this filter hides rows, it does not make checks free.

## `onlyChanged` (type: `boolean`):

Remember each domain between runs and output it only when first seen or when its certificate or problem changed. Unchanged domains are still checked and still charged. Combined with Only output problems, a row must pass both filters.

## `timeoutSeconds` (type: `integer`):

Applies to each TLS handshake.

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

How many domains are checked at the same time.

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "example.com",
    "expired.badssl.com"
  ],
  "port": 443,
  "expiringWithinDays": 30,
  "onlyProblems": false,
  "onlyChanged": false,
  "timeoutSeconds": 8,
  "maxConcurrency": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `details` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `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": [
        "stripe.com",
        "example.com",
        "expired.badssl.com"
    ]
};

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

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

```

## MCP server setup

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