# SEO Website & Security Auditor Pro (`alabaster_queue/seo-website-security-auditor-pro`) Actor

Automated SEO and website security configuration auditing. Identify weaknesses, analyse website health and receive actionable recommendations. Privacy-conscious reporting, transparent scoring and affordable pay-per-page pricing.

- **URL**: https://apify.com/alabaster_queue/seo-website-security-auditor-pro.md
- **Developed by:** [Niyi Fashanu](https://apify.com/alabaster_queue) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 successfully audited pages

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

## SEO Website & Security Auditor Pro

Version 1.0 is a bounded static HTML SEO and passive HTTP security configuration auditor. It uses no AI models, paid APIs, proxy services, JavaScript rendering or intrusive probes.

### Input

```json
{
  "website_url": "https://example.com/",
  "max_pages": 10,
  "max_depth": 2,
  "concurrency": 1
}
```

The URL is required. Maximum pages defaults to 10 (range 1–50), depth to 2 (0–5), and the concurrency ceiling to 1 (1–2). This release uses one worker even when the ceiling is 2, to preserve pacing. Unknown fields, wrong types, booleans in numeric fields, embedded credentials, nonstandard ports and ambiguous URL forms are rejected. There are no customer-controlled headers, proxy options, credentials or script execution options.

Audit only sites you are authorised to access and follow their terms. Supply the final public origin, including its correct scheme and hostname.

### Pricing and spending limits

Pay per event: **USD 0.01 per successfully audited page**, event `page-audited` (primary event). There is no Actor start fee or automatic dataset-item fee. Failed requests, skipped pages, invalid inputs, robots requests and summary records are not charged. A successfully analysed page with failed SEO/security checks is still an audited page and is billable.

Paid runs use the installed Apify SDK's `Actor.charge(event_name='page-audited', count=1, idempotency_key=...)`. Before target requests (including robots.txt) and before each subsequent page, the Actor checks the SDK charging manager's remaining permitted event count. A budget below USD 0.01 produces a zero-page failed audit without target requests. After every charge, the returned charged count and remaining-limit fields determine whether crawling can continue. No extra event is submitted merely to trigger platform termination. A limit reached with pages still queued produces partial coverage, provisional scores and no overall score; if discovery is already exhausted, coverage remains complete.

The run's effective pricing must contain page-audited at USD 0.01 and no other nonzero event fees. A mismatch stops target crawling. Free/non-monetized development retains the previous unbilled behaviour. Local SDK PPE simulation using its default USD 1 price is intentionally rejected; offline tests inject the approved price and mock the platform boundary. Customer inputs cannot disable charging.

Each paid page receives `billing_status` (charged, uncharged or unknown). Paid summaries contain `billing` with event, price_usd and charged_pages/uncharged_pages/unknown_pages. These are confirmed application receipts, not an independent invoice; an unknown outcome requires reconciliation with Apify. No fees are applied to report persistence.

Before charging, the Actor saves a sanitised page result and pending charge intent in `BILLING_STATE` in the run's default key-value store. After the charge, it checkpoints the receipt. Per-run/page idempotency keys protect SDK retries; operations have a 30-second deadline, within Apify's three-minute idempotency window. Application code never retries an ambiguous charge. Further crawling stops on charging or checkpoint failure, with a billing reason in coverage. Uncharged or uncertain results are retained and labelled rather than silently dropped.

The supported restart mode is **report-only recovery in the same run and key-value store**, not continued crawling. The durable ledger prevents replay even after the SDK key expires. Completed outputs are not appended again. Pending charges become unknown; no charge is resubmitted. Missing billing state with existing SDK charge counts fails closed. A new run is a new audit and may legitimately charge again; do not automatically launch a replacement run to reconcile uncertainty. Concurrent containers sharing a run/store and deleted or modified billing ledgers are unsupported.

Before the final dataset write, the full report is saved as `BILLING_REPORT` and SUMMARY. This preserves access to billable results if dataset persistence fails. Charging, key-value storage and dataset writes are separate operations, not one atomic transaction. A timed-out dataset write may have persisted some/all items; it is not replayed by application recovery. SDK-level write retries can still cause duplicate dataset items in an ambiguous failure, so use page IDs when reconciling. SUMMARY and BILLING_REPORT record incomplete persistence; previously written dataset summaries may be stale. If storage itself is unavailable, the run fails safely and the last durable BILLING_STATE remains the recovery authority. Hard termination can leave the charge outcome unknown. Exactly-once billing is not claimed across lost state or ambiguous platform outcomes.

Mechanism reference: [Apify Python SDK pay-per-event charging](https://docs.apify.com/sdk/python/docs/concepts/pay-per-event).

### Safe crawling

The transport lives in my_actor/network.py; Crawlee's fetching transport is not used.

- HTTP port 80 and HTTPS port 443 only. Redirects must keep the same scheme, hostname and port, including robots.txt redirects. HTTP-to-HTTPS and www/apex redirects are intentionally rejected: supply the final canonical origin.
- IPv4/IPv6 addresses must be public. Special-use, mapped-private, transition, metadata, loopback, local, multicast and reserved destinations are rejected. All returned A and AAAA addresses are checked; a mixed public/private set fails closed.
- Connections go directly to the validated numeric address using a socket. No second hostname lookup occurs at connection time. HTTP Host and TLS SNI use the requested hostname; the standard verified TLS context checks certificates and hostnames. The peer address is checked too. Each new request resolves and validates again.
- Requests do not use proxies or environment proxy settings. There are no automatic retries. Every redirect passes scope, URL, robots and address checks before connection.
- robots.txt uses the same transport. 404/410 mean no rules; other unsuccessful statuses, invalid UTF-8, HTML error pages, malformed delays and unsupported request-rate rules fail closed. Protego supplies robots matching. Robots exclusions also apply to redirect destinations.
- At least one second between request starts, increased to the applicable crawl-delay. Very long delays can exhaust the request/runtime budget rather than bypass the rule.
- At most 200 tracked URLs, 50 audited pages, depth 5, four redirects per fetch, a 20-second fetch deadline and a 120-second crawl network budget. DNS queries have a five-second bound within the deadline. Socket timeouts and a shutdown watchdog bound headers/body waits. Parsing/report serialization adds bounded-input processing overhead to the network budget.
- Each body is limited to 2 MiB. HTTP headers use the standard library's bounded line/count parser. Ambiguous framing and truncated responses are rejected. Only identity content encoding is accepted: compressed responses are rejected rather than decompressed. This prevents decompression bombs but may reduce compatibility with sites that ignore Accept-Encoding.
- Only successful HTML/XHTML pages are audited. No sitemap, subresource, form submission or browser requests are made.

### Checks and evidence

SEO checks cover title presence and length guidance; description presence; nonempty H1s; multiple H1 review; heading-level gaps; duplicate titles/descriptions among audited pages; missing versus empty image alt; canonical URL presence/public HTTP syntax; device-width viewport; robots meta and X-Robots-Tag directives; and a same-origin internal link inventory.

Security checks cover HTTPS; HSTS max-age; CSP presence and baseline directive inventory; exact nosniff; recognized restrictive referrer policy; Permissions-Policy presence/basic syntax; and static mixed content in supported src, srcset, poster, data and resource-link attributes. HTML base URLs are considered. Simple comma-separated srcset URL/descriptor candidates are supported; complex data-URL syntax, CSS references and dynamically generated resources are outside the checklist.

Checks use PASS, FAIL, REVIEW and NOT_ASSESSED. Every nonempty CSP is REVIEW: source expressions such as wildcards and data sources need directive and application context. Missing/empty enforced CSP is FAIL. CSP is never awarded PASS credit. Syntactically plausible Permissions-Policy also remains REVIEW. Multiple H1s and potentially decorative images receive review advice rather than automatic ranking penalties.

Evidence uses counts, booleans, threshold values and matching page IDs. Raw titles, descriptions, headings, response headers and response bodies remain transient; the report does not export them. Recommendations are deterministic and do not promise ranking improvements.

### Scores

Each assessed checklist score is 100 × passed weight / (passed weight + failed weight), rounded to two decimals. REVIEW and NOT_ASSESSED checks are excluded from the denominator, reported separately, and never counted as passes. Zero denominator produces null.

| Category | Check | Weight |
| --- | --- | ---: |
| SEO | Title | 20 |
| SEO | Title length | 5 |
| SEO | Description | 15 |
| SEO | Nonempty H1 | 15 |
| SEO | Missing alt attributes | 10 |
| SEO | Canonical syntax | 5 |
| SEO | Viewport | 10 |
| SEO | Duplicate title | 5 |
| SEO | Duplicate description | 5 |
| Security | HTTPS | 25 |
| Security | HSTS | 15 |
| Security | CSP | 20 |
| Security | nosniff | 10 |
| Security | Referrer policy | 10 |
| Security | Permissions-Policy | 5 |
| Security | Mixed content | 15 |

Other informational/review checks have weight zero. Title length outside the 15–65 character guidance range is REVIEW. Missing/invalid canonicals are REVIEW. Duplicate checks only compare audited pages and are NOT_ASSESSED when their source value is empty. Website category scores aggregate earned and assessed weights across pages, not rounded page averages.

Every score includes counts of assessed, review and not-assessed checks. Website scores are provisional if coverage is partial. The overall_score field is null whenever a crawl has failures, skips, omitted discoveries or a limit/abort reason. A page score of 100 describes only assessed checks and must not be displayed as overall security assurance.

### Output and privacy

The default Apify dataset contains a tagged union:

- record_type = page: one audited page, checks/evidence, category scores, findings grouped by priority, depth and internal link IDs.
- record_type = url: a failed/skipped URL with a safe reason.
- record_type = summary: counts, category scores, coverage, completeness, limits and disclaimers.

SUMMARY is also stored in the default key-value store. Graceful abort handling writes ABORTED_REPORT before exiting. Hard platform termination may prevent report persistence; no durability claim is made for hard kills.

Pages retain stable IDs within each run, shared by page records, findings and internal-link relationships. Sanitised URLs retain the origin and a conservative allowlist of common public route labels: about/about-us, services, contact/contact-us, home/index.html, privacy/privacy-policy, terms/terms-of-service, faq/help, pricing/products, blog/news, careers/team, support and accessibility. For example, /about, /services and /contact remain identifiable. At the first unknown segment, the remaining path becomes \[redacted]. Encoded segments, identifiers, names and token-like routes are not exposed. Queries and fragments are always removed; URL credentials are rejected. Raw canonical URLs and response content are not exported. Logs contain only fixed messages and safe error categories, never target URLs. Distinct redacted paths can share a display URL; their page IDs remain distinct. Arbitrary custom paths cannot be proven public from syntax and remain redacted; this is an intentional privacy limitation.

Failed/skipped records provide safe reason categories: INVALID_WEBSITE_URL, PROHIBITED_DESTINATION, DNS_FAILURE, TLS_VERIFICATION_FAILED, CONNECTION_FAILED, ROBOTS_RESTRICTED and CRAWL_LIMIT, with corrective guidance. Other bounded failures use safe generic categories. Invalid input stops before target requests. A summary with zero audited pages has status=failed, reason beginning NO_PAGES_AUDITED and no overall score, regardless of whether Apify marks report generation SUCCEEDED. Customers must inspect summary status and coverage, not just platform execution status.

The discovered_urls field counts bounded unique in-scope URLs admitted to tracking. excluded_discovery_occurrences counts over-limit discoveries, not globally unique excluded URLs. Coverage is audited pages divided by tracked URLs. Complete means exhaustion of the permitted static discovery, not proof that the entire website was audited. Robots exclusions, redirect aliases, unsupported content and limits produce partial coverage.

### Local use and testing

Use the provisioned isolated environment from the workspace parent:

```powershell
.\.venv\Scripts\python.exe -m pytest mvp-v1.0/tests -q
```

Tests use controlled fixtures, mocked DNS, sockets, TLS wrapping and HTTP bytes. Security tests exercise the actual production PinnedHTTP and Transport code. These tests do not perform live network requests.

For an authorised integration run, put input in storage/key_value_stores/default/INPUT.json within this project and use the Apify local runner (apify run) with the environment activated. Local running performs real network requests. Use apify validate-schema for official schema validation.

### Reproducibility and limitations

requirements-lock.txt records every resolved distribution from the verified Python 3.14.10 environment. It includes Apify 4.3.0, Crawlee 1.11.3, BeautifulSoup4 4.15.0 and Pytest 9.2.0, plus DNS/robots dependencies. requirements.txt consumes that lock. Crawlee remains installed for SDK compatibility but does not perform outbound audit requests.

The Dockerfile copies both requirements files before dependency installation. Its Python 3.14 image tag is not digest-pinned, and package wheels are version-pinned without hashes. Official input, dataset, output and key-value-store schema validation passed. On 26 November 2026, private staging build 1.0.1 (9LMLNmTPvz5K0c3cz) succeeded in Apify's Linux container. Single-page and four-page HTTPS audits saved datasets and partial/complete summaries; live loopback input was rejected before target requests. That runtime evidence applies to build 1.0.1, before the commercial-release corrections described here; the revised source requires a final authorised staging build. Invalid-certificate rejection, rebinding, redirect attacks and failure branches have offline/source evidence, not comprehensive live coverage. Successful HTTPS requests do not certify TLS configuration or website security.

This is not a penetration test, vulnerability absence claim, comprehensive accessibility assessment or search-ranking predictor. TLS expiry, comprehensive broken links, sitemaps, browser rendering, AI recommendations and other paid integrations are deferred. Billing changes have offline validation only until an explicitly authorised billing integration run.

Schema references: [input specification](https://docs.apify.com/actors/development/actor-definition/input-schema/specification/v1), [dataset schema](https://docs.apify.com/storage/dataset-schema), [output schema](https://docs.apify.com/actors/development/actor-definition/output-schema), [key-value schema](https://docs.apify.com/storage/key-value-store-schema).

# Actor input Schema

## `website_url` (type: `string`):

Required public HTTP(S) URL. Credentials, nonstandard ports and non-public destinations are rejected.

## `max_pages` (type: `integer`):

Maximum successfully audited pages; runtime and discovery bounds also apply.

## `max_depth` (type: `integer`):

Link depth from the starting page.

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

Requested upper bound. This release uses one worker to preserve conservative pacing.

## Actor input object example

```json
{
  "website_url": "https://example.com/",
  "max_pages": 10,
  "max_depth": 2,
  "concurrency": 1
}
```

# Actor output Schema

## `billingReport` (type: `string`):

No description

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

No description

## `summary` (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 = {
    "website_url": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("alabaster_queue/seo-website-security-auditor-pro").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 = { "website_url": "https://example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("alabaster_queue/seo-website-security-auditor-pro").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 '{
  "website_url": "https://example.com/"
}' |
apify call alabaster_queue/seo-website-security-auditor-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,alabaster_queue/seo-website-security-auditor-pro"
        }
    }
}
```

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/Rq4jOZovRGkdH49WX/builds/LbkQhhc7enFQD8Sod/openapi.json
