# Website SEO Audit: On-Page Checker & Broken Link Finder (`davidcastro/website-seo-audit`) Actor

Crawl any website and audit every page: titles, meta descriptions, headings, canonicals, indexability, robots, sitemap, structured data, Open Graph, image alt text, speed and broken links, with an issue list and a 0-100 score per page. Export to JSON, CSV or Excel.

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

## Pricing

from $15.00 / 1,000 results

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 SEO Audit: On-Page Checker & Broken Link Finder

Audit a whole website, or a list of pages, and get one row per page with every on-page SEO signal checked and a clear list of what to fix. The crawler starts from the homepage and the XML sitemap, follows internal links, respects robots.txt, and checks every link on each page for errors. Each page gets an issue list and a score from 0 to 100, and site-wide checks flag duplicate titles and meta descriptions.

### What you get

| Field | Example |
|---|---|
| `url`, `statusCode`, `finalUrl`, `redirectChain` | page, 200, address after redirects, each hop |
| `score`, `issues`, `issueCount` | 76, \["meta_description_missing", "canonical_missing", "duplicate_title"], 3 |
| `title`, `titleLength` | All products, Books to Scrape - Sandbox, 40 |
| `metaDescription`, `metaDescriptionLength` | text and length |
| `h1`, `h1Count`, `h2`, `h2Count` | headings |
| `canonicalUrl`, `metaRobots`, `xRobotsTag` | indexing directives |
| `isIndexable`, `indexability` | true, indexable (or noindex, canonical_to_other_page, status_404) |
| `inSitemap` | whether the page is listed in the sitemap |
| `wordCount`, `htmlLang`, `hreflang` | content and language signals |
| `structuredDataTypes` | \["Organization", "WebSite", "Product"] |
| `ogTitle`, `ogDescription`, `ogImage`, `twitterCard` | social previews |
| `imagesCount`, `imagesMissingAlt` | 20, 0 |
| `internalLinksCount`, `externalLinksCount`, `nofollowLinksCount` | 73, 0, 0 |
| `brokenLinks`, `brokenLinksCount`, `redirectedLinksCount` | \[{"url": "...", "status": 404, "anchor": "Pricing", "internal": true}] |
| `responseTimeMs`, `pageSizeBytes`, `mixedContentCount`, `hasViewport` | speed, size, insecure resources, mobile tag |
| `duplicateTitle`, `duplicateMetaDescription` | site-wide duplicates |
| `robotsTxtFound`, `sitemapFound`, `sitemapUrlCount` | site-level checks |

### Issues detected

Missing, short or long titles and meta descriptions; missing or multiple H1; missing canonical; noindex; thin content; images without alt text; missing viewport or html lang; incomplete Open Graph; mixed content; slow responses; redirects and redirect chains; 4xx and 5xx pages; broken internal and external links; pages missing from the sitemap; duplicate titles and meta descriptions.

### Inputs

- **Websites or pages:** a homepage to audit the site, or page links.
- **Limits:** pages per website, pages in total, and link depth.
- **Crawl:** follow internal links, start from the sitemap, only or skip URLs containing given text, respect robots.txt.
- **Link checks:** internal and external links, with a limit per page. Each link is checked once per run.

### Example input

```json
{
    "startUrls": ["https://books.toscrape.com"],
    "maxPagesPerSite": 200,
    "excludeUrlPatterns": ["?page="],
    "checkLinks": true,
    "checkExternalLinks": true
}
```

### Example output

```json
{
    "url": "https://books.toscrape.com/",
    "statusCode": 200,
    "responseTimeMs": 103,
    "isIndexable": true,
    "title": "All products | Books to Scrape - Sandbox",
    "titleLength": 40,
    "metaDescription": null,
    "h1": ["All products"],
    "wordCount": 308,
    "imagesCount": 20,
    "imagesMissingAlt": 0,
    "internalLinksCount": 73,
    "brokenLinksCount": 0,
    "issues": ["meta_description_missing", "canonical_missing", "open_graph_incomplete", "mixed_content", "duplicate_title"],
    "score": 76
}
```

### Use cases

- Technical SEO audits for clients and your own sites, exported to a spreadsheet.
- Find and fix broken links before they cost rankings and visitors.
- Check a site after a redesign or migration: redirects, canonicals, noindex and sitemap coverage.
- Monitor a site every week and compare scores and issue counts.
- Benchmark competitors' on-page SEO.

### Coverage

The audit reads the HTML each page returns. Content that only appears after JavaScript runs in a browser is not seen. Pages disallowed by robots.txt are skipped unless you turn that option off for your own website.

### Pricing

You pay per page audited. Sites that cannot be reached and error rows are never charged. The run stops when it reaches your page limit or your spend limit. Free Apify plans get up to 10 pages per run.

# Actor input Schema

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

A homepage such as example.com to audit the site, or a page link to start there.

## `maxPagesPerSite` (type: `integer`):

How many pages to audit on each website.

## `maxResults` (type: `integer`):

Total pages to audit in this run across all websites. Free Apify plans are limited to 10 per run.

## `crawl` (type: `boolean`):

Discover pages by following links inside the website. Turn off to audit only the URLs you entered.

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

Also take pages from the website's XML sitemap.

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

How many clicks away from the start page to go.

## `includeUrlPatterns` (type: `array`):

Audit only pages whose address contains one of these texts, for example /blog/.

## `excludeUrlPatterns` (type: `array`):

Skip pages whose address contains one of these texts, for example /tag/ or ?page=.

## `respectRobotsTxt` (type: `boolean`):

Skip pages that robots.txt disallows. Turn off only for your own website.

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

Request every link on each page and report broken ones (4xx, 5xx, unreachable) with their anchor text.

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

Also check outgoing links, not only internal ones.

## `maxLinksCheckedPerPage` (type: `integer`):

Limit of links checked on each page. Each link is checked once per run.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com"
  ],
  "maxPagesPerSite": 20,
  "maxResults": 20,
  "crawl": true,
  "useSitemap": true,
  "maxDepth": 5,
  "includeUrlPatterns": [],
  "excludeUrlPatterns": [],
  "respectRobotsTxt": true,
  "checkLinks": true,
  "checkExternalLinks": true,
  "maxLinksCheckedPerPage": 100
}
```

# Actor output Schema

## `overview` (type: `string`):

Score, issues and the main on-page fields.

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

Every field, including broken links and headings.

# 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": [
        "https://books.toscrape.com"
    ],
    "maxPagesPerSite": 20,
    "maxResults": 20,
    "includeUrlPatterns": [],
    "excludeUrlPatterns": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("davidcastro/website-seo-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": ["https://books.toscrape.com"],
    "maxPagesPerSite": 20,
    "maxResults": 20,
    "includeUrlPatterns": [],
    "excludeUrlPatterns": [],
}

# Run the Actor and wait for it to finish
run = client.actor("davidcastro/website-seo-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": [
    "https://books.toscrape.com"
  ],
  "maxPagesPerSite": 20,
  "maxResults": 20,
  "includeUrlPatterns": [],
  "excludeUrlPatterns": []
}' |
apify call davidcastro/website-seo-audit --silent --output-dataset

```

## MCP server setup

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