# HTTP Technical SEO, Broken Link & Redirect Auditor (`deliberate_gratitude_shj/http-seo-link-auditor`) Actor

Fast HTTP-first technical SEO, broken link, #fragment, and redirect chain auditor. Checks canonicals, noindex, JSON-LD, OpenGraph, robots.txt, and llms.txt in 128 MB RAM with MCP-ready JSON.

- **URL**: https://apify.com/deliberate_gratitude_shj/http-seo-link-auditor.md
- **Developed by:** [Apex Automation Labs](https://apify.com/deliberate_gratitude_shj) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.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

## HTTP Technical SEO, Broken Link & Redirect Auditor

Audit any website over pure HTTP for **broken links (`4xx`/`5xx`)**, **broken `#fragment` anchors**, **multi-hop redirect chains & loops**, **canonical mismatches**, **`noindex` / `robots.txt` blocks**, **OpenGraph / Twitter Cards**, **JSON-LD structured data**, and **`llms.txt` AI-readiness**—at **$2.00 per 1,000 pages** (93%–95% cheaper than browser-based SEO crawlers).

Built for **SEO agencies**, **DevOps CI/CD link checks**, **n8n & Make.com monitoring workflows**, and **AI coding/SEO agents (MCP)** that want structured, flat JSON with zero Playwright overhead.

***

### Why Use This Actor Instead of Heavy Browser Crawlers?

- **Pure HTTP-First Speed (128 MB RAM):** Audits pages, traces redirect chains manually (`301`/`302`/`307`/`308`), and verifies links using pooled `HEAD` requests (with automatic `GET` fallback on `405`/`403`)—no headless Chromium lag or paid proxy requirement.
- **Broken `#Fragment` Anchor Verification:** Unlike basic link checkers that stop at HTTP `200`, this auditor checks whether internal `#section-id` links actually match an `id` or `name` target on the destination page.
- **In-Flight Link Deduplication Cache:** Shared footer/header links across dozens of pages are checked only once per run, keeping runtimes fast and compute unit usage ultra-low.
- **Modern AI & Technical SEO Signals:** Checks `<title>`, `<meta name="description">`, `<link rel="canonical">`, `meta robots` + `X-Robots-Tag`, `<h1>`–`<h2>`, missing image `alt`, JSON-LD `@type` validation, OpenGraph/Twitter tags, `robots.txt`, and `/llms.txt`.
- **Actionable `seoScore` & `RUN_SUMMARY`:** Computes a deterministic `0–100` `seoScore` per page plus a site-wide `RUN_SUMMARY` record in the Key-Value Store.

***

### Quick Start Input

Click **Start** immediately using the built-in defaults, or paste this JSON:

```json
{
  "startUrls": [
    "https://example.com",
    "https://docs.apify.com/platform"
  ],
  "maxPages": 20,
  "maxDepth": 1,
  "checkExternalLinks": true,
  "checkFragmentTargets": true,
  "respectRobotsTxt": true,
  "includeLinkDetails": true,
  "maxLinksPerPage": 100,
  "concurrency": 8,
  "timeoutMs": 12000
}
```

#### Key Input Options

- **`startUrls`**: Array of HTTP/HTTPS URLs (or `{"url": "https://..."}` objects).
- **`maxPages`**: Strict Pay-Per-Event cost cap (`1`–`5000`, default `20`).
- **`maxDepth`**: `0` audits only the exact `startUrls`; `1`–`5` crawls same-origin internal links breadth-first.
- **`includeLinkDetails`**: Toggle `brokenLinks`, `redirectingLinks`, and `brokenFragmentLinks` arrays (`false` for ultra-compact MCP/LLM payloads).

***

### Sample Output JSON (Verified Live Run)

Verbatim dataset item from auditing `https://docs.apify.com/platform`:

```json
{
  "url": "https://docs.apify.com/platform",
  "finalUrl": "https://docs.apify.com/",
  "statusCode": 200,
  "redirectHops": 1,
  "redirectChain": [
    {
      "url": "https://docs.apify.com/platform",
      "statusCode": 301
    }
  ],
  "hasRedirectLoop": false,
  "responseTimeMs": 1170,
  "contentType": "text/html; charset=utf-8",
  "contentLengthBytes": 16239,
  "seoScore": 81,
  "title": "Apify Documentation",
  "titleLength": 19,
  "metaDescription": null,
  "metaDescriptionLength": 0,
  "canonicalUrl": "https://docs.apify.com/",
  "canonicalStatus": "match",
  "metaRobots": null,
  "xRobotsTag": null,
  "isIndexable": true,
  "lang": "en",
  "h1Count": 1,
  "h1Texts": [
    "Apify Documentation"
  ],
  "h2Count": 8,
  "wordCount": 615,
  "imagesTotal": 22,
  "imagesMissingAlt": 0,
  "ogTitle": "Apify Documentation",
  "ogDescription": null,
  "ogImage": "https://apify.com/og-image/docs-article",
  "twitterCard": "summary_large_image",
  "jsonLdTypes": [],
  "hasInvalidJsonLd": false,
  "hasRobotsTxt": true,
  "robotsDisallowsPage": false,
  "hasLlmsTxt": true,
  "internalLinksCount": 59,
  "externalLinksCount": 44,
  "brokenLinksCount": 0,
  "redirectingLinksCount": 6,
  "brokenFragmentLinksCount": 0,
  "brokenLinks": [],
  "redirectingLinks": [
    {
      "url": "https://docs.apify.com/cli",
      "finalUrl": "https://docs.apify.com/cli/docs",
      "statusCode": 200,
      "redirectHops": 1,
      "anchorText": "CLI",
      "isExternal": false,
      "error": null
    }
  ],
  "brokenFragmentLinks": [],
  "issuesCount": 3,
  "criticalIssuesCount": 0,
  "issues": [
    {
      "severity": "info",
      "code": "SINGLE_REDIRECT",
      "message": "URL redirects once before reaching its final destination."
    },
    {
      "severity": "warning",
      "code": "MISSING_META_DESCRIPTION",
      "message": "Missing meta description."
    },
    {
      "severity": "info",
      "code": "REDIRECTING_LINKS",
      "message": "Found 6 outgoing link(s) that redirect."
    }
  ],
  "depth": 0,
  "auditedAt": "2026-12-03T18:21:36.766Z"
}
```

***

### Native MCP Integration Guide (`mcp.apify.com`)

Connect this Actor directly to **Claude Desktop**, **Cursor**, or **Windsurf** via Apify's official hosted MCP server. Replace `<YOUR_APIFY_TOKEN>` with your Apify API token.

#### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "apify-seo-auditor": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.apify.com/?actors=deliberate_gratitude_shj/http-seo-link-auditor",
        "--header",
        "Authorization: Bearer <YOUR_APIFY_TOKEN>"
      ]
    }
  }
}
```

#### Cursor (`.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "apify-seo-auditor": {
      "url": "https://mcp.apify.com/?actors=deliberate_gratitude_shj/http-seo-link-auditor",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

#### Windsurf (`~/.codeium/windsurf/mcp_config.json`)

```json
{
  "mcpServers": {
    "apify-seo-auditor": {
      "serverUrl": "https://mcp.apify.com/?actors=deliberate_gratitude_shj/http-seo-link-auditor",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_TOKEN>"
      }
    }
  }
}
```

#### Ready-to-Use AI Agent Prompts

1. **Pre-Deploy Broken Link Check:** *"Run the HTTP Technical SEO & Link Auditor on `https://my-site.com` with `maxPages: 50` and `maxDepth: 2`, and list every page that has broken links, broken `#fragment` anchors, or redirect chains."*
2. **AI-Readiness & Metadata Audit:** *"Audit `https://my-site.com` and `https://my-site.com/pricing` (`maxDepth: 0`) and report whether `llms.txt`, canonical tags, OpenGraph images, and JSON-LD schemas are properly configured."*

***

### n8n & Make.com Quick Guide

#### n8n Setup (HTTP Request Node)

- **Method:** `POST`
- **URL:** `https://api.apify.com/v2/acts/deliberate_gratitude_shj~http-seo-link-auditor/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>`
- **Headers:** `Content-Type: application/json`
- **Body:**

```json
{
  "startUrls": ["https://your-site.com"],
  "maxPages": 25,
  "maxDepth": 1,
  "checkExternalLinks": true,
  "checkFragmentTargets": true
}
```

#### Make.com Setup

1. Add the **Apify → Run an Actor** module (select this Actor and paste the JSON body above) with **Run synchronously** enabled.
2. Connect **Apify → Get Dataset Items** using `defaultDatasetId`, filter for `brokenLinksCount > 0` or `criticalIssuesCount > 0`, and route alerts to Slack, Discord, or Linear.

***

### Transparent Pay-Per-Event Pricing

Simple, predictable **Pay-Per-Event (PPE)** billing — **$0.00 actor start fee** and **$0.002 per audited page** ($2.00 per 1,000 pages). Test free with Apify's monthly $5 free developer credit (up to 2,500 audited pages/month free).

| Pages Audited | Event Rate (`page-audited`) | Estimated Total Cost |
|---:|---:|---:|
| **20 pages** (Default Quick Audit) | $0.002 / page | **$0.04** |
| **100 pages** | $0.002 / page | **$0.20** |
| **1,000 pages** | $0.002 / page | **$2.00** |
| **5,000 pages** | $0.002 / page | **$10.00** |

*Set `maxPages` (default `20`) or Apify's `maxTotalChargeUsd` budget limit to guarantee exact spend control.*

***

### Frequently Asked Questions (FAQ)

**1. Why use an HTTP-first SEO auditor instead of a headless browser crawler?**\
Browser crawlers cost $30–$40 per 1,000 pages because Chromium consumes gigabytes of RAM. Server-rendered, static, and SSR/SSG sites serve all canonical tags, status codes, redirect headers, OpenGraph tags, JSON-LD, and links directly in initial HTML over HTTP—letting this Actor run in 128 MB RAM for $2.00 / 1,000 pages.

**2. How does `#fragment` anchor checking work?**\
When a page links to `/docs#pricing`, the auditor inspects the destination HTML for a matching `id="pricing"` or `<a name="pricing">` target and flags missing anchors in `brokenFragmentLinks`.

**3. What if a target server blocks `HEAD` requests with `405` or `403`?**\
The link verifier automatically falls back to a lightweight `GET` check whenever `HEAD` returns `400`, `403`, `405`, or `501`, preventing false-positive broken link reports.

**4. Does this Actor audit `robots.txt` and `llms.txt`?**\
Yes. It checks each origin once for `/robots.txt` (reporting `hasRobotsTxt` and `robotsDisallowsPage`) and `/llms.txt` (reporting `hasLlmsTxt`), helping teams verify both search crawler rules and LLM discoverability.

**5. Can I keep responses compact for AI agents?**\
Yes. Set `includeLinkDetails: false` to omit per-link arrays while preserving all counts (`brokenLinksCount`, `redirectingLinksCount`, `brokenFragmentLinksCount`), `seoScore`, and `issues`.

# Actor input Schema

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

One or more HTTP/HTTPS URLs to audit (e.g. https://example.com, https://your-site.com/sitemap.xml, or specific landing pages).

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

Maximum number of pages to audit across all start URLs. Acts as a strict Pay-Per-Event cost cap.

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

0 = audit only the exact URLs in Start URLs. 1+ = follow same-origin internal links breadth-first up to this depth.

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

Verify outbound external links on each audited page for 4xx/5xx errors and redirect chains (deduplicated across the run).

## `checkFragmentTargets` (type: `boolean`):

Check whether internal #fragment links (e.g. /docs#pricing) match a real id or name attribute on the target page.

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

Skip following discovered internal links disallowed by robots.txt (explicit Start URLs are still audited and flagged with robotsDisallowsPage).

## `includeLinkDetails` (type: `boolean`):

Include per-page arrays of brokenLinks, redirectingLinks, and brokenFragmentLinks. Disable for ultra-compact LLM/MCP summaries.

## `maxLinksPerPage` (type: `integer`):

Cap on unique outgoing links verified per page to keep large directory pages fast.

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

Maximum concurrent HTTP requests during crawling and link verification.

## `timeoutMs` (type: `integer`):

Per-request HTTP timeout in milliseconds.

## Actor input object example

```json
{
  "startUrls": [
    "https://example.com",
    "https://docs.apify.com/platform"
  ],
  "maxPages": 20,
  "maxDepth": 1,
  "checkExternalLinks": true,
  "checkFragmentTargets": true,
  "respectRobotsTxt": true,
  "includeLinkDetails": true,
  "maxLinksPerPage": 100,
  "concurrency": 8,
  "timeoutMs": 12000
}
```

# Actor output Schema

## `dataset` (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 = {
    "startUrls": [
        "https://example.com",
        "https://docs.apify.com/platform"
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("deliberate_gratitude_shj/http-seo-link-auditor").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://example.com",
        "https://docs.apify.com/platform",
    ],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("deliberate_gratitude_shj/http-seo-link-auditor").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://example.com",
    "https://docs.apify.com/platform"
  ],
  "maxPages": 20
}' |
apify call deliberate_gratitude_shj/http-seo-link-auditor --silent --output-dataset

```

## MCP server setup

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

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/9eTKRwaUoYiEPQg4J/builds/W3Yq6MKmDjZz2Fd1w/openapi.json
