# SSL Certificate Checker - HTTPS Expiry Monitor (`benthepythondev/ssl-certificate-checker`) Actor

Check SSL/TLS certificates for domains and return issuer, subject, expiry date, days until expiry, SAN names and match status.

- **URL**: https://apify.com/benthepythondev/ssl-certificate-checker.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Business, Automation, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## SSL Certificate Checker - HTTPS Expiry Monitor

Check SSL/TLS certificates for domains and collect the expiry date, issuer, subject, DNS names, match status and days until expiry in a structured dataset. Use it for website monitoring, client audits, uptime workflows, SEO checks and security operations.

### What is the SSL Certificate Checker?

An expired or misconfigured SSL certificate can break a website, damage trust, interrupt checkout flows, hurt SEO signals and create urgent support incidents. This actor checks certificates directly over TLS and returns the important fields in a clean Apify dataset.

Paste domains or HTTPS URLs and the actor connects to each host on port 443 by default. It validates the certificate using Python's trusted CA bundle, reads the certificate metadata and calculates the number of days until expiry. The output can be exported to JSON, CSV or Excel, scheduled in Apify, or sent to a webhook for alerts.

### Common use cases

Use this actor to monitor your own domains, audit client websites, check landing pages before campaigns, verify SSL status during migrations, watch certificates after DNS changes, build a weekly compliance report, or feed certificate expiry data into Slack, email, Make, Zapier or n8n.

Agencies can run it across client portfolios. DevOps teams can use it as a lightweight external check. SEO teams can catch HTTPS problems before crawlers and users notice. Marketplace sellers can verify many storefront domains at once.

### Input

Provide one or more domains or HTTPS URLs.

```json
{
  "domains": [
    "apify.com",
    "https://example.com"
  ],
  "port": 443
}
````

### Output

Each dataset item represents one checked host.

```json
{
  "domain": "apify.com",
  "port": 443,
  "subject": {
    "commonName": "apify.com"
  },
  "issuer": {
    "organizationName": "Google Trust Services"
  },
  "serial_number": "1234567890",
  "version": 3,
  "not_before": "2026-06-01T00:00:00+00:00",
  "not_after": "2026-08-30T23:59:59+00:00",
  "days_until_expiry": 54,
  "is_expired": false,
  "dns_names": ["apify.com", "*.apify.com"],
  "matches_domain": true,
  "error": null
}
```

### Output fields

- `domain` - normalized host checked by the actor.
- `port` - TLS port used.
- `subject` - certificate subject fields.
- `issuer` - certificate issuer fields.
- `serial_number` and `version` - certificate identifiers.
- `not_before` and `not_after` - validity window in ISO format.
- `days_until_expiry` - full days remaining.
- `is_expired` - true when the certificate is already expired.
- `dns_names` - Subject Alternative Name DNS entries.
- `matches_domain` - whether the certificate covers the checked domain.
- `error` - connection or validation error, if any.

### Why use this actor?

Certificate monitoring is simple until it is forgotten. Apify scheduling makes it easy to run this check daily or weekly and alert before a certificate expires. Because the actor connects directly over TLS and does not use a browser, runs are quick and cheap.

### Example workflows

For website operations, schedule the actor daily across your production domains and alert when `days_until_expiry` drops below 30, 14 or 7 days. For agencies, run it across client domains before monthly reporting and identify hosts that need renewal. For migrations, check certificates before and after DNS changes to confirm the correct hostname is covered.

For SEO and conversion teams, HTTPS problems are not just technical noise. A certificate error can stop visitors from reaching a landing page, interrupt checkout, or reduce trust at exactly the wrong moment. This actor gives non-engineering teams a simple dataset they can understand and act on.

### Integration ideas

Send results to Make, Zapier, n8n or a webhook after each scheduled run. Filter for `is_expired = true`, `matches_domain = false`, or `days_until_expiry` below your threshold. Store results in Airtable, Google Sheets or a database to keep a historical record of certificate health across a portfolio.

You can combine this actor with sitemap or domain discovery tools. First collect domains from websites, CRMs, landing page lists or client inventories, then check SSL status for each domain. The actor returns one row per domain, which makes it easy to join with existing business records.

### Notes and limits

The actor checks the certificate as seen from the Apify runtime. It uses standard TLS validation. If a server blocks outbound connections, requires unusual SNI behavior, or serves different certificates by region, results may vary. For private intranet hosts, run from an environment that can reach those hosts.

### Best practices

Monitor important domains before the renewal window becomes urgent. Include both apex domains and key subdomains because they may be served by different certificates or infrastructure. Review `matches_domain` as well as the expiry date; a valid certificate is still a problem if it does not cover the hostname users visit. If a check fails, inspect the `error` field and retry before escalating, since temporary DNS or network issues can happen.

For larger portfolios, keep a simple owner field in your own spreadsheet or database and join it with this output so every expiring certificate has a responsible team attached.

### FAQ

Can it monitor certificate expiry?

Yes. Schedule the actor and alert when `days_until_expiry` drops below your threshold.

Does it validate the certificate chain?

It uses Python's standard SSL context, which validates against trusted certificate authorities.

Can I check non-standard ports?

Yes. Set the `port` input to the TLS port you want to inspect.

Does it crawl websites?

No. It opens a TLS connection only and reads certificate metadata.

### You might also like

- URL Shortener Expander - inspect redirect chains.
- Robots Sitemap Analyzer - audit crawl rules.
- Sitemap URL Extractor - collect URLs from XML sitemaps.

### Keywords

SSL checker, TLS certificate checker, HTTPS expiry monitor, certificate expiry API, SSL monitoring, website security audit, domain certificate checker, SEO HTTPS check, Apify SSL checker.

# Actor input Schema

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

Domains or HTTPS URLs to check.

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

TLS port to check.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "port": 443
}
```

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

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

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/ssl-certificate-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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",
    "example.com"
  ],
  "port": 443
}' |
apify call benthepythondev/ssl-certificate-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/ssl-certificate-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "SSL Certificate Checker - HTTPS Expiry Monitor",
        "description": "Check SSL/TLS certificates for domains and return issuer, subject, expiry date, days until expiry, SAN names and match status.",
        "version": "1.0",
        "x-build-id": "84hfDgs6xaOhWcYRv"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~ssl-certificate-checker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-ssl-certificate-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~ssl-certificate-checker/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-ssl-certificate-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~ssl-certificate-checker/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-ssl-certificate-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "domains": {
                        "title": "Domains or URLs",
                        "type": "array",
                        "description": "Domains or HTTPS URLs to check.",
                        "default": [
                            "apify.com",
                            "example.com"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "port": {
                        "title": "Port",
                        "minimum": 1,
                        "maximum": 65535,
                        "type": "integer",
                        "description": "TLS port to check.",
                        "default": 443
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
