# SEO Technical Audit (broken links, redirects, sitemap) (`rawtojson/seo-technical-audit`) Actor

Crawl a website and get a technical SEO report per page: broken links, redirect chains, titles, meta descriptions, canonical, hreflang, structured data, robots.txt, sitemap and llms.txt. Plain HTTP, no browser.

- **URL**: https://apify.com/rawtojson/seo-technical-audit.md
- **Developed by:** [Juan Francisco](https://apify.com/rawtojson) (community)
- **Categories:** SEO tools, Developer tools, Other
- **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 pages audited

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/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 Technical Audit

Crawl a website and get a technical SEO report as clean JSON, one item per page. Plain HTTP and HTML parsing, no browser, no logins, no API keys.

### What it checks

- **HTTP status and redirects**: final URL, full redirect chain, redirect loops, 4xx/5xx pages.
- **Broken links**: internal and external links that return errors or time out, listed per page.
- **On-page tags**: title and meta description (missing/too long/too short), `h1`, `lang`, viewport, `noindex`.
- **Canonical and hreflang**: canonical URL, hreflang set and self-reference.
- **Structured data**: JSON-LD types found, invalid JSON-LD blocks.
- **Images and content**: images without `alt`, word count (thin content).
- **Site level** (stored in the `SITE_SUMMARY` record): robots.txt present, sitemaps found and URLs listed, `llms.txt` present, totals of errors/warnings/notices.

Each page has an `issues` array with `severity` (`error`, `warning`, `notice`), a stable `code` and a message, so you can filter and build reports.

### Input

| Field | Description |
|---|---|
| `startUrls` | Where to start, usually the home page. |
| `maxPages` | Pages to audit (default 20). You pay per page audited. |
| `maxDepth` | Link depth from the start URL (default 3). |
| `useSitemap` | Seed the crawl with URLs from sitemap.xml (default on). |
| `respectRobots` | Skip URLs disallowed by robots.txt (default on). |
| `checkLinks`, `checkExternalLinks`, `maxLinkChecks` | Broken-link checking for links that were not crawled. |

### Example output (one page)

```json
{
  "url": "https://rawtojson.com/",
  "finalUrl": "https://rawtojson.com/",
  "status": 200,
  "redirectChain": [],
  "inSitemap": true,
  "title": "rawtojson: Clean JSON from the messy web.",
  "titleLength": 41,
  "metaDescriptionLength": 158,
  "h1": ["Raw web in. Clean JSON out."],
  "canonical": "https://rawtojson.com/",
  "hreflang": [{ "lang": "en", "href": "https://rawtojson.com/" }, { "lang": "es", "href": "https://rawtojson.com/es/" }],
  "structuredDataTypes": ["Organization", "WebSite"],
  "brokenLinks": [],
  "issues": [],
  "issueCount": 0
}
```

### Pricing

Pay per event: **$0.01 per page audited**. Pages are only charged once they are audited and returned. Set `maxPages` to cap your cost.

### Good to know

- The crawler identifies itself as `rawtojson-seo-audit` and respects `robots.txt` by default. Use it on your own sites or sites you are allowed to audit.
- It reads the HTML the server returns. Content that only appears after JavaScript runs is not seen.
- It does not measure rankings, backlinks or Core Web Vitals.

# Actor input Schema

## `startUrls` (type: `array`):

Pages to start crawling from, usually your home page. Only your own sites or sites you are allowed to audit.

## `maxPages` (type: `integer`):

Maximum number of pages to audit (you are charged per page audited).

## `maxDepth` (type: `integer`):

How many link clicks away from the start URL to follow.

## `useSitemap` (type: `boolean`):

Add URLs listed in the sitemap to the crawl queue.

## `respectRobots` (type: `boolean`):

Skip URLs disallowed by robots.txt.

## `checkLinks` (type: `boolean`):

Check links that were not crawled and report broken ones (4xx, 5xx, timeouts).

## `checkExternalLinks` (type: `boolean`):

Also check links to other domains.

## `maxLinkChecks` (type: `integer`):

Upper bound of extra URLs requested to check for broken links.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com/"
    }
  ],
  "maxPages": 20,
  "maxDepth": 3,
  "useSitemap": true,
  "respectRobots": true,
  "checkLinks": true,
  "checkExternalLinks": true,
  "maxLinkChecks": 100
}
```

# Actor output Schema

## `pages` (type: `string`):

Per-page SEO findings.

## `site` (type: `string`):

robots.txt, sitemap and llms.txt status plus issue totals.

# 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 = {
    "startUrls": [
        {
            "url": "https://example.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rawtojson/seo-technical-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 = { "startUrls": [{ "url": "https://example.com/" }] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rawtojson/seo-technical-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/Pl3PO720VNBarnPgH/builds/sMdkqpA3m2C2DhMit/openapi.json
