# Broken Link Checker Pro: Site Crawl, Sitemap, Assets (`ucchiii/broken-link-checker-pro`) Actor

Crawl your site (or its sitemap) and check every internal link, external link and, optionally, image, script and stylesheet once: broken, redirect, blocked, timeout or slow, with the pages that link to it and a summary of the top broken targets. Empty input = free demo.

- **URL**: https://apify.com/ucchiii/broken-link-checker-pro.md
- **Developed by:** [Actor Factory](https://apify.com/ucchiii) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 checked links

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

**Broken link checker that crawls your whole site (or reads its sitemap) and checks every link once: broken, redirect, blocked, timeout or slow, with the pages that link to it.**

Give it your home page or your sitemap, press Start, and get one row per problem link: the HTTP status, what kind of problem it is, where it redirects, how fast it answered, how many of your pages link to it and the first 5 of those pages. Internal links, external links and, if you want, images, scripts and stylesheets are checked. A **SUMMARY** record counts everything and lists the 20 broken targets that hurt the most pages.

**Price: $0.70 per 1,000 links checked.** Each unique link is checked and charged once per run, however many pages link to it. Crawled pages are free.

**Try it free:** leave both lists empty and press **Start**. A built-in 3-page sample site is crawled and its links are checked (one internal 404 on two pages, one external 404, one redirect); not charged, rows carry `_demo: true`.

| linkStatus | linkUrl | statusCode | foundOnPages | sourcePage | finalUrl | note |
|---|---|---|---|---|---|---|
| broken | https://example.com/old-guide | 404 | 37 | https://example.com/blog/ | | |
| redirect | http://partner.example.org/ | 301 | 3 | https://example.com/ | https://partner.example.org/ | |
| blocked | https://social.example.net/our-page | 403 | 120 | https://example.com/ | | The site may be blocking bots (HTTP 403); check the link manually in a browser. |
| timeout | https://slow.example.io/ | | 1 | https://example.com/about | | No answer within the timeout; the server may be slow or down. |
| slow | https://example.com/search | 200 | 54 | https://example.com/ | | Answered in 4,210 ms (slower than 3,000 ms). |

#### Basic or Pro?

The basic [Broken Link Checker](https://apify.com/ucchiii/broken-link-checker) from the same developer checks only the links on the pages you list ($0.65 per 1,000 links). **Pro** adds the site crawl, sitemap input, asset checks, the ok / broken / redirect / blocked / timeout / slow classes, a problems-only output and the SUMMARY with the top broken targets. If you already have the list of pages and want nothing else, the basic one is enough.

### How to use

1. **Start pages**: your home page (or any pages to start from), and/or **Sitemaps**: your `sitemap.xml` or just `example.com`.
2. Optional: **Max pages** (default 100, up to 5,000), **Max depth** (default 3), **Check external links** (on), **Check images, scripts and stylesheets** (off), **Output** (problems only or all links), **Slow above (ms)**.
3. Press **Start**. Fix the rows, starting with the `SUMMARY` record's `topBrokenTargets` (one fix there repairs many pages).

```json
{
  "startUrls": ["https://example.com/"],
  "maxPages": 500,
  "maxDepth": 4,
  "checkExternal": true,
  "checkAssets": true,
  "outputMode": "problems",
  "slowMs": 3000
}
```

### Crawl vs list of pages

- **Crawl on (default):** from each start page, the Actor follows `<a href>` links to the **same site** (same host, `www.` ignored), breadth first, up to **Max depth** clicks and **Max pages** pages. Links to other sites are checked but never crawled. Fragments (`#section`) are dropped and URLs are normalised, so `/about#team` and `/about` are one page.
- **Crawl off, or Max depth 0:** only the start pages and the sitemap pages are read: a list-of-pages check like the basic Actor, with the Pro classes and output.
- Pages that are not HTML (PDF, images, ZIP and other files) are checked as links but not read. robots.txt is respected for every page the Actor reads by crawling or from a sitemap, including `Crawl-delay` up to 10 seconds; the start pages you type yourself are always read.

### Sitemaps

- Enter a sitemap (`https://example.com/sitemap.xml`), a sitemap index, a gzipped sitemap (`.xml.gz`), or just the site (`example.com`): then the sitemaps named in its robots.txt are used, or `/sitemap.xml`.
- Sitemap indexes are followed (up to 50 sitemap files per run). The listed pages count toward **Max pages**.
- With **Crawl the site** on, links from the sitemap pages are followed too, so orphan pages and pages missing from the sitemap are both covered.

### What counts as broken / blocked / slow

Each link gets a `HEAD` request; when the server answers `HEAD` with 400 or more (many servers do this wrongly), it is checked again with `GET` before any verdict. Redirects are followed (up to 10). Pages the Actor crawls are fetched once with `GET` and that answer is reused for every link to them.

| linkStatus | When |
|---|---|
| `ok` | 2xx/3xx final answer, no redirect, not slow |
| `broken` | final status 404, 410, 5xx or another 4xx; DNS failure, connection or SSL error, redirect loop, too many redirects, or an invalid URL in the page |
| `redirect` | works, but only after one or more redirects: see `finalUrl` and `redirectCount` |
| `blocked` | 401, 403, 429 or 999, or a bot challenge page: the site may be blocking bots, check it manually in a browser |
| `timeout` | no answer within **Timeout per request** |
| `slow` | works, but answered slower than **Slow above (ms)** (default 3,000) |
| `not_checked` | points to an internal network address (localhost, private ranges, cloud metadata): never requested, not charged |

`broken` is `true` for `broken` and `timeout` rows. `slow` is also set on redirect rows that were slow.

### Output

- **Dataset**, one row per unique link: `linkUrl`, `linkStatus`, `statusCode`, `finalStatusCode`, `finalUrl`, `redirectCount`, `responseMs`, `broken`, `slow`, `error`, `note`, `linkType` (`internal`, `external`, `asset`), `element` (`a`, `img`, `script`, `stylesheet`), `anchorText`, `sourcePage`, `sourcePages` (first 5), `foundOnPages` (count), `checkedAt`.
- **Output: Problems only** (default) writes `broken`, `blocked`, `timeout`, `slow` and `redirect` rows; **All links** writes the ok ones too. Every checked link is counted (and charged) either way.
- **SUMMARY** record (key-value store): pages crawled, links found and checked, counts per class and per link type, the **top 20 broken targets** by number of linking pages, pages that could not be read (and why), sitemap files read, and `stoppedEarly` (`max_charge` or `time_limit`) with notes.

Download the dataset as CSV, Excel or JSON, or filter it in Apify Console.

### Scheduling

A weekly check is the normal way to use it: in Apify Console, save your input as a task and add an **Apify Schedule** (for example every Monday at 6:00). Each run checks the site fresh; with **Problems only** the dataset of each run is your to-do list, and the SUMMARY counts show whether it is getting shorter. Add a maximum charge per run to keep the weekly cost fixed.

### Pricing

Pay per event: **$0.0007 per unique link checked ($0.70 per 1,000 links)**, whether it works or not. Crawled pages, robots.txt and sitemap requests, links that were not requested (internal addresses, invalid URLs), failed runs and the demo are free.

| Unique links checked in a run | Cost |
|---|---|
| 600 | $0.42 |
| 6,000 | $4.20 |
| 20,000 | $14.00 |

How many unique links a site has depends on the site; a menu link on all 500 pages counts as one link. Run the prefilled example (5 pages) or a small **Max pages** first to see your number.
Store discounts apply automatically: BRONZE −10%, SILVER −20%, GOLD −30%.
On the Apify Free plan, the $5 of monthly platform credit covers about 7,100 checked links a month.
Set a **maximum charge per run** to cap spend: the Actor stops crawling and checking before the limit, writes what is done and sets `stoppedEarly: "max_charge"` in SUMMARY.

### Limits (cannot be raised by input)

- 5,000 pages per run, depth up to 20, 1,000 links recorded per page, 100,000 unique links per run, 5 MB of HTML per page, 50 sitemap files per run.
- Politeness: at most **Parallel requests per host** (default 2) at a time and **Max requests per minute per host** (default 120); 429 answers with `Retry-After` up to 60 s are waited out and retried; robots.txt `Crawl-delay` up to 10 s is honoured.
- Requests go only to public addresses: start pages, sitemap files, crawled pages, checked links and every redirect hop are checked against internal network addresses (localhost, private ranges, cloud metadata) and blocked.
- No browser: links built by JavaScript after loading, and pages behind a login, are not seen. The default run timeout is 2 hours; the crawl uses at most about half of the run time so the checks can finish, and a run that runs out of time writes what it has with `stoppedEarly: "time_limit"`.

### FAQ

**Does it crawl other websites?** No. Only pages on the same host as a start or sitemap page are read. External links are checked with a `HEAD` (or `GET`) request, nothing more.

**Why is a link "blocked" although it opens in my browser?** Some sites answer automated requests with 403, 429 or 999, or with a bot challenge page. These rows are not counted as broken; open them to confirm.

**A link is on 300 of my pages. Am I charged 300 times?** No. It is checked and charged once, and `foundOnPages` is 300.

**Can I check only my own links?** Turn **Check external links** off.

**Can I set my own User-Agent?** Yes, with **User-Agent**. Some sites answer differently to a browser-like User-Agent.

**Which pages could not be read?** See `pagesNotRead` in SUMMARY (HTTP errors, not HTML, disallowed by robots.txt, redirects to another site).

If this Actor saved you time, a rating on the Store helps others find it.

### Use it from the API, Make, n8n or an AI agent (MCP)

Run it and get the problem links back in one HTTP call (replace `<YOUR_TOKEN>` with your Apify API token):

```bash
curl -X POST "https://api.apify.com/v2/acts/ucchiii~broken-link-checker-pro/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"startUrls": ["https://example.com/"], "maxPages": 200, "outputMode": "problems"}'
```

The response holds the rows; the run's `SUMMARY` record has the counts and the top broken targets. For long crawls, start the run asynchronously (`/runs`) and read the dataset when it finishes.

- **Make, n8n, Zapier:** use the Apify app / node, pick this Actor and pass the same JSON input. A weekly schedule plus a "send if not empty" step gives you a broken-link alert.
- **AI agents (Claude, Cursor and other MCP clients):** add `https://mcp.apify.com?tools=ucchiii/broken-link-checker-pro` to your MCP settings.

### More tools from the same developer

- [Broken Link Checker](https://apify.com/ucchiii/broken-link-checker) — find broken links on web pages: status of every link found
- [Redirect Checker](https://apify.com/ucchiii/redirect-checker) — full redirect chain for each URL, hop by hop, with loop detection
- [Bulk URL Status Checker](https://apify.com/ucchiii/url-status-checker) — bulk HTTP status and redirect-chain checker for URL lists
- [Sitemap URL Extractor](https://apify.com/ucchiii/sitemap-urls) — list every URL of a website from its sitemaps
- [SEO Audit Tool](https://apify.com/ucchiii/seo-audit-tool) — on-page SEO audit for URL lists and sitemaps: title, meta description, h1, canonical, noindex, robots.txt, issues and a 0-100 score

# Actor input Schema

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

Pages to start from, one per line (for example your home page). With 'Crawl the site' on, same-site links on them are followed. Leave both lists empty for a free demo (not charged).

## `sitemapUrls` (type: `array`):

Sitemap URLs (sitemap.xml, sitemap index, .xml.gz), or just a site (example.com) to use the sitemaps named in its robots.txt. The listed pages are read (up to Max pages) and crawled further when 'Crawl the site' is on.

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

Follow same-site <a href> links from the pages (www. ignored) up to Max depth. Off = read only the start pages and sitemap pages.

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

Pages read for links in this run, start pages and sitemap pages included. Between 1 and 5,000 (default 100). Pages are free; the links on them are charged.

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

How many clicks away from a start or sitemap page to crawl. 0 = only those pages. Default 3.

## `checkExternal` (type: `boolean`):

Also check links to other sites (they are checked, never crawled). Off = internal links only.

## `checkAssets` (type: `boolean`):

Also check <img src> and srcset, <script src> and <link rel="stylesheet"> URLs (rows with linkType 'asset').

## `outputMode` (type: `string`):

Which rows go to the dataset. Every checked link is counted in the SUMMARY record (and charged) either way.

## `slowMs` (type: `integer`):

A working link that takes longer than this is marked 'slow'. Default 3,000 ms.

## `maxConcurrencyPerHost` (type: `integer`):

At most this many requests to the same host at a time. Default 2.

## `maxRequestsPerMinute` (type: `integer`):

Requests to the same host are spread out to stay under this rate (a robots.txt Crawl-delay of up to 10 s is also honoured). 429 answers with a Retry-After of up to 60 s are waited out and retried.

## `timeoutSecs` (type: `integer`):

How long to wait for each page or link. Between 1 and 60 (default 15). No answer in time = 'timeout'.

## `userAgent` (type: `string`):

User-Agent header for every request. Empty = 'Mozilla/5.0 (compatible; broken-link-checker-pro/0.1; Apify Actor; link checker)'.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.python.org/"
  ],
  "crawl": true,
  "maxPages": 5,
  "maxDepth": 3,
  "checkExternal": true,
  "checkAssets": false,
  "outputMode": "problems",
  "slowMs": 3000,
  "maxConcurrencyPerHost": 2,
  "maxRequestsPerMinute": 120,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `links` (type: `string`):

One row per unique link: status class, HTTP status, final URL, response time, the number of pages that link to it and the first 5 of them. Only problems unless Output is 'All links'.

## `details` (type: `string`):

The same rows with every field (error, note, element, sourcePages, checkedAt).

## `summary` (type: `string`):

Record SUMMARY: pages crawled, links checked, counts per status class and link type, top 20 broken targets by number of linking pages, pages that could not be read, and whether the run stopped early.

# 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://www.python.org/"
    ],
    "maxPages": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("ucchiii/broken-link-checker-pro").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://www.python.org/"],
    "maxPages": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("ucchiii/broken-link-checker-pro").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://www.python.org/"
  ],
  "maxPages": 5
}' |
apify call ucchiii/broken-link-checker-pro --silent --output-dataset

```

## MCP server setup

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

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/sG7hnbJ4d3YldXCPo/builds/ecjJfSR5jhbP8eouL/openapi.json
