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

Crawl whole websites and find broken links (404, 5xx, DNS, SSL, timeouts), redirect chains and insecure links, with the pages they appear on. Bot-protected links flagged separately, not as false errors. Failures free.

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

## Pricing

from $1.60 / 1,000 page crawleds

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: Find Dead Links, Redirects & 404s

Crawl a whole website and get a clean list of **every broken link**, **every redirect chain** and **every insecure link**, together with **the pages where each link appears** and the link text. Enter one or more websites, get one row per problem link plus a health score per site. CSV/Excel-ready.

- **Finds real problems:** 404/410 pages, server errors (5xx), domains that no longer resolve (DNS), SSL certificate errors, timeouts, redirect loops, missing images, scripts and stylesheets.
- **No false alarms from bot protection:** links that answer 401/403/429/999 (LinkedIn, login pages, Cloudflare) are listed separately as `unverifiable` and never counted as broken. Servers that reject HEAD requests are re-checked with GET automatically.
- **Where to fix it:** each problem link lists the pages it was found on (up to 10), how often it occurs, the link text and the HTML element (`a`, `img`, `script`, stylesheet, canonical …).
- **SEO extras:** redirect chains (2+ hops), links that redirect to another host, links that could point to the final URL directly, and `http://` links on `https://` pages.
- **Complete crawl:** follows internal links (www and non-www, http and https are treated as one site) and optionally adds all pages from the sitemap, so orphan pages are checked too. External links are checked but never crawled.
- **Fast and polite:** every unique URL is checked only once per run; at most 3 parallel requests per host; respects robots.txt by default.
- **Fair pricing:** you pay per crawled page, not per link. Unreachable websites are free, and your maximum cost per run is respected.

### Who uses it

| User | Typical use |
| --- | --- |
| SEO agencies and freelancers | Monthly link audits for clients, fix 404s and redirect chains before they cost rankings |
| Website owners and shops | Find dead product links, missing images and outdated partner links |
| Developers and QA | Check a site after a relaunch or migration, schedule it as a regular check |
| Content teams | Clean up old blog posts that link to vanished sources |

### Input

| Field | Example | Notes |
| --- | --- | --- |
| `startUrls` | `["https://example.com"]` | One or more websites |
| `maxPagesPerSite` | `100` | Pages crawled per site (= your cost cap per site) |
| `useSitemap` | `true` | Also crawl the pages listed in the sitemap |
| `checkExternalLinks` | `true` | Check links to other sites (never crawled) |
| `checkResources` | `true` | Also check images, scripts, stylesheets, icons, canonical |
| `reportUnverifiable` | `true` | List bot-protected links separately |
| `onlyBroken` | `false` | Skip redirects and warnings |
| `respectRobotsTxt` | `true` | Do not crawl disallowed pages |
| `listPages` | `false` | One extra row per crawled page (crawl log) |
| `maxConcurrency`, `requestTimeoutSecs` | `20`, `20` | Speed and patience |

### Output

One row per problem link (`type` = `link-problem`), sorted with broken links first, then one summary row per website (`type` = `site-summary`).

```json
{
  "type": "link-problem",
  "site": "https://example.com",
  "linkUrl": "https://example.com/old-offer",
  "linkType": "internal",
  "element": "a",
  "result": "broken",
  "problem": "HTTP 404 (page not found)",
  "httpStatus": 404,
  "finalUrl": null,
  "redirectHops": 0,
  "linkText": "Our autumn offer",
  "occurrences": 7,
  "foundOnPages": ["https://example.com/", "https://example.com/blog/autumn"],
  "checkedAt": "2026-11-13T12:00:00Z"
}
```

| `result` | Meaning |
| --- | --- |
| `broken` | 4xx/5xx, DNS, SSL, timeout, connection refused, redirect loop |
| `redirect` | redirect chain (2+ hops), redirect to another host, or 1 hop that could be avoided |
| `warning` | `http://` link on an `https://` page |
| `unverifiable` | 401/403/405/406/429/451/999: login or bot protection, check manually |

The summary row contains `pagesChecked`, `linksChecked`, `brokenLinks`, `redirects`, `unverifiable`, `warnings`, `healthScore` (0–100), `pageLimitReached` and, if the site could not be reached, `errors`.

### Pricing (pay per event)

| Event | Price |
| --- | --- |
| Page crawled (all links on it checked) | **$2.00 per 1,000 pages** |

All links on a page are included. Websites that cannot be reached are free. Higher Apify plans get automatic Store discounts.

### FAQ

**Why "unverifiable" instead of "broken"?** Sites like LinkedIn or pages behind Cloudflare block automated requests (HTTP 999, 403, 429). The link usually works in a browser, so we do not report it as broken. You can hide these rows with `reportUnverifiable: false`.

**Does it check links inside JavaScript-rendered content?** No, it reads the HTML the server delivers. This covers almost all links on classic websites, shops and blogs and keeps the check fast and cheap.

**Can I monitor a site regularly?** Yes: save the input as a task and schedule it weekly. Combine it with an Apify integration (e-mail, Slack, webhook) to get notified.

**Something wrong or missing?** Open an issue on the Actor page. We usually answer within one business day.

***

### Kurz auf Deutsch

Durchsucht ganze Websites und findet **defekte Links** (404, Serverfehler, nicht mehr existierende Domains, SSL-Fehler, Zeitüberschreitungen), **Weiterleitungsketten** und **unsichere http-Links**, jeweils mit den Seiten, auf denen der Link steht, und dem Linktext. Bot-geschützte Links (z. B. LinkedIn) werden getrennt als „nicht prüfbar“ ausgewiesen statt als Fehlalarm. Abgerechnet wird je gecrawlter Seite (2,00 $ pro 1.000 Seiten); nicht erreichbare Websites sind kostenlos.

***

**Anbieter / Impressum (Angaben gemäß § 5 DDG):** Michael Schönherr · Am Spiegelwald 1 · 08344 Grünhain-Beierfeld · Deutschland · E-Mail: toolmaster@tuta.io

# Changelog

This Actor's version history is a separate document: https://apify.com/michael80/broken-link-checker/changelog.md

# Actor input Schema

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

One website per line (e.g. https://example.com). The crawler starts here and follows internal links on the same domain (www and non-www count as the same site).

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

How many pages of each website are crawled. Every link on these pages is checked. You pay per crawled page, so this is also your cost cap per site.

## `useSitemap` (type: `boolean`):

Add the pages listed in the site's sitemap (found via robots.txt or /sitemap.xml) to the crawl, so orphan pages without internal links are checked too.

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

Also check links pointing to other websites. External links are only checked, never crawled.

## `checkResources` (type: `boolean`):

Also check img, source, script, iframe, stylesheet, icon and canonical URLs, not only a-href links.

## `reportUnverifiable` (type: `boolean`):

List links that answer 401/403/429/999 (login or bot protection, e.g. LinkedIn) as 'unverifiable' instead of hiding them. They are never counted as broken.

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

Skip redirects and warnings (e.g. http:// links on https pages) and report broken and unverifiable links only.

## `respectRobotsTxt` (type: `boolean`):

Do not crawl pages that robots.txt disallows. Links to such pages are still checked with a single request.

## `listPages` (type: `boolean`):

Add one row per crawled page with its HTTP status (useful as a crawl log).

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

Parallel link checks (default 20). At most 3 requests run at the same time against one host to stay polite.

## `requestTimeoutSecs` (type: `integer`):

Links that do not answer within this time are reported as 'timeout'.

## `selfTest` (type: `boolean`):

Ignore the input and check 5 pages of python.org (internal links only) to verify the Actor works.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com"
  ],
  "maxPagesPerSite": 20,
  "useSitemap": true,
  "checkExternalLinks": true,
  "checkResources": true,
  "reportUnverifiable": true,
  "onlyBroken": false,
  "respectRobotsTxt": true,
  "listPages": false,
  "maxConcurrency": 20,
  "requestTimeoutSecs": 20,
  "selfTest": false
}
```

# Actor output Schema

## `overview` (type: `string`):

Problem links with status, reason and pages, plus site summaries.

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

Complete rows incl. check time and page-limit flag.

# 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://books.toscrape.com"
    ],
    "maxPagesPerSite": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("michael80/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": ["https://books.toscrape.com"],
    "maxPagesPerSite": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("michael80/broken-link-checker").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://books.toscrape.com"
  ],
  "maxPagesPerSite": 20
}' |
apify call michael80/broken-link-checker --silent --output-dataset

```

## MCP server setup

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

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/tdwrhLu0q27mNckpA/builds/aC1oda77b7PuEtLq1/openapi.json
