# SSL Certificate Checker: Expiry, Issuer, Chain, HSTS & Grade (`arnaud437/ssl-certificate-checker`) Actor

Check the SSL/TLS certificate of any website: days to expiry, issuer, chain, domains covered, key, TLS version, HTTPS redirect, HSTS and a grade from A to F.

- **URL**: https://apify.com/arnaud437/ssl-certificate-checker.md
- **Developed by:** [Open Data Tools](https://apify.com/arnaud437) (community)
- **Categories:** Developer tools, SEO 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.40 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, Chain, HSTS & Grade

Give a list of **websites**, see each one's **SSL/TLS certificate**: **days to expiry**, **issuer**, **chain**, **domains covered**, key type and size, **TLS version**, whether browsers **trust** it, whether **http:// redirects to https://**, and **HSTS**. Each host gets a **score from 0 to 100**, a **grade from A to F** and its **issues in plain words**. One handshake per host, fast and cheap: **$2.00 per 1,000 hosts**.

### What you get

One row per host:

- **Valid**: trusted, current and issued for this host name, as a browser checks it.
- **Days to expiry**, start and end dates.
- **Issuer** (Let's Encrypt, Google Trust Services, DigiCert, Sectigo…) and the **chain** up to the root.
- **Domains covered** (subject alternative names), subject and organization.
- **Key** type and size, serial number, SHA-256 fingerprint.
- **TLS version** and cipher.
- **HTTPS redirect** and **HSTS** with its max-age (port 443).
- **Score**, **grade** and **issues**, worst first.

### Use cases

- **Never let a certificate expire**: schedule a weekly run on all your sites and sort by `daysToExpiry`.
- **Agencies and hosting companies**: audit every client site at once, and find the ones to fix.
- **Lead generation**: find businesses whose site shows a security warning (expired, wrong name, untrusted) and offer to fix it.
- **Security and compliance**: inventory issuers, weak keys and sites without HSTS across a group.

### How to use

- **Without changing anything**: apify.com, www.lemonde.fr and a known expired certificate.
- **Websites**: one per line, up to 10,000 per run. A domain, a sub-domain or a link; add a port for another one than 443 (`mail.example.com:993`). The host is checked as given: `example.com` and `www.example.com` can have different certificates.

### Input example

```json
{
  "domains": ["apify.com", "https://www.lemonde.fr/", "expired.badssl.com", "mail.example.com:993"]
}
```

### Output example

```json
{
  "recordType": "host",
  "id": "apify.com",
  "host": "apify.com",
  "port": 443,
  "input": "apify.com",
  "valid": true,
  "trusted": true,
  "trustError": null,
  "coversHost": true,
  "issuer": "Amazon",
  "issuerCommonName": "Amazon RSA 2048 M04",
  "subjectCommonName": "*.apify.com",
  "subjectOrganization": null,
  "altNames": ["*.apify.com", "apifier.com", "*.apifier.com", "apify.com"],
  "altNameCount": 4,
  "validFrom": "2026-07-03T00:00:00.000Z",
  "validTo": "2027-01-16T23:59:59.000Z",
  "daysToExpiry": 60,
  "expired": false,
  "keyType": "rsa",
  "keyBits": 2048,
  "serialNumber": "033947021329345FC779537CD9A338FD",
  "fingerprintSha256": "8B:70:D5:07:BC:74:55:22:2A:23:E0:08:36:D1:D8:1B:75:F1:0B:99:99:0F:E5:B8:AE:6E:9A:9C:08:F1:F9:8C",
  "chain": [
    "Amazon RSA 2048 M04",
    "Amazon Root CA 1",
    "Starfield Services Root Certificate Authority - G2"
  ],
  "tlsVersion": "TLSv1.3",
  "cipher": "TLS_AES_128_GCM_SHA256",
  "httpsRedirect": true,
  "hsts": true,
  "hstsMaxAgeDays": 182,
  "score": 100,
  "grade": "A",
  "issues": [],
  "status": "ok",
  "sourceName": "TLS certificate of apify.com",
  "sourceUrl": "https://apify.com/",
  "licence": "Certificates are public by design: every visitor receives them; only a TLS handshake and one HEAD request are sent",
  "sourceUpdatedAt": "2026-07-03T00:00:00.000Z",
  "actorVersion": "0.1.1",
  "retrievedAt": "2026-11-17T21:36:55.948Z"
}
```

### How the grade works

The score starts at 100 and loses points for each issue. An expired certificate, one browsers do not trust, or one issued for another name each cost 70 points: browsers then show a full-page warning, so the grade is F. A certificate expiring within 7 days costs 30, within 30 days 10; an RSA key under 2048 bits 20; `http://` that does not send visitors to `https://` 10; no HSTS header 5. A: 90 and more, B: 75, C: 60, D: 40, F: below.

### Pricing

Pay per event: **$2.00 per 1,000 hosts checked** (`host-checked`, $0.002 each), plus Apify's start fee of $0.00005 per run. Hosts that do not exist or do not answer over TLS, text that is not a host and private addresses give a **free** error row.

| List         | Price |
| ------------ | ----- |
| 100 hosts    | $0.20 |
| 1,000 hosts  | $2.00 |
| 10,000 hosts | $20   |

### Data source

The certificate each server presents during a TLS handshake, the same one every visitor's browser receives, checked against Node.js's list of trusted roots (Mozilla's). On port 443, one HEAD request to `http://host/`, following redirects, shows the HTTPS redirect and the HSTS header; robots.txt is respected for that request.

### Is it legal?

Certificates are public by design: a server hands its certificate to anyone who connects, and every public certificate is also logged in Certificate Transparency. Nothing is sent but a handshake and one HEAD request; no page is read, and private or local addresses are refused.

### FAQ

- **Why does my site show "trusted" but not "valid"?** The chain is fine but the certificate has expired or does not cover the host name you gave.
- **Why "httpsRedirect": null?** The host has no plain HTTP, or its robots.txt asks robots not to read it, or you gave another port than 443: nothing is judged.
- **Why both example.com and www.example.com?** They are two hosts and can have two certificates: check the one your visitors type.

### Related Actors

- [Domain Checker](https://apify.com/arnaud437/domain-checker): Availability, Expiry, Registrar & Age (RDAP)
- [RSS Feed Reader](https://apify.com/arnaud437/rss-feed-reader): RSS & Atom to JSON, New Items Only
- [Structured Data Extractor](https://apify.com/arnaud437/structured-data-extractor): Schema.org, JSON-LD & Open Graph
- [Tech Stack Detector](https://apify.com/arnaud437/tech-stack-detector): CMS, Analytics, Pixels & Hosting
- [Website to Markdown](https://apify.com/arnaud437/website-to-markdown): Fast Crawler for LLM & RAG (No Browser)

Every Actor here also works as a tool for AI agents (Claude, ChatGPT, Cursor…) through [Apify’s MCP server](https://mcp.apify.com).

### Changelog

See [CHANGELOG.md](CHANGELOG.md).

### En français

#### Le certificat SSL d'un site, noté de A à F

Donnez des sites, obtenez pour chacun : jours avant expiration, émetteur, chaîne, domaines couverts, clé, version TLS, confiance des navigateurs, redirection vers https, HSTS, une note de 0 à 100 et les problèmes en clair.

#### Prix

2,00 $ les 1 000 sites. Les lignes d'erreur sont gratuites.

#### Source et légalité

Le certificat que chaque serveur remet à tout visiteur. Rien d'autre n'est envoyé qu'une poignée de main TLS et une requête HEAD ; les adresses privées sont refusées.

# Changelog

This Actor's version history is a separate document: https://apify.com/arnaud437/ssl-certificate-checker/changelog.md

# Actor input Schema

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

One host per line: a domain, a sub-domain or a website link (www.example.com, https://shop.example.com/). Add a port for another one than 443 (mail.example.com:993). Up to 10,000 per run; each host once.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "www.lemonde.fr",
    "expired.badssl.com"
  ]
}
```

# Actor output Schema

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

One row per host: certificate, days to expiry, issuer, chain, TLS version, HTTPS redirect, HSTS, grade and issues.

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

Hosts checked, error rows, and dates of 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",
        "www.lemonde.fr",
        "expired.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("arnaud437/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",
        "www.lemonde.fr",
        "expired.badssl.com",
    ] }

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

```

## MCP server setup

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