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

Check SSL/TLS certificates for many domains: days until expiry, validity errors, issuer, SAN names, key type, TLS version and fingerprint. Schedule it as an expiry monitor.

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

Pay per event

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

Check the certificates of all your domains, or your clients' domains, in one run, and catch expiring or broken certificates before visitors do.

### What it does

- **Expiry monitor:** schedule it daily and filter on `status` to get only problems.
- **Real verification:** uses the standard trust store, so expired, self-signed, wrong-host and incomplete-chain certificates are reported with the reason.
- **Full details** even for broken certificates: issuer, SANs, key and fingerprint.
- **Any port,** such as mail or custom HTTPS ports.
- **Only new results:** turn on `onlyNew` and schedule the Actor to get only what earlier runs did not deliver. Nothing already delivered is charged again.
- **Bad inputs don't fail the run:** each input's status is listed in `SUMMARY` in the key-value store, and failed inputs produce no charged results.

### Input

```json
{
  "hosts": [
    "apify.com",
    "github.com"
  ]
}
```

All options are described on the Input tab.

### Output

Each result has these fields, plus `fetchedAt`. Fields without a value are `null`.

- `host`: Host name.
- `port`: Port.
- `status`: ok, expiring, expired or invalid.
- `valid`: True if the certificate verifies and has not expired.
- `verifyError`: Why verification failed, if it did.
- `daysRemaining`: Days until expiry; negative if expired.
- `validFrom`: Start of validity (UTC).
- `validTo`: End of validity (UTC).
- `subject`: Certificate common name.
- `subjectOrganization`: Subject organization, for OV and EV certificates.
- `issuer`: Issuing CA name.
- `issuerOrganization`: Issuing CA organization.
- `selfSigned`: True if self-signed.
- `sans`: DNS names the certificate covers.
- `sanCount`: Number of DNS names.
- `keyType`: Public key type.
- `keyBits`: Key size in bits.
- `signatureAlgorithm`: Signature hash algorithm.
- `serialNumber`: Serial number in hex.
- `sha256Fingerprint`: SHA-256 fingerprint.
- `tlsVersion`: Negotiated TLS version.
- `cipher`: Negotiated cipher.

### Pricing

$0.0008 per host checked, plus $0.001 per run. If you set a maximum cost per run, the Actor stops at that limit.

### Limits

- It checks the certificate the server sends for its name (SNI). It doesn't test protocol vulnerabilities or grade cipher suites.
- Revocation (OCSP and CRL) is not checked.
- Only public addresses are checked. Hosts that refuse connections or time out are listed as failed in `SUMMARY` and not charged.

### Issues

Open an issue on the Issues tab with your input and run ID. This Actor isn't affiliated with or endorsed by the services it reads.

# Actor input Schema

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

Domains, host:port pairs or URLs. Port 443 is used if none is given.

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

Status is 'expiring' when fewer days than this remain.

## `onlyNew` (type: `boolean`):

Output only results not delivered in earlier runs. Use with a schedule. The first run outputs everything.

## `monitorName` (type: `string`):

Keeps a separate history for each monitor when Only new results is on.

## Actor input object example

```json
{
  "hosts": [
    "apify.com",
    "github.com"
  ],
  "warnDays": 30,
  "onlyNew": false,
  "monitorName": "default"
}
```

# Actor output Schema

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

Results of this run.

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

Status and counts for each input.

# 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"
    ]
};

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

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

```

## MCP server setup

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