# Website SEO & Broken Link Auditor (`lahcen_ai/website-seo-broken-link-auditor`) Actor

Crawl websites for SEO issues, broken links, duplicate metadata, image alt gaps and product JSON-LD. Export page findings and a shareable HTML audit report.

- **URL**: https://apify.com/lahcen_ai/website-seo-broken-link-auditor.md
- **Developed by:** [Lahcen El-Hadi](https://apify.com/lahcen_ai) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 page audit results

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/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 & Broken Link Auditor

Turn a list of website URLs into a prioritized technical SEO checklist, a broken-link dataset, and a shareable HTML report. Built for marketing agencies, website owners, ecommerce teams, and automation workflows.

### What you get

- Same-origin page discovery with explicit page, depth, and link request limits.
- Page titles, meta descriptions, canonical URLs, H1s, image alt coverage, noindex directives, and duplicate metadata within the sampled pages.
- Broken links (HTTP 404/410), server errors, redirect destinations, and separate network-error results.
- JSON-LD syntax checks, schema types, and Product names, SKUs, offer prices, currencies, and availability when present in HTML.
- One dataset item per attempted HTML page, a `SUMMARY` JSON record, and an escaped, standalone `REPORT` HTML record in the default key-value store.
- A recommendation and severity for each finding, with no opaque or invented SEO score.

### Quick start

```json
{
  "startUrls": [{"url": "https://docs.apify.com/"}],
  "maxPages": 5,
  "maxDepth": 1,
  "maxLinkChecks": 15,
  "checkExternalLinks": false,
  "requestDelayMs": 300
}
```

Start with a small crawl, inspect `SUMMARY` for coverage, and increase limits as needed. The total `maxPages` covers all start URLs together; it is not a per-domain allowance. Only the exact seed origins are eligible for automatic discovery. Add both `www` and non-`www` seed origins if needed.

### Input

| Field | Default | Meaning |
|---|---|---|
| `startUrls` | required | 1–20 public HTTP(S) URLs, using URL objects or strings. |
| `maxPages` | 10 | Maximum page audit records across all seeds; 1–200. Fetch failures consume this limit. |
| `maxDepth` | 2 | Discovery depth; 0 audits only the supplied URLs, up to 5. |
| `maxLinkChecks` | 30 | Global extra requests to check links; 0–500. Already audited pages are reused. Robots requests and redirects are additional. |
| `checkExternalLinks` | false | Also check links to external origins, within the same global request allowance. |
| `requestDelayMs` | 300 | Minimum delay between requests to the same origin; 100–10,000 ms. |

### Outputs and exports

Open **Dataset** for page results and export JSON, CSV, Excel, or HTML using Apify's standard export tools. Nested objects are most useful in JSON. Open **Storage → Key-value store → REPORT** for the shareable report, and `SUMMARY` for issue counts, skipped URLs, request counts, and remaining queued pages.

Each page contains `url`, `requestedUrl`, `statusCode`, `title`, `description`, `canonical`, `h1`, `robots`, `imagesMissingAlt`, `schemaTypes`, `products`, `checkedLinks`, `uncheckedLinkCount`, and `issues`. Fetch failures contain an `error` instead of extracted metadata. Severity is a review priority; a deliberate noindex page can be perfectly correct.

### Automation

Run with Apify API, Make, Zapier, or n8n. Use an `ACTOR.RUN.SUCCEEDED` webhook to trigger your own workflow and read the run's `defaultDatasetId` or `defaultKeyValueStoreId`. Scheduling and integrations are configured by the customer; this Actor does not create schedules or send emails.

### Pricing

Store price: **$5 per 1,000 page audit records** ($0.005 per result), plus **$0.001 per Actor start** at the default 256 MB memory. The start event scales per GB with a minimum of one event. Fetch-error audit records are included because they contain diagnostic results. Skipped robots-disallowed and non-HTML pages do not generate a dataset charge. Check the live Store pricing tab for the active price and platform cost treatment. HTML report and summary do not generate additional result events. The page allowance is reduced automatically when the run's maximum charge budget is lower than the requested crawl size.

### Limits and responsible use

This is an HTTP HTML auditor: it does not render JavaScript, bypass logins or CAPTCHAs, perform vulnerability scanning, check Core Web Vitals, or establish full search-engine indexability. JSON-LD checks validate JSON syntax and extract fields; they do not certify rich-result eligibility. Product offers are observed values, not verified stock or checkout prices. Word count and title length are heuristics, not ranking promises.

Only a sample is crawled. Links beyond the configured allowance remain explicitly unchecked. HTTP 403/429 and network failures are not labeled broken links. Response bodies over 3 MB are rejected. Robots rules for `WebsiteAuditBot` are honored; unavailable robots policies are skipped conservatively, and crawl delays above 10 seconds cause that origin to be skipped. Robots-disallowed URLs, non-HTML responses, and already visited redirect destinations appear in coverage rather than successful page records. Public network targets only; no credentials in URLs or custom authentication headers. Use only on websites you are entitled to audit and follow their terms.

No profit, ranking improvement, complete website coverage, or availability guarantee is made.

### Support

Use the Actor's Issues tab with a public sample URL, your input, and run ID. Do not post passwords, tokens, or customer data.

# Actor input Schema

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

1–20 public HTTP(S) URLs. All seeds share the page limit.

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

Check external destinations within the global link request budget.

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

Total attempted page audit records across all websites.

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

Use 0 to audit only seed pages.

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

Global extra link request allowance. Robots and redirects are additional.

## `requestDelayMs` (type: `integer`):

Minimum delay per origin. Robots crawl delay is also observed.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://docs.apify.com/"
    }
  ],
  "checkExternalLinks": false,
  "maxPages": 10,
  "maxDepth": 2,
  "maxLinkChecks": 30,
  "requestDelayMs": 300
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `report` (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": [
        {
            "url": "https://docs.apify.com/"
        }
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("lahcen_ai/website-seo-broken-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": [
    {
      "url": "https://docs.apify.com/"
    }
  ]
}' |
apify call lahcen_ai/website-seo-broken-link-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lahcen_ai/website-seo-broken-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/8r0PQbvIqq4vWiMHn/builds/3XMkyUpcpjbfvkzZe/openapi.json
