# Broken Link Checker — Full Website Crawler (`logiover/broken-link-checker`) Actor

Crawl an entire website and check every internal & external link for broken (404/5xx) responses. Get the source page, anchor text and status code for each link. Schedule it to monitor any site for dead links and SEO errors.

- **URL**: https://apify.com/logiover/broken-link-checker.md
- **Developed by:** [Logiover](https://apify.com/logiover) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.50 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Broken Link Checker — Crawl a Whole Website for Dead Links 🔗

**Find every broken link on a website automatically.** This **broken link checker** crawls an entire site, follows internal links, and checks **every internal and external link** for **404, 410 and 5xx** errors. For each link you get the **source page it was found on**, the **anchor text**, the **link type** and the exact **HTTP status code**.

Give it one URL — it discovers and audits thousands of pages and links for you. **No login, no proxy setup, no headless browser.** Fast, cheap and schedulable.

> Looking for a **dead link checker**, **404 finder**, **broken link finder** or a **website link validator**? This actor does all of it, site-wide.

---

### ✨ Key features

- 🕷️ **Full-site crawl** — start from one URL and automatically follow internal links across the whole domain.
- 🔗 **Checks every link** — internal *and* external (outbound) links, not just a flat list.
- 🚦 **Exact HTTP status** — `200`, `301`, `404`, `410`, `500`, plus network errors (timeouts, unreachable hosts, DNS failures).
- 📄 **Source page + anchor text** — know exactly *where* each broken link lives so you can fix it fast.
- ⚡ **Fast & cheap** — pure HTTP (HEAD with GET fallback), no browser. Each unique URL is checked only once and cached.
- 🗓️ **Schedulable monitoring** — run it daily/weekly to catch dead links the moment they appear.
- 🎛️ **Flexible output** — export *only broken links* or a *full audit* of every link on the site.

### 💡 Use cases

- **SEO audits** — broken internal links waste crawl budget and hurt rankings. Find and fix them across the whole site.
- **Website migrations & redesigns** — catch every `404` before and after a launch or domain move.
- **Content & docs maintenance** — keep large blogs, documentation and knowledge bases link-clean.
- **Affiliate & outbound link monitoring** — make sure the external links you earn from still resolve.
- **Ongoing link monitoring** — schedule the actor and get alerted when something breaks.

### 📦 What you get

One row per link checked:

| Field | Description |
|-------|-------------|
| `sourceUrl` | The page the link was found on |
| `linkUrl` | The link target (absolute URL) |
| `anchorText` | The clickable text of the link |
| `linkType` | `internal` or `external` |
| `statusCode` | HTTP status code (e.g. `200`, `404`, `500`) |
| `ok` | `true` if the link works, `false` if it's broken |
| `error` | Network error (`timeout`, `unreachable`, …) when there is no status code |
| `checkedAt` | ISO 8601 timestamp of the check |

#### Example output

```json
{
  "sourceUrl": "https://example.com/blog/post-1",
  "linkUrl": "https://example.com/old-page",
  "anchorText": "see our old guide",
  "linkType": "internal",
  "statusCode": 404,
  "ok": false,
  "error": null,
  "checkedAt": "2026-05-25T14:08:46.306Z"
}
````

Turn on **Only output broken links** for a clean list of just the dead links, or leave it off to export a complete link audit of the entire website.

### 🚀 How to use the Broken Link Checker

1. Click **Try for free / Start**.
2. Paste one or more website URLs into **Start URLs**.
3. (Optional) Set **Max pages to crawl** — use `0` to crawl the whole site.
4. (Optional) Toggle **Check external links** and **Only output broken links**.
5. Click **Save & Start**.
6. Download your results as **JSON, CSV, Excel, HTML or via API** — or schedule the run to repeat.

### ⚙️ Input

| Option | Description | Default |
|--------|-------------|---------|
| `startUrls` | Websites to crawl | – (required) |
| `maxPagesToCrawl` | Max pages to crawl per run (`0` = crawl the whole site) | `1000` |
| `checkExternalLinks` | Also check links pointing to other domains | `true` |
| `onlyBroken` | Save only broken links (4xx / 5xx / unreachable) | `false` |
| `maxConcurrency` | Number of parallel requests | `10` |

#### Example input

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxPagesToCrawl": 2000,
  "checkExternalLinks": true,
  "onlyBroken": false,
  "maxConcurrency": 10
}
```

### 🔍 How it works

The crawler starts from your **Start URLs** and follows internal `<a>` links within the same domain (skipping asset files like images, PDFs and scripts). On every page it extracts all links and verifies each one with a lightweight `HEAD` request, automatically falling back to `GET` for servers that don't support `HEAD`. Every unique URL is checked **only once** and the result is reused across pages, so even very large sites are audited efficiently.

### 🧰 Tips & best practices

- Set `maxPagesToCrawl` to `0` for full-site coverage; keep it lower for quick spot-checks.
- Lower `maxConcurrency` if the target site starts rate-limiting or returning `429`.
- Use **Only output broken links** for fix-lists, and the full export for complete link inventories.
- **Schedule** the actor (daily/weekly) so broken links never sit unnoticed.

### ❓ FAQ

**What counts as a broken link?** Any link returning a 4xx or 5xx status code, or one that can't be reached (timeout, DNS failure, connection refused). These have `ok: false`.

**Does it crawl other websites too?** It *checks* external links (their status) but only *crawls deeper* within your own domain, so you stay in control of scope.

**Will it find every page on my site?** It follows internal links up to `maxPagesToCrawl`. Increase that limit (or set it to `0`) for complete coverage.

**Does it use a real browser?** No — it's pure HTTP, which makes it fast and inexpensive. This works for the vast majority of websites.

**Can I check several sites at once?** Yes — add multiple Start URLs.

**What output formats are supported?** JSON, CSV, Excel, HTML table and a full REST API, like every Apify actor.

### 🔗 Related actors by the same author

- **Bulk URL Status Checker** — check a flat list of URLs for status codes & redirects.
- **Website Link Graph & Outbound Links Crawler** — map internal & outbound links site-wide.
- **Website SEO Audit Crawler** — full on-page SEO audit for every page.
- **Sitemap to URL Crawler** — extract all URLs from any sitemap.xml.

***

### Changelog

- **2026-05-25** — Maintenance & reliability pass: pulled the latest source and rebuilt the Actor on the current base image; build verified.

*Last reviewed: 2026-05-25.*

# Actor input Schema

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

Websites to crawl. The crawler follows internal links from each start URL and checks every link it finds along the way.

## `maxPagesToCrawl` (type: `integer`):

Maximum pages to crawl per run. More pages = more links checked. Set 0 for no limit (crawl the whole site).

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

Also verify links that point to other domains, not just internal links.

## `onlyBroken` (type: `boolean`):

Save only broken links (4xx/5xx/unreachable). Turn off to export a full audit row for every link checked.

## `maxConcurrency` (type: `integer`):

Number of parallel requests. Lower this if the target site rate-limits you.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPagesToCrawl": 1000,
  "checkExternalLinks": true,
  "onlyBroken": false,
  "maxConcurrency": 10
}
```

# Actor output Schema

## `sourceUrl` (type: `string`):

Page the link was found on

## `linkUrl` (type: `string`):

The link target

## `linkType` (type: `string`):

internal or external

## `statusCode` (type: `string`):

HTTP status

## `ok` (type: `string`):

Whether the link works

# 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://apify.com"
        }
    ],
    "maxPagesToCrawl": 1000,
    "maxConcurrency": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("logiover/broken-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": [{ "url": "https://apify.com" }],
    "maxPagesToCrawl": 1000,
    "maxConcurrency": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("logiover/broken-link-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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://apify.com"
    }
  ],
  "maxPagesToCrawl": 1000,
  "maxConcurrency": 10
}' |
apify call logiover/broken-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=logiover/broken-link-checker",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Broken Link Checker — Full Website Crawler",
        "description": "Crawl an entire website and check every internal & external link for broken (404/5xx) responses. Get the source page, anchor text and status code for each link. Schedule it to monitor any site for dead links and SEO errors.",
        "version": "1.0",
        "x-build-id": "2UYH1IutbI8Wg7vro"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/logiover~broken-link-checker/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-logiover-broken-link-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/logiover~broken-link-checker/runs": {
            "post": {
                "operationId": "runs-sync-logiover-broken-link-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/logiover~broken-link-checker/run-sync": {
            "post": {
                "operationId": "run-sync-logiover-broken-link-checker",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "startUrls"
                ],
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Websites to crawl. The crawler follows internal links from each start URL and checks every link it finds along the way.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxPagesToCrawl": {
                        "title": "Max pages to crawl",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum pages to crawl per run. More pages = more links checked. Set 0 for no limit (crawl the whole site)."
                    },
                    "checkExternalLinks": {
                        "title": "Check external links",
                        "type": "boolean",
                        "description": "Also verify links that point to other domains, not just internal links.",
                        "default": true
                    },
                    "onlyBroken": {
                        "title": "Only output broken links",
                        "type": "boolean",
                        "description": "Save only broken links (4xx/5xx/unreachable). Turn off to export a full audit row for every link checked.",
                        "default": false
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Number of parallel requests. Lower this if the target site rate-limits you."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
