# Broken Link Checker - Crawl a Website for 404s & Dead Links (`propped_cloak/broken-link-crawler`) Actor

Find every broken link of a website: 404s, 5xx, dead domains and timeouts, internal and external, with the page to fix. Bot protections are not reported as broken. $0.50 per 1,000 URLs.

- **URL**: https://apify.com/propped_cloak/broken-link-crawler.md
- **Developed by:** [Emmanuel Vingadassalon](https://apify.com/propped_cloak) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.40 / 1,000 url checkeds

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 - Crawl a Website for 404s & Dead Links

Give it a website, get **every broken link** on it. The Actor crawls the pages of the site, collects all the links (internal and external) and checks each one: **404s, 410s, 5xx errors, dead domains and timeouts**, with **the page where the link was found** and how many pages link to it.

- **Whole-site crawl.** Breadth first from your start page, same host only. Internal links beyond your page limit are still checked.
- **Internal and external links.** Links to other websites are checked (not crawled). Turn this off to check internal links only.
- **Clear results.** Each URL is `ok`, `broken` (404, 410, 5xx, unknown domain, refused connection), `blocked` (401, 402, 403, 406, 429, 999: usually bot protection, the link may work in a browser) or `timeout`.
- **Where to fix it.** `foundOn` is the first page that links to the URL, `foundOnCount` the number of crawled pages that link to it.
- **Polite.** Respects robots.txt and its Crawl-delay, at most 2 requests per second per website, no proxy needed. A website that starts blocking the crawler (10 bot-protection answers in a row) is left alone: one free `not checked` row tells how many of its URLs were not requested.
- **Cheap and capped.** **$0.50 per 1,000 URLs checked**, and a hard limit of URLs per website so a big site never costs more than you decided.

### What can I use it for?

- **SEO maintenance:** broken links waste crawl budget and hurt user experience. Find them before Google does.
- **Website migrations and redesigns:** crawl the new site and catch every link that still points to an old URL.
- **Agency audits:** run it on your clients' sites every month (with an Apify schedule) and send them the list of pages to fix.
- **Documentation and blogs:** old articles link to pages that disappeared. Find them in one run.

### Input

```json
{
    "startUrls": ["https://www.iana.org"],
    "maxPages": 100,
    "maxLinksPerSite": 2000,
    "checkExternalLinks": true,
    "onlyProblems": false
}
```

| Field | Meaning |
|---|---|
| `startUrls` | Home page (or any start page) of each website |
| `maxPages` | Pages read to find links, per website (default 100) |
| `maxLinksPerSite` | Hard limit of billed URLs per website: crawled pages + links checked (default 2,000) |
| `checkExternalLinks` | Also check links to other websites (default `true`) |
| `onlyProblems` | Save only `broken`, `blocked` and `timeout` rows. Every URL checked is still billed |

### Output

One row per URL. Examples from a real run on iana.org:

A broken internal link (found on 5 pages, first on /domains):

```json
{
    "url": "https://www.iana.org/domains/idn-tables/db",
    "result": "broken",
    "broken": true,
    "status": 404,
    "internal": true,
    "crawled": false,
    "foundOn": "https://www.iana.org/domains",
    "foundOnCount": 5,
    "finalUrl": "https://www.iana.org/domains/idn-tables/db",
    "redirected": false,
    "responseTimeMs": 2010,
    "contentType": "text/html; charset=utf-8",
    "server": "cloudflare",
    "error": null,
    "checkedAt": "2026-10-14T17:52:26.096Z"
}
```

A crawled page that works:

```json
{
    "url": "https://www.iana.org/about",
    "result": "ok",
    "broken": false,
    "status": 200,
    "internal": true,
    "crawled": true,
    "foundOn": "https://www.iana.org/",
    "foundOnCount": 1,
    "finalUrl": "https://www.iana.org/about",
    "redirected": false,
    "responseTimeMs": 250,
    "error": null,
    "checkedAt": "2026-10-14T17:52:19.826Z"
}
```

On that run (20 pages, 2,000 URLs): 1,996 `ok`, 1 `broken`, 1 `blocked` (403 from a bot protection) and 2 `timeout`.

| Field | Meaning |
|---|---|
| `result` | `ok`, `broken`, `blocked`, `timeout`, or `not checked` (disallowed by robots.txt, private address, website blocking the crawler: not billed) |
| `broken` | `true` only when `result` is `broken` |
| `crawled` | `true` for pages the Actor read to find links |
| `internal` | Same host as the start page (after its redirects, e.g. to `www.`) |
| `foundOn` / `foundOnCount` | First page linking to the URL / number of crawled pages linking to it |

To get only the broken links, filter the dataset on `broken = true`, or turn on `onlyProblems`.

Each run also saves, for free, a **SUMMARY** (counts per result and the broken links that most pages link to) and an **HTML REPORT** ready to send to a client: open them from the run's Output tab.

### Pricing

**$0.0005 per URL checked ($0.50 per 1,000 URLs)** plus Apify's small run-start fee. A crawled page counts as one URL, a checked link as one URL. Dead hosts and timeouts are real answers and count as checked. Invalid URLs, private addresses and links disallowed by robots.txt are free. Lower prices on higher Apify plans.

### Good to know

- **Speed:** about 2 URLs per second per website (politeness limit), external links are checked in parallel. 1,000 internal URLs take about 8 to 9 minutes.
- **JavaScript sites:** links are read from the HTML returned by the server. Links added later by JavaScript (some single-page apps) are not seen.
- **Files** (PDF, images, archives) are checked with a light request, never downloaded.
- **`blocked` is not broken:** LinkedIn, Instagram, news sites and many shops answer 999, 403, 402, 406 or 429 to robots. These links usually work in a browser.

### Use it from AI agents (MCP)

Add `broken-link-crawler` to the [Apify MCP server](https://mcp.apify.com) in your MCP client (Claude, Cursor, VS Code...).

### Integrations

Apify API, schedules, webhooks, Make, Zapier, n8n. Export as JSON, CSV, Excel or HTML.

### Related tools

Same developer, same pay-per-result pricing, outputs that chain together:

- [Bulk URL Status, Redirect & Broken Link Checker](https://apify.com/propped_cloak/bulk-url-status-checker): HTTP status codes and redirect chains of a list of URLs.
- [Sitemap URL Extractor](https://apify.com/propped_cloak/sitemap-url-extractor): every URL of a website from its sitemaps.
- [SEO Audit Tool](https://apify.com/propped_cloak/seo-audit-checker): on-page SEO of many pages, with an A-F grade and fixes.

### FAQ

**I already have the list of URLs.** Use [Bulk URL Status Checker](https://apify.com/propped_cloak/bulk-url-status-checker): it checks a list without crawling. For the URLs of a sitemap, use [Sitemap URL Extractor](https://apify.com/propped_cloak/sitemap-url-extractor).

**Need the on-page SEO too?** Use [SEO Audit](https://apify.com/propped_cloak/seo-audit-checker).

**Something wrong or missing?** Open an issue on the Issues tab.

# Actor input Schema

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

Home page or any start page of each website, one per line (https:// is added when missing). Pages of the same host are crawled; links to other sites are checked but not crawled.

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

Pages read to find links (breadth first from the start page). Internal links beyond this limit are still checked, not crawled.

## `maxLinksPerSite` (type: `integer`):

Hard limit on billed URLs per website (crawled pages + links checked). Caps the cost of each website.

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

Check links pointing to other domains (social networks, partners, docs). Turn off to check internal links only.

## `onlyProblems` (type: `boolean`):

Save only links that are broken, blocked or timed out. Every URL checked is still billed, saved or not.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.iana.org"
  ],
  "maxPages": 20,
  "maxLinksPerSite": 200,
  "checkExternalLinks": true,
  "onlyProblems": false
}
```

# Actor output Schema

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

One row per URL checked: result (ok, broken, blocked, timeout), HTTP status, the page where the link was found and how many pages link to it.

## `report` (type: `string`):

Broken links ranked by how many pages link to them, with counts per result: a page ready to send to a client.

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

Counts per result and the top broken links by number of linking pages, for scripts and AI agents.

# 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.iana.org"
    ],
    "maxPages": 20,
    "maxLinksPerSite": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("propped_cloak/broken-link-crawler").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.iana.org"],
    "maxPages": 20,
    "maxLinksPerSite": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("propped_cloak/broken-link-crawler").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.iana.org"
  ],
  "maxPages": 20,
  "maxLinksPerSite": 200
}' |
apify call propped_cloak/broken-link-crawler --silent --output-dataset

```

## MCP server setup

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

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/jQbeVKn4vZerUFUfQ/builds/EC2U86CdUfIslq10T/openapi.json
