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

Crawl any website and check every link for 404 errors, dead external links, server errors and redirects. Shows the page each broken link is on and its anchor text. Fast, no browser, respects robots.txt.

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

$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, Dead Links & Redirects

Scan any website for **broken links**: 404 Not Found pages, dead external links, server errors (5xx), timeouts and redirects. For each problem you get **the page it's on and the anchor text**, so you can fix it in minutes.

Fast HTTP crawler: no browser, cheap to run, and it respects robots.txt.

### Why use it

- **SEO**: broken links waste crawl budget and hurt user experience. Find and fix them before Google does.
- **Site migrations**: check that nothing broke after a redesign or a CMS move.
- **Content audits**: find dead outbound links in old blog posts and docs.
- **Monitoring**: schedule a weekly run and get alerted (via Apify integrations) when new broken links appear.
- **Agencies**: audit client websites in bulk, with several start URLs in one run.

### How it works

1. It crawls your site from the start URL(s), staying on the same domain, up to "Max pages to crawl".
2. It collects every link (and optionally every image) on those pages.
3. It checks each unique link once (HEAD, then GET as fallback) and records the status code, final URL after redirects, and errors.

### Input

| Field | What it does | Default |
|---|---|---|
| Website URLs | One or more sites to check | books.toscrape.com (demo) |
| Max pages to crawl | Pages of your site to scan for links | 20 |
| Max links to check | Cap on unique links checked | 1,000 |
| Check external links | Also check links to other sites | on |
| Check images | Also check `<img>` sources | off |
| Only output problems | Save only broken/blocked/error rows | off |
| Respect robots.txt | Skip disallowed pages | on |

### Output

One row per unique link:

```json
{
  "url": "https://example.com/old-page",
  "status": 404,
  "category": "broken",
  "isRedirect": false,
  "finalUrl": "https://example.com/old-page",
  "error": null,
  "isExternal": false,
  "linkType": "link",
  "foundOnPage": "https://example.com/blog/post-1",
  "anchorText": "read our guide",
  "foundOnCount": 3,
  "foundOn": ["https://example.com/blog/post-1", "..."],
  "checkedAt": "2026-11-11T20:00:00.000Z"
}
```

**Categories**

- `ok`: works (2xx or 3xx after redirects)
- `broken`: 4xx or 5xx (e.g. 404, 410, 500)
- `blocked`: the site refuses automated checks (401, 403, 429, LinkedIn's 999). These usually work in a normal browser, so check them by hand.
- `error`: DNS failure, timeout, SSL or connection error

A run summary (pages crawled, links checked, problems found) is saved in the key-value store as `SUMMARY`.

### Pricing

**$0.80 per 1,000 links checked.** No start fee. A typical 20-page site with 500 links costs about $0.40. Set a maximum spend per run and the checker stops cleanly within it.

### Tips

- Use "Only output problems" for a short to-do list.
- To check a single page, set "Max pages to crawl" to 1.
- Please only scan websites you own or have permission to audit.

Questions or feature requests? Open an issue on the Issues tab.

### Responsible use

Check sites you own or manage, or that you have permission to audit. The checker follows robots.txt by default, crawls politely and never logs in or bypasses CAPTCHAs. You are responsible for how often you run it against third-party sites.

### More from Pandapi 🐼

Pandapi makes friendly, no-nonsense data tools: simple input, clean output, and fair pay-per-result prices. Found a bug or need a feature? Open an issue on the Issues tab and we answer fast.

- [Web Page to Markdown](https://apify.com/blueberry_rainstorm/web-page-to-markdown): clean, chunked Markdown from any URL or sitemap, ready for AI and RAG
- [PDF to Text, Markdown & Excel](https://apify.com/blueberry_rainstorm/pdf-to-text-markdown): text, Markdown and real Excel tables from any PDF, with OCR
- [Website Contact Details Scraper](https://apify.com/blueberry_rainstorm/website-contact-finder): business emails, phones and social links, one row per website
- [Website Screenshot](https://apify.com/blueberry_rainstorm/website-screenshot): full-page and mobile screenshots or PDFs of many URLs at once
- [Public Tenders Feed](https://apify.com/blueberry_rainstorm/public-tenders-feed): government tenders and contract awards from six official portals
- [App Store Reviews Scraper](https://apify.com/blueberry_rainstorm/app-store-reviews-scraper): iOS reviews, ratings and app details from about 180 countries
- [Google Play Reviews Scraper](https://apify.com/blueberry_rainstorm/google-play-reviews-scraper): Android reviews with developer replies, ratings and app data, many languages
- [HTML to PDF](https://apify.com/blueberry_rainstorm/html-to-pdf): web pages, HTML or a template plus JSON rows (invoices, certificates) to PDF
- [Hacker News Scraper](https://apify.com/blueberry_rainstorm/hacker-news-scraper): stories, comments, Show HN and job posts, filtered your way

# Actor input Schema

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

The website(s) to check. The crawler stays on the same domain as each start URL.

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

How many pages of your site to scan for links.

## `maxLinksToCheck` (type: `integer`):

Upper limit on unique links checked (you pay per link checked).

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

Also check links that point to other websites.

## `checkImages` (type: `boolean`):

Also check <img> sources for broken images.

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

If on, only broken, blocked and error links are saved to the results. All checked links are still billed.

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

Skip pages your robots.txt disallows.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "maxPagesToCrawl": 20,
  "maxLinksToCheck": 1000,
  "checkExternalLinks": true,
  "checkImages": false,
  "onlyBroken": false,
  "respectRobotsTxt": true
}
```

# Actor output Schema

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

No description

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

No description

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

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

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

```

## MCP server setup

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