# Domain & HTTPS Security Audit — SSL Expiry & Headers (`paoe/domain-https-security-audit`) Actor

- **URL**: https://apify.com/paoe/domain-https-security-audit.md
- **Developed by:** [Rashad Flet](https://apify.com/paoe) (community)
- **Categories:** Developer tools, SEO tools, Business
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $12.00 / 1,000 domain auditeds

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

Audit a list of domains for transport security: TLS certificate validity and days to expiry, issuer and SAN count, negotiated protocol version, and the six standard security headers (HSTS, CSP, X-Content-Type-Options, X-Frame-Options, Referrer-Policy, Permissions-Policy). Returns a 0-100 score, a letter grade and a named finding with a concrete fix for every gap. Built by PAOE.

Each item is processed individually and charged as its own event, so you pay only for what the run actually delivers. Results are written to the run's dataset as one JSON object per item, ready to download as JSON, CSV or Excel, or to pull through the Apify API.

### What it checks

For each domain: whether the TLS certificate verifies, its issuer, subject and SAN count, how many days remain before it expires, and the negotiated protocol version (with anything below TLS 1.2 treated as a failure). Then the six standard transport-security response headers: HSTS, Content-Security-Policy, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Permissions-Policy.

### Pricing

| Event | What it covers | Price |
| --- | --- | --- |
| `domain-audited` | domain audited (primary) | $0.02 per event |

Volume tiers reduce the price automatically on higher Apify plans: Bronze 15% off, Silver 25% off and Gold or above 40% off the listed free-tier price. The charge is per item processed, not per run.

### Input

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `domains` | array | yes | `["example.com"]` | Domains or full URLs. Each domain audited is one charged event. |
| `maxDomains` | integer | no | `100` | Hard cap on how many domains are audited in one run. |

Example input:

```json
{
  "domains": [
    "example.com"
  ],
  "maxDomains": 100
}
```

### Output

One JSON object per item in the run's dataset. Every result carries the input it came from plus the fields this Actor measures, so the output can be joined back to your own data without guessing which row is which. The final dataset entry is a `summary` object with the run's totals.

### Typical use cases

- Catch certificates approaching expiry before they lapse.
- Audit security headers across a portfolio of domains.
- Produce a per-domain remediation list for a platform team.

### Limitations

No. This is a configuration audit of publicly visible signals: the certificate the server presents and the headers it returns. It does not probe for vulnerabilities, does not send exploit payloads and makes no claim that a domain is secure. A high score means the visible transport configuration is sound, nothing more. Domains that do not serve HTTPS are reported as unreachable rather than scored as failing many things.

#### Is this a penetration test?

Every limitation above is reported per item in a `findings` entry with a `level` of `fail`, `warn`, `info` or `ok`, a machine-readable `code` and a concrete `action`. If something cannot be checked it is reported as such rather than assumed to be fine.

#### Can it run on a schedule?

Yes. Save a task from this Actor with your inputs, then set a schedule on the task. Scheduled runs recur with the same inputs, which is the intended way to use it for ongoing monitoring.

#### Can I use this to watch expiry on a schedule?

That is the main use. Save a task on a schedule, and each run reports `days_to_expiry` per domain plus a summary count of domains expiring within 45 days, so you can alert on it.

### Notes

If a site returns something unexpected, open an issue on the Actor's page with the URL and the input used, and it will be looked at.

### Related Actors

- [Bulk Email Deliverability Check](https://apify.com/paoe/bulk-email-deliverability-check)

### Keywords

ssl check, tls audit, certificate expiry, security headers, HSTS, CSP, domain security audit, SSL expiry monitor.

# Actor input Schema

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

Domains or full URLs. Each domain audited is one charged event.

## `maxDomains` (type: `integer`):

Hard cap on how many domains are audited in one run.

## Actor input object example

```json
{
  "domains": [
    "example.com"
  ],
  "maxDomains": 100
}
```

# Actor output Schema

## `records` (type: `string`):

One JSON audit per domain: score, grade, TLS details and a named finding for every security header gap.

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

Domains audited, mean score, certificate problems and weak-protocol counts.

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

// Run the Actor and wait for it to finish
const run = await client.actor("paoe/domain-https-security-audit").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": ["example.com"] }

# Run the Actor and wait for it to finish
run = client.actor("paoe/domain-https-security-audit").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": [
    "example.com"
  ]
}' |
apify call paoe/domain-https-security-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,paoe/domain-https-security-audit"
        }
    }
}
```

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/mqY3gOKLofucV7zUc/builds/iwlmd3zUG9tjz8ZQe/openapi.json
