# SSL Certificate Expiry Checker — Days Left, Issuer (`kadro/ssl-certificate-expiry-checker`) Actor

Check the TLS certificate of a list of domains: expiry date, days left, issuer, alt names, TLS version. Flags expired and expiring-soon certificates.

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

## Pricing

$2.00 / 1,000 host 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: never miss a renewal

Check the TLS certificate of any list of public domains in one run and find out which ones are expired, invalid or about to expire. For each host you get the expiry date, days left, issuer, alternative names and TLS version, so you can catch renewals before visitors see a browser warning.

### What you get

| Field | What it tells you |
|---|---|
| `host / port` | The host checked and the port (default 443). |
| `status` | `ok`, `expiring_soon`, `expired` or `invalid`. |
| `days_left` | Days until the certificate expires. |
| `valid_from / valid_until` | Certificate validity dates. |
| `subject_cn / issuer` | Certificate subject and issuing authority. |
| `alt_names` | Subject alternative names covered by the certificate. |
| `tls_version / cipher` | Negotiated TLS version and cipher. |
| `error` | Why a certificate is invalid (wrong hostname, untrusted chain, expired). |

Example row:

```json
{"host": "apify.com", "port": 443, "status": "ok", "days_left": 95, "valid_until": "2027-01-16", "subject_cn": "*.apify.com", "issuer": "Amazon", "tls_version": "TLSv1.3"}
```

### How to use it in 3 steps

1. Paste domains or URLs, one per line (`example.com` or `https://example.com:8443`, up to 2,000).
2. Set the warning threshold in days (default 30): certificates expiring sooner get `expiring_soon`.
3. Run it and sort by `days_left`. Schedule it weekly and connect it to Slack, email or Sheets to get alerts.

### Pricing

**$2 per 1,000 hosts** (1,000 hosts = $2). Hosts that do not resolve, point to internal networks or refuse the connection are skipped and not charged.

### Integrations

- **Apify API**: call the Actor from any language and read the dataset as JSON, CSV or Excel.
- **Make, n8n and Zapier**: use the official Apify modules, run this Actor and map the output rows.
- **Google Sheets**: export the dataset to Sheets from the run page, or schedule runs and append the rows.
- **MCP (Claude, Cursor)**: add the Apify MCP server `https://mcp.apify.com` with `actors=kadro/ssl-certificate-expiry-checker`. Example prompt: "Check these 100 domains and list every certificate that expires in the next 45 days."

### FAQ

**Does it work with internal or private hosts?**
No. Only public hosts are accepted; internal addresses are rejected.

**What does `invalid` mean?**
The certificate fails validation: expired, wrong hostname or untrusted chain. The reason is in `error`.

**Is it a security scan?**
No. It opens one standard TLS connection to the port you give and reads the certificate; it does not scan or probe anything else.

**Can I get alerts?**
Schedule the Actor in Apify and connect the dataset to Make, n8n, Zapier or Slack.

**What is not charged?**
Hosts that cannot be reached or are blocked.

### Limitations

- Only the certificate presented on the given port is checked, not the whole chain details.
- Hosts are checked one after another, so very large lists take time.
- No OCSP or revocation check.
- Max 2,000 hosts per run.

### Other Kadro tools

- [Bulk Domain WHOIS & DNS Lookup](https://apify.com/kadro/domain-whois-dns-lookup): domain expiry and DNS for the same list.
- [Website Tech Stack Detector](https://apify.com/kadro/website-tech-stack-detector): what each site runs on.
- [Bulk Domain Availability Checker](https://apify.com/kadro/bulk-domain-availability-checker): find free domains.
- [Dedup & Merge Datasets](https://apify.com/kadro/dedup-merge-datasets): combine host lists.

Found it useful? Please leave a review ⭐ — it helps a lot. Bugs or feature ideas: open an issue, I answer within 24 h.

# Actor input Schema

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

Domains or URLs to check, one per line (e.g. example.com or https://example.com:8443). Only public hosts.

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

Certificates expiring within this many days get status 'expiring_soon'.

## Actor input object example

```json
{
  "hosts": [
    "example.com",
    "apify.com"
  ],
  "warnDays": 30
}
```

# Actor output Schema

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

One row per result.

# 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": [
        "example.com",
        "apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kadro/ssl-certificate-expiry-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": [
        "example.com",
        "apify.com",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kadro/ssl-certificate-expiry-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/3bX76eiJkGYpyXW7Q/builds/5JNNwF0WKiXTO01p0/openapi.json
