# Website Audit: SEO, Security Headers, SSL, AI Crawler Check (`thoob/website-audit`) Actor

Audits web pages for SEO tags, security headers, TLS certificate expiry, redirect chains, robots.txt AI crawler rules and llms.txt. Returns one row per URL with issue codes and a score. Billed per URL that returned an HTTP response.

- **URL**: https://apify.com/thoob/website-audit.md
- **Developed by:** [Pono Data](https://apify.com/thoob) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 url 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

## Website Audit: SEO Audit, Security Headers, SSL, AI Crawler Check

This actor checks a list of websites for basic SEO tags, security headers, TLS certificate status, robots.txt rules for AI crawlers and llms.txt, for site owners, agencies and developers who want a quick audit per URL.

### What you get

- Response: final URL, HTTP status, redirect chain with each hop status, response time, content type
- SEO tags: title, meta description, meta robots, canonical, html lang, first 3 H1 texts, H1 and H2 counts, viewport
- Social and structured data: og:title, og:description, og:image, twitter:card, JSON-LD @type values
- Content: image count, images without alt, internal and external link counts, word count
- Security headers: HSTS, CSP, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, Permissions-Policy (value or null)
- TLS certificate: valid to date, issuer, days to expiry, whether it is trusted
- robots.txt: present, declared sitemaps, which of 13 AI crawlers (GPTBot, ClaudeBot, CCBot and others) are blocked at root
- llms.txt: present or not
- Issues: a list of fixed issue codes and a score from 0 to 100

### Input

```json
{
  "urls": ["https://ponodata.com", "https://apify.com"],
  "maxRecords": 0
}
```

A bare host such as `example.com` gets `https://` added. Duplicate URLs are removed. `maxRecords` 0 means no cap.

### Output

Illustration only, values shortened:

```json
{
  "url": "https://example.com/",
  "finalUrl": "https://www.example.com/",
  "httpStatus": 200,
  "redirectChain": [{ "url": "https://example.com/", "status": 301 }],
  "responseTimeMs": 312,
  "title": "Example Company Home",
  "h1Count": 1,
  "jsonLdTypes": ["Organization"],
  "securityHeaders": { "strict-transport-security": "max-age=31536000", "content-security-policy": null },
  "certIssuer": "Let's Encrypt",
  "certDaysToExpiry": 54,
  "certAuthorized": true,
  "robotsTxtPresent": true,
  "sitemaps": ["https://www.example.com/sitemap.xml"],
  "aiCrawlersBlocked": ["GPTBot", "CCBot"],
  "llmsTxtPresent": false,
  "issues": ["CSP_MISSING", "NO_OG_TAGS"],
  "issueCount": 2,
  "score": 93,
  "error": null,
  "sourceUrl": "https://www.example.com/",
  "retrievedAt": "2025-01-15T10:20:30Z"
}
```

### Pricing

Event `site-audited`: USD 0.005 per audited URL, which is USD 5 per 1,000 URLs. You pay for every URL that returned any HTTP response, including error statuses such as 404 or 500. A URL with no response at all (DNS failure, timeout, connection refused) is pushed free with `httpStatus` null and `error` set.

### Data source

Data comes from the public websites you list: the page itself, its `/robots.txt`, its `/llms.txt` and its TLS certificate. Every row carries `sourceUrl` and `retrievedAt`.

### Limits

- HTML is parsed with regular expressions on the raw response. Content added by JavaScript after load is not seen.
- AI crawler checks only look for `Disallow: /` without `Allow: /` in the matching group. Partial path rules are not counted as blocked.
- Redirects are followed up to 10 hops. Requests to the same origin are spaced 500 ms apart, so large lists on one site take longer.
- The score is a simple sum of fixed weights per issue code, not a ranking signal from any search engine.

### Who uses it

- SEO consultants reviewing `title`, `metaDescription`, `canonical`, `h1Count` and `issues` across client pages.
- Security and operations teams tracking `certDaysToExpiry` and `securityHeaders` for their domains.
- Publishers checking `aiCrawlersBlocked`, `aiCrawlersAllowed` and `llmsTxtPresent` to confirm their AI crawler policy.
- Agencies comparing `score` and `issueCount` before and after site changes.

### FAQ

#### What goes in `urls`?

A list of page URLs. Each URL produces one row.

#### What do `issues` and `score` mean?

`issues` holds the issue codes found for the page, `issueCount` is how many there are, and `score` is a single summary figure per URL.

#### What if a URL cannot be reached?

Unreachable URLs are not billed. Where a row is delivered for one, `error` describes what went wrong. An empty dataset means no URL produced a row.

#### Can it run on a schedule or through the Apify API?

Yes. It can be started from Apify Schedules or called through the Apify API. A weekly schedule can catch certificates nearing expiry through `certDaysToExpiry`.

# Actor input Schema

## `urls` (type: `array`):

Page URLs to audit, one per line, where a bare host gets https:// added.

## `maxRecords` (type: `integer`):

Cap on delivered rows, where 0 means no cap.

## Actor input object example

```json
{
  "urls": [
    "https://ponodata.com",
    "https://apify.com"
  ],
  "maxRecords": 0
}
```

# Actor output Schema

## `audits` (type: `string`):

One row per audited 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 = {
    "urls": [
        "https://ponodata.com",
        "https://apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("thoob/website-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 = { "urls": [
        "https://ponodata.com",
        "https://apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("thoob/website-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 '{
  "urls": [
    "https://ponodata.com",
    "https://apify.com"
  ]
}' |
apify call thoob/website-audit --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thoob/website-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/j458cw7DZ7duep8tE/builds/leeuUgRsMFWoGbd1D/openapi.json
