# Broken Link Checker: 404s, Redirects & Dead Links (`iveeeeeen/broken-link-checker-pro`) Actor

Crawl any website and find broken links (404, 410, 5xx, timeouts, DNS errors), redirect chains and dead external links. Shows the pages where each bad link appears, plus a site health score. Fast HTTP checks, pay per link.

- **URL**: https://apify.com/iveeeeeen/broken-link-checker-pro.md
- **Developed by:** [Ivan Alvarado](https://apify.com/iveeeeeen) (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

$0.80 / 1,000 link checkeds

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

## Broken Link Checker: Find 404s, Redirects & Dead Links on Any Website

**Crawl a website and get every broken link: 404/410, server errors, timeouts, DNS failures and redirect loops. For each one you also get the pages it appears on, so you know exactly where to fix it.** It's fast (plain HTTP, no browser), so you can check thousands of links for a few dollars.

### What it does

- Crawls internal pages from your start URL (same domain, respects robots.txt for crawling)
- Checks every unique link: internal pages, **external links**, and optionally **images, scripts and CSS**
- Uses HEAD first, then falls back to GET where servers reject HEAD, and records **full redirect chains**
- Sorts each link into `ok`, `not-found`, `server-error`, `client-error`, `unreachable`, `redirect-loop`, or `restricted` (403/429/999 bot-blocking, reported but not counted as broken)
- Writes a **site summary** with a health score per site

### Use cases

SEO audits and site migrations, finding broken outbound links to reclaim, content QA before launches, agency client reports, and scheduled weekly monitoring.

### Input example

```json
{ "startUrls": ["https://crawlee.dev"], "maxPagesPerSite": 20, "maxLinksPerSite": 300, "checkExternalLinks": true }
```

### Output example

```json
{ "type": "link", "site": "https://example.com", "url": "https://example.com/old-page", "status": 404, "result": "not-found", "isBroken": true,
  "isExternal": false, "linkType": "page", "anchorText": "Pricing", "foundOnPages": ["https://example.com/", "https://example.com/blog"], "foundOnPageCount": 2, "redirectCount": 0 }
```

```json
{ "type": "summary", "site": "https://example.com", "pagesCrawled": 20, "linksChecked": 300, "brokenLinks": 4, "healthScore": 99, "resultCounts": { "ok": 291, "not-found": 4, "restricted": 5 } }
```

Download as CSV, Excel or JSON, or call it through the API, with schedules, webhooks or Zapier/Make.

### Pricing (pay per event)

**$0.0008 per link checked** ($0.80 per 1,000 links). `maxLinksPerSite` caps your cost, and the run stops cleanly at your max-charge limit.

### FAQ

**Does it render JavaScript?** No. It reads server HTML, which is fast and cheap. Links injected only by JS are not discovered.
**Why "restricted"?** Some sites (LinkedIn, Stack Overflow, Cloudflare-protected sites) block automated requests. Those links usually work in a browser, so they are reported separately and not counted as broken.

# Actor input Schema

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

Start URL of each site. Internal pages are crawled from here (same origin only).

## `maxPagesPerSite` (type: `integer`):

Internal HTML pages to crawl for links.

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

Cap on unique URLs checked per site, which also caps cost (one link-checked event per URL).

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

Also check links pointing to other domains (no crawling, single request each).

## `checkImagesAndAssets` (type: `boolean`):

Also check <img>, <script> and stylesheet URLs.

## `reportAllLinks` (type: `boolean`):

Off: only broken/restricted links plus a per-site summary are saved. On: every checked link is saved.

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

Timeout for each link check.

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

Requests in flight at once.

## Actor input object example

```json
{
  "startUrls": [
    "https://crawlee.dev"
  ],
  "maxPagesPerSite": 20,
  "maxLinksPerSite": 300,
  "checkExternalLinks": true,
  "checkImagesAndAssets": false,
  "reportAllLinks": false,
  "timeoutSecs": 15,
  "concurrency": 10
}
```

# Actor output Schema

## `brokenLinks` (type: `string`):

Problem links with status, error and the pages they appear on.

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

Per-site counts and health score.

# 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://crawlee.dev"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("iveeeeeen/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://crawlee.dev"] }

# Run the Actor and wait for it to finish
run = client.actor("iveeeeeen/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://crawlee.dev"
  ]
}' |
apify call iveeeeeen/broken-link-checker-pro --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,iveeeeeen/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/pt7WkVcGxOxr5vGV5/builds/FaLv2GjMbPEi4Q56Z/openapi.json
