# HTTP Security Headers Analyzer (`perryay/http-security-headers-analyzer`) Actor

Audit web security headers against OWASP standards. Score pages (A-F) for HSTS, CSP, X-Frame-Options, CORS, and 12+ critical security headers with per-header severity analysis, policy compliance (PCI-DSS/SOC 2/ISO 27001/NIST), and actionable remediation guidance.

- **URL**: https://apify.com/perryay/http-security-headers-analyzer.md
- **Developed by:** [Perry AY](https://apify.com/perryay) (community)
- **Categories:** Developer tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.025 / actor start

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## HTTP Security Headers Analyzer

### HTTP Security Headers Analyzer

**HTTP Security Headers Analyzer** audits any website's security headers against **OWASP standards**, industry best practices (Mozilla Observatory), and compliance frameworks (PCI-DSS, SOC 2, ISO 27001, NIST). Get a clear **A–F grade**, per-header severity analysis, and **actionable fix recommendations** — all in a single API call.

---

### What does it do?

Audit any website's security headers against **OWASP standards**, industry best practices (Mozilla Observatory), and compliance frameworks (PCI-DSS, SOC 2, ISO 27001, NIST). Get a clear **A–F grade**, per-header severity analysis, and **actionable fix recommendations** — all in a single API call.

### Features

- **16 Header Checks:** HSTS, CSP, X-Frame-Options, X-Content-Type-Options, CORS, Referrer-Policy, Permissions-Policy, X-XSS-Protection, Cross-Origin-Resource-Policy, Cross-Origin-Embedder-Policy, Cross-Origin-Opener-Policy, Clear-Site-Data, Cache-Control, Pragma, Expires, Server Info Disclosure
- **OWASP Weighted Scoring (0–100):** Critical/high/medium/low severity weights produce a normalized security score
- **A–F Letter Grades:** Clear, actionable grades from A (Excellent) to F (Critical)
- **Deep Header Analysis:** Value validation, misconfiguration detection, weak-configuration warnings, version disclosure checks
- **Policy Compliance:** Automatic mapping to PCI-DSS v4.0, SOC 2 CC6.1, ISO 27001 Annex A, and NIST SP 800-53 controls
- **Multi-Mode Operations:**
  - `analyze` — Quick full header scan with scores
  - `scorecard` — Comprehensive A–F security scorecard
  - `batch` — Bulk analysis for 5+ URLs with aggregated statistics
  - `remediation` — Prioritized, step-by-step fix instructions
- **Concurrent Batch Scanning:** 5 concurrent requests with automatic retry (3 attempts) and exponential backoff
- **Human-Readable Reports:** Plain-text report included in output dataset
- **Remediation Guides:** Copy-paste ready header configurations for Apache, Nginx, Express, and other platforms

### Why Use This?

| Pain Point | How This Actor Helps |
|------------|---------------------|
| **Missing security headers** | Detects 16 critical headers and flags every missing or misconfigured one |
| **No OWASP compliance tracking** | Maps every header to OWASP cheat sheets and industry references |
| **Policy audit burden** | Automatic PCI-DSS, SOC 2, ISO 27001, and NIST compliance mapping |
| **Hard-to-interpret results** | Clear A–F grades and per-header severity (critical/high/medium/low) |
| **Manual CI/CD integration** | JSON output, cURL & Python examples, MCP server support |
| **No fix guidance** | Copy-paste ready remediation for every finding |
| **Slow bulk scanning** | Concurrent batch scanning with retry logic and error isolation |

### Personas

| Persona | How They Use It |
|---------|-----------------|
| **Security Engineer** | Quick security posture assessment for any web property |
| **Compliance Officer** | Verify security header requirements for PCI-DSS, SOC 2, ISO 27001 |
| **DevOps Engineer** | Automate header checks in CI/CD pipelines |
| **Penetration Tester** | Document missing security controls in assessment reports |
| **Web Developer** | Validate header configuration before production deployment |

### Input Parameters

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `url` | string | — | Website URL to analyze (scheme optional, https:// assumed) |
| `action` | select | `analyze` | Analysis mode: `analyze`, `scorecard`, `batch`, `remediation` |
| `batchMode` | boolean | `false` | Enable batch scanning of multiple URLs |
| `batchData` | array | `[]` | Structured URL list for batch mode (max 50) |
| `includeRemediation` | boolean | `true` | Include detailed fix recommendations |

#### Example Input

**Single URL analysis:**
```json
{
  "url": "https://example.com",
  "action": "scorecard",
  "batchMode": false,
  "includeRemediation": true
}
````

**Batch analysis:**

```json
{
  "action": "analyze",
  "batchMode": true,
  "batchData": [
    { "url": "https://example.com" },
    { "url": "https://google.com" },
    { "url": "https://github.com" }
  ],
  "includeRemediation": false
}
```

### Output Format

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | Analyzed URL (final after redirects) |
| `score` | number | Normalized security score (0–100) |
| `grade` | string | Letter grade (A, B, C, D, F) |
| `grade_label` | string | Grade description (Excellent → Critical) |
| `total_headers` | integer | Number of headers checked (16) |
| `present_count` | integer | Headers present in the response |
| `missing_count` | integer | Headers absent from the response |
| `secure_count` | integer | Headers correctly configured |
| `critical_issues` | integer | Number of critical-severity findings |
| `high_issues` | integer | Number of high-severity findings |
| `findings` | array | Per-header analysis results with issues, severity, and remediation |
| `policy_compliance` | object | Compliance % for PCI-DSS, SOC 2, ISO 27001, NIST |
| `analyzed_at` | string | ISO 8601 timestamp of the analysis |

#### Example Output

```json
{
  "url": "https://example.com",
  "score": 72.0,
  "grade": "B",
  "grade_label": "Good",
  "total_headers": 16,
  "present_count": 10,
  "missing_count": 6,
  "secure_count": 5,
  "insecure_present_count": 5,
  "critical_issues": 1,
  "high_issues": 1,
  "findings": [
    {
      "header": "Strict-Transport-Security",
      "name": "HTTP Strict Transport Security",
      "present": true,
      "value": "max-age=31536000",
      "secure": false,
      "severity": "critical",
      "issues": [
        "Missing includeSubDomains directive",
        "Missing preload directive (optional but recommended)"
      ],
      "remediation": "Add the following HTTP response header:\n  Strict-Transport-Security: max-age=31536000; includeSubDomains",
      "score_penalty": 7,
      "expected": "max-age=31536000; includeSubDomains; preload",
      "policy_refs": {
        "PCI-DSS": "PCI-DSS v4.0 Req 6.5.10",
        "ISO 27001": "A.8.8",
        "NIST": "SC-8"
      }
    }
  ],
  "policy_compliance": {
    "PCI-DSS": {
      "applicable_checks": 6,
      "passed": 2,
      "failed": 4,
      "compliance_pct": 33.3
    }
  },
  "analyzed_at": "2026-07-20T12:00:00.000000+00:00"
}
```

### API Usage

#### cURL

```bash
## Quick analysis
curl -X POST "https://api.apify.com/v2/acts/perryay~http-security-headers-analyzer/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "action": "analyze"}'

## Full scorecard
curl -X POST "https://api.apify.com/v2/acts/perryay~http-security-headers-analyzer/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "action": "scorecard"}'

## Batch mode
curl -X POST "https://api.apify.com/v2/acts/perryay~http-security-headers-analyzer/runs?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "analyze",
    "batchMode": true,
    "batchData": [
      {"url": "https://example.com"},
      {"url": "https://google.com"}
    ]
  }'
```

#### Python (Apify Client)

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_API_TOKEN")

## Run the actor
run = client.actor("perryay/http-security-headers-analyzer").call(
    run_input={
        "url": "https://example.com",
        "action": "scorecard",
        "includeRemediation": True,
    }
)

## Fetch results from the dataset
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["grade"], item["score"], item["url"])
    for finding in item.get("findings", []):
        if not finding["secure"]:
            print(f"  ✗ {finding['header']}: {', '.join(finding['issues'])}")
```

#### Python (httpx — Direct API)

```python
import httpx
import asyncio

async def analyze_headers(url: str, api_token: str) -> dict:
    async with httpx.AsyncClient() as client:
        # Start the actor run
        run_resp = await client.post(
            "https://api.apify.com/v2/acts/perryay~http-security-headers-analyzer/runs",
            params={"token": api_token},
            json={"url": url, "action": "scorecard", "includeRemediation": True},
        )
        run = run_resp.json()
        run_id = run["data"]["id"]

        # Poll until finished
        while True:
            status_resp = await client.get(
                f"https://api.apify.com/v2/actor-runs/{run_id}",
                params={"token": api_token},
            )
            status = status_resp.json()["data"]["status"]
            if status == "SUCCEEDED":
                break
            elif status in ("FAILED", "TIMED-OUT", "ABORTED"):
                raise RuntimeError(f"Run {status}")
            await asyncio.sleep(2)

        # Fetch results
        dataset_id = status_resp.json()["data"]["defaultDatasetId"]
        items_resp = await client.get(
            f"https://api.apify.com/v2/datasets/{dataset_id}/items",
            params={"token": api_token, "format": "json"},
        )
        return items_resp.json()

result = asyncio.run(analyze_headers("https://example.com", "YOUR_API_TOKEN"))
print(f"Grade: {result[0]['grade']} — Score: {result[0]['score']}")
```

### Use Cases

1. **Pre-Deployment Security Check** — Scan staging URLs before production release
2. **CI/CD Pipeline Integration** — Fail builds when score drops below threshold
3. **Compliance Auditing** — Map header coverage to PCI-DSS, SOC 2, ISO 27001
4. **Vendor Risk Assessment** — Evaluate third-party service security posture
5. **Bug Bounty Support** — Document known header gaps in penetration tests
6. **SSL/TLS Migration** — Verify HSTS configuration after certificate changes
7. **MCP-Enabled Analysis** — Query via Claude Desktop or any MCP client
8. **Batch Security Sweep** — Scan all subdomains in a single run
9. **Remediation Tracking** — Track fix progress over multiple scan runs
10. **Security Policy Enforcement** — Verify internal header policies against standards

### FAQ

**1. What headers does this actor check?**
16 headers: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy, Access-Control-Allow-Origin, X-XSS-Protection, Cross-Origin-Resource-Policy, Cross-Origin-Embedder-Policy, Cross-Origin-Opener-Policy, Clear-Site-Data, Cache-Control, Pragma, Expires, and Server information disclosure.

**2. What scoring methodology is used?**
OWASP-referenced weighted scoring. Each header has a severity weight (critical=25, high=15, medium=8, low=3). Missing headers incur full penalty; present but misconfigured headers incur partial penalty. The final score is normalized to 0–100 and mapped to A–F grades (A≥90, B≥75, C≥50, D≥25, F<25).

**3. What does each grade mean?**

- **A (90–100):** Excellent — strong security posture, minimal improvements needed
- **B (75–89):** Good — solid protection, some non-critical improvements recommended
- **C (50–74):** Fair — moderate protection, several important headers missing
- **D (25–49):** Poor — weak protection, many security headers absent
- **F (0–24):** Critical — serious protection gaps, urgent action required

**4. Does the actor follow redirects?**
Yes. The actor follows all redirects and reports the final URL's headers. The original and final URLs are both tracked.

**5. What happens if the URL is unreachable?**
The actor returns an error record with details (timeout, DNS failure, connection refused). The analysis continues for other URLs in batch mode. Retry logic with exponential backoff (3 attempts) handles transient failures.

**6. How many URLs can I scan in one run?**
Up to 50 URLs per run in batch mode. For best performance, keep individual batches under 20 URLs.

**7. Can I use this in CI/CD?**
Yes. The actor returns clean JSON that can be processed by any CI tool. Example: fail a GitHub Action when the score drops below 50.

**8. What compliance frameworks are supported?**
PCI-DSS v4.0, SOC 2 (CC6.1), ISO 27001 Annex A, and NIST SP 800-53. Each header maps to relevant controls automatically.

**9. Can I test locally before deploying?**
Yes. Clone the repository, install dependencies (`pip install apify httpx`), and run `python main.py` with local Apify test input.

**10. How many URLs can I scan at once?**
Up to 50 URLs per run in batch mode. For best performance, keep individual batches under 20 URLs.

**11. What happens if a header has a very long value?**
A: The actor truncates header values exceeding 4096 characters for analysis and display purposes. The full raw value can still be accessed through the dataset's raw output. Truncation is flagged in the finding object with a `truncated: true` field.

***

### Usage & Billing

This actor uses Apify's **PAY\_PER\_EVENT** pricing model. You are charged only for successful runs based on the events your usage triggers.

#### Charge Events

| Event | Trigger |
|-------|--------|
| `apify-actor-start` | Every run (base) |
| `scorecard-run` | `action=scorecard` for a single URL |
| `batch-check` | `batchMode=true` with 5+ URLs |
| `remediation` | `action=remediation` with `includeRemediation=true` |

Platform costs (Apify's infrastructure fee) are passed through to the customer.

***

***

### MCP Integration

This actor can be used through the [Apify MCP server](https://docs.apify.com/integrations/mcp). Once connected, your MCP client (Claude Desktop, Cursor, etc.) can discover and run this actor from the Apify Store.

#### Quick Start

1. **Install the Apify connector** in your MCP client:
   - **Claude Desktop**: Search for "Apify" in the connector directory, or use the remote server at `https://mcp.apify.com`
   - **Other clients**: See the [Apify MCP server docs](https://docs.apify.com/integrations/mcp) for setup instructions

2. **Ask your AI assistant** to check security headers. For example:
   > "Check the security headers on https://example.com"
   > "Run a full scorecard on my production domain"
   > "Scan these 10 URLs for missing HSTS headers"
   > "Generate remediation steps for the CSP issues on our site"

#### Claude Desktop Configuration

Add the following to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com"
    }
  }
}
```

On first connection, your browser opens to sign in to Apify and authorize access.

> **Bearer token alternative:** For headless environments, CI/CD pipelines, or clients without browser-based OAuth, you can authenticate directly with your Apify API token:
>
> ```json
> {
>   "mcpServers": {
>     "apify": {
>       "url": "https://mcp.apify.com",
>       "headers": {
>         "Authorization": "Bearer YOUR_APIFY_TOKEN"
>       }
>     }
>   }
> }
> ```
>
> Get your API token from [Apify Console](https://console.apify.com) → **API & Integrations** section.

***

### Related Tools

- **[Cron Expression Builder & Validator](https://apify.com/perryay/cron-expression-builder-validator)** — Automate periodic security header audits with scheduled cron-based scans across your infrastructure.
- **[Subdomain Enumeration via CT](https://apify.com/perryay/subdomain-enumeration-ct-logs)** — Discover new subdomains that may need security header coverage as your attack surface grows.
- **[Website Tech Stack Detector](https://apify.com/perryay/website-tech-stack-detector)** — Correlate detected server technologies with missing or misconfigured security headers for targeted remediation.
- **[Phishing URL Risk Scorer](https://apify.com/perryay/phishing-url-risk-scorer)** — Combine header analysis with multi-factor URL risk scoring for comprehensive phishing investigation.

# Actor input Schema

## `url` (type: `string`):

The full website URL to analyze for security headers. Include the http:// or https:// prefix. If no scheme is provided, https:// is assumed.

## `action` (type: `string`):

Select the type of security analysis to perform. 'Quick Analysis' checks all headers and returns scores. 'Full Scorecard' generates a detailed A-F report. 'Batch Analysis' scans multiple URLs. 'Remediation Guide' provides step-by-step fix instructions.

## `batchMode` (type: `boolean`):

Enable this to analyze multiple URLs in a single actor run. Provide the URLs in the 'Batch URL Data' field. Batch analysis of 5+ URLs incurs a batch-check charge event.

## `batchData` (type: `array`):

An array of objects or strings containing the URLs to scan in batch mode. Each object must have a 'url' field. Example: \[{"url": "https://example.com"}, {"url": "https://google.com"}]. Maximum 50 URLs per run.

## `includeRemediation` (type: `boolean`):

When enabled, each finding includes detailed copy-paste ready HTTP header configurations and step-by-step instructions for fixing detected issues. Recommended for remediation mode.

## Actor input object example

```json
{
  "url": "https://example.com",
  "action": "analyze",
  "batchMode": false,
  "batchData": [
    {
      "url": "https://example.com"
    },
    {
      "url": "https://httpbin.org/headers"
    }
  ],
  "includeRemediation": true
}
```

# Actor output Schema

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

Security header analysis results in the default dataset — one item per analyzed URL

# 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 = {
    "url": "https://example.com",
    "batchData": [
        {
            "url": "https://example.com"
        },
        {
            "url": "https://httpbin.org/headers"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("perryay/http-security-headers-analyzer").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 = {
    "url": "https://example.com",
    "batchData": [
        { "url": "https://example.com" },
        { "url": "https://httpbin.org/headers" },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("perryay/http-security-headers-analyzer").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 '{
  "url": "https://example.com",
  "batchData": [
    {
      "url": "https://example.com"
    },
    {
      "url": "https://httpbin.org/headers"
    }
  ]
}' |
apify call perryay/http-security-headers-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=perryay/http-security-headers-analyzer",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "HTTP Security Headers Analyzer",
        "description": "Audit web security headers against OWASP standards. Score pages (A-F) for HSTS, CSP, X-Frame-Options, CORS, and 12+ critical security headers with per-header severity analysis, policy compliance (PCI-DSS/SOC 2/ISO 27001/NIST), and actionable remediation guidance.",
        "version": "2.0",
        "x-build-id": "XXLnScMOWrAWDyHmo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/perryay~http-security-headers-analyzer/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-perryay-http-security-headers-analyzer",
                "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/perryay~http-security-headers-analyzer/runs": {
            "post": {
                "operationId": "runs-sync-perryay-http-security-headers-analyzer",
                "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/perryay~http-security-headers-analyzer/run-sync": {
            "post": {
                "operationId": "run-sync-perryay-http-security-headers-analyzer",
                "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": {
                    "url": {
                        "title": "Website URL",
                        "type": "string",
                        "description": "The full website URL to analyze for security headers. Include the http:// or https:// prefix. If no scheme is provided, https:// is assumed."
                    },
                    "action": {
                        "title": "Analysis Mode",
                        "enum": [
                            "analyze",
                            "scorecard",
                            "batch",
                            "remediation"
                        ],
                        "type": "string",
                        "description": "Select the type of security analysis to perform. 'Quick Analysis' checks all headers and returns scores. 'Full Scorecard' generates a detailed A-F report. 'Batch Analysis' scans multiple URLs. 'Remediation Guide' provides step-by-step fix instructions.",
                        "default": "analyze"
                    },
                    "batchMode": {
                        "title": "Batch Mode",
                        "type": "boolean",
                        "description": "Enable this to analyze multiple URLs in a single actor run. Provide the URLs in the 'Batch URL Data' field. Batch analysis of 5+ URLs incurs a batch-check charge event.",
                        "default": false
                    },
                    "batchData": {
                        "title": "Batch URL Data",
                        "type": "array",
                        "description": "An array of objects or strings containing the URLs to scan in batch mode. Each object must have a 'url' field. Example: [{\"url\": \"https://example.com\"}, {\"url\": \"https://google.com\"}]. Maximum 50 URLs per run."
                    },
                    "includeRemediation": {
                        "title": "Include Remediation Guides",
                        "type": "boolean",
                        "description": "When enabled, each finding includes detailed copy-paste ready HTTP header configurations and step-by-step instructions for fixing detected issues. Recommended for remediation mode.",
                        "default": true
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
