# SEO Audit & Broken Link Checker (site crawler) (`despottt/seo-link-checker`) Actor

Crawl a website and find broken links, redirect chains, slow pages and on-page SEO issues: titles, meta descriptions, H1, canonical, noindex, hreflang, image alt. Health score plus an HTML report. Respects robots.txt.

- **URL**: https://apify.com/despottt/seo-link-checker.md
- **Developed by:** [Luca Despot](https://apify.com/despottt) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 page auditeds

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/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 Audit & Broken Link Checker (site crawler)

Crawl a website the way a search engine does and get a **page-by-page SEO audit**, a **list of every broken link** (internal and external), a **0–100 health score** and a **shareable HTML report**. You don't need to install anything or sign up for an SEO suite.

- 🔗 **Broken links:** 4xx/5xx, timeouts and invalid URLs, each with its anchor text and the pages it appears on. HEAD requests fall back to GET, so links aren't wrongly flagged as broken.
- ↪️ **Redirects:** the full redirect chain for each page, and chains longer than one hop are flagged.
- 🏷️ **On-page SEO:** title (missing, too long or short, duplicate), meta description (missing, too long, duplicate), H1 (missing or multiple), canonical (missing or pointing elsewhere), meta robots and X-Robots-Tag noindex, `lang`, hreflang, Open Graph, word count (thin content), images without `alt`.
- ⚡ **Speed:** server response time per page, with pages over 2 s flagged.
- 📊 **Outputs:** one dataset row per page, plus `SUMMARY` (JSON) and `REPORT` (HTML) in the key-value store. The report is ready to send to a client.
- 🤖 **Polite crawler:** follows robots.txt properly, including `*` and `$` wildcards, stays on the same domain, skips binary files and limits concurrency.
- 🔌 **REST API (Standby):** `GET /?startUrls=https://site.com&maxPages=20`.

### Who is it for?

SEO freelancers and agencies running monthly client audits (schedule it), site owners after a migration or redesign, content teams cleaning up old blogs, and developers adding a link check to CI.

### Input

```json
{ "startUrls": ["https://books.toscrape.com/"], "maxPages": 100, "maxDepth": 10, "checkExternalLinks": true,
  "excludePatterns": ["\\?sort="], "onlyIssues": false }
```

### Output: one item per page

```json
{
  "url": "https://quotes.toscrape.com/",
  "statusCode": 200,
  "redirectChain": [],
  "responseTimeMs": 216,
  "title": "Quotes to Scrape",
  "titleLength": 16,
  "metaDescription": null,
  "h1": ["Quotes to Scrape"],
  "h1Count": 1,
  "canonical": null,
  "indexable": true,
  "lang": "en",
  "hreflang": [],
  "wordCount": 412,
  "imagesMissingAlt": 0,
  "internalLinks": 48,
  "externalLinks": 2,
  "brokenLinksCount": 9,
  "brokenLinks": [{"url": "https://quotes.toscrape.com/author/Albert-Einstein", "anchor": "(about)", "status": 500, "type": "internal"}],
  "issues": ["missing_meta_description", "missing_canonical", "broken_links"]
}
```

**Key-value store:** `SUMMARY` holds the health score, status-code counts, issue counts, duplicate titles and descriptions, and broken links grouped by URL with the pages they appear on. `REPORT` is the HTML report (see the screenshot).

### Pricing

Pay per page audited. Link checks are included. Use `onlyIssues` to pay only for pages that have problems, and set *Maximum cost per run* to cap spend.

### FAQ

- **JavaScript-only sites (SPA)?** The crawler reads server HTML. Content that appears only after JavaScript runs isn't analysed, and the same is true for many search-engine first passes.
- **Can I audit someone else's site?** Only crawl sites you own or are authorised to audit, and keep `maxPages` sensible.
- **Feedback:** use the *Issues* tab.

# Actor input Schema

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

Home page (or section) to start from. Only pages on the same domain are crawled.

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

Pages to audit (each page = one result).

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

0 = only the start URLs.

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

Also check links pointing to other websites (HEAD with GET fallback).

## `includePatterns` (type: `array`):

Only crawl URLs matching any of these regexes, e.g. <code>/blog/</code>.

## `excludePatterns` (type: `array`):

Skip URLs matching any of these, e.g. <code>?sort=</code>, <code>/tag/</code>.

## `onlyIssues` (type: `boolean`):

Output (and pay for) only pages that have at least one issue.

## `maxItems` (type: `integer`):

0 = no limit.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "maxPages": 100,
  "maxDepth": 10,
  "checkExternalLinks": true,
  "includePatterns": [],
  "excludePatterns": [],
  "onlyIssues": false,
  "maxItems": 0
}
```

# Actor output Schema

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

All dataset items produced by the run

# 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/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("despottt/seo-link-checker").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/"] }

# Run the Actor and wait for it to finish
run = client.actor("despottt/seo-link-checker").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/"
  ]
}' |
apify call despottt/seo-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,despottt/seo-link-checker"
        }
    }
}
```

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/7eJV1qOLXGs2nbr9a/builds/LJsL6HySbPMd5NsvJ/openapi.json
