# Bulk SSL Certificate Checker: expiry, issuer, TLS (`netaudit-labs/bulk-ssl-certificate-checker`) Actor

Check SSL/TLS certificates of thousands of hosts in one run: expiry date and days left, issuer, hostname match, trust errors, SAN list, TLS protocol and cipher, chain, with a plain list of issues. Any port (465, 993, 8443).

- **URL**: https://apify.com/netaudit-labs/bulk-ssl-certificate-checker.md
- **Developed by:** [NetAudit Labs](https://apify.com/netaudit-labs) (community)
- **Categories:** Developer tools, Integrations
- **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 certificate checks

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

### What does Bulk SSL Certificate Checker do?

It connects to each host you give it (port 443 by default, or any port such as `mail.example.com:465`) and reads the SSL/TLS certificate the server actually presents. One clean row per host:

- **Expiry**: `validTo`, `daysUntilExpiry`, and an "Expires in N days" issue under your threshold
- **Trust**: is the chain trusted by Node.js root store, and the exact error if not (`CERT_HAS_EXPIRED`, `UNABLE_TO_VERIFY_LEAF_SIGNATURE`, self-signed...)
- **Hostname match** against the certificate subject and SAN list
- **Issuer**, subject CN, SAN list, key size, serial, SHA-256 fingerprint, chain
- **TLS protocol and cipher** negotiated, with a flag on TLS 1.0 / 1.1
- **Unreachable hosts** are returned too, with the connection error

### Why use it?

- Monitor certificate expiry for all your clients' domains or a whole portfolio, on a schedule
- Find expired, mismatched or self-signed certificates in a lead list or an asset inventory
- Turn on **Only return hosts with issues** to get (and pay for) problems only

### How much does it cost?

Pay per event: you are charged once per certificate returned in the dataset. With "Only return hosts with issues" enabled, healthy hosts are skipped and not charged. Use **Max hosts** as a hard spending cap.

### Input example

```json
{ "hosts": ["apify.com", "expired.badssl.com", "smtp.gmail.com:465"], "warnDays": 30, "onlyProblems": false }
```

### Output example

```json
{ "host": "expired.badssl.com", "port": 443, "reachable": true, "valid": false, "trustError": "CERT_HAS_EXPIRED", "hostnameMatch": true, "issuer": "COMODO CA Limited", "daysUntilExpiry": -3800, "tlsProtocol": "TLSv1.2", "issues": ["Not trusted: CERT_HAS_EXPIRED", "Certificate expired"] }
```

### Notes

The check reads the certificate only (a TLS handshake), it does not crawl pages. Results reflect what the server presented at `checkedAt`. Issues and feature requests in the Issues tab are answered quickly.

# Actor input Schema

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

Domains, hostnames or URLs. Add :port for non-443 services (mail.example.com:465). https:// and paths are stripped.

## `hostsText` (type: `string`):

Optional: paste hosts separated by new lines, commas or spaces.

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

Adds an 'Expires in N days' issue when the certificate expires within this many days.

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

Skip healthy certificates: only expired, expiring, untrusted, mismatched or unreachable hosts are returned (and charged).

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

Hosts checked in parallel.

## `maxHosts` (type: `integer`):

Safety cap on the number of hosts processed (and charged).

## Actor input object example

```json
{
  "hosts": [
    "apify.com",
    "expired.badssl.com",
    "wrong.host.badssl.com"
  ],
  "warnDays": 30,
  "onlyProblems": false,
  "concurrency": 20,
  "maxHosts": 10000
}
```

# Actor output Schema

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

No description

## `allFields` (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 = {
    "hosts": [
        "apify.com",
        "expired.badssl.com",
        "wrong.host.badssl.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("netaudit-labs/bulk-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",
        "expired.badssl.com",
        "wrong.host.badssl.com",
    ] }

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

```

## MCP server setup

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