# Broken Link Checker - Site Crawler, 404 & Redirect Audit (`wood-between-studio/broken-link-checker`) Actor

Crawl a website and check every link and image for 404s, dead domains, timeouts and redirect chains. Shows the page each broken link is on.

- **URL**: https://apify.com/wood-between-studio/broken-link-checker.md
- **Developed by:** [Wood Between Studio](https://apify.com/wood-between-studio) (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.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: Site Crawler, 404 & Redirect Audit

**Find every broken link, missing image and redirect chain on your website in minutes, with the exact page each one is on, so you can fix 404s before visitors and search engines hit them.**

Point it at a website and it opens each page, collects every link and image, checks them all, and tells you which ones are broken and which page they're on. You can also skip the crawl and paste a list of URLs to check.

It's a plain HTTP checker, with no browser, so it's quick and cheap to run, even on a few thousand links.

### Why use it

- **Fix 404s before your visitors find them.** You get the dead URL, the page it's on and the link text, so you know exactly what to edit.
- **Clean up after a migration or redesign.** Find internal links that still point to old URLs and links that bounce through two or three redirects.
- **Catch missing images.** `<img>` and `srcset` sources are checked too, and you can include scripts and stylesheets.
- **Audit outbound links.** External sites move or shut down. This finds the domains that no longer resolve.
- **Check a list.** Paste URLs from a spreadsheet, an export or a sitemap and get the status, redirect chain and final URL for each.
- **Monitor on a schedule.** Run it weekly and send the results to email, Slack or Google Sheets with Apify integrations.

### How it classifies links

| `result` | Meaning | Counted as broken? |
|---|---|---|
| `ok` | 2xx response (after any redirects) | no |
| `broken` | 4xx or 5xx response | **yes** |
| `error` | DNS failure, refused connection, SSL problem, malformed URL | **yes** |
| `timeout` | No answer within the timeout | no (worth a second look) |
| `blocked` | 401, 403, 429 or 999. The server refused an automated check (common on Etsy, LinkedIn and sites behind bot protection) | no |

Many link checkers report `blocked` links as broken and bury the real problems. This one keeps them separate. Every redirected link also gets `redirected: true`, the full `redirectChain` and the `finalUrl`.

The checker sends a HEAD request first. If the server answers with an error, it confirms with a real GET, because plenty of servers answer HEAD badly. Rate-limited answers (429, 503) get a short pause and up to two retries.

### Input

```json
{
  "startUrls": [{ "url": "https://www.woodbetweenstudio.com" }],
  "mode": "crawl",
  "maxPages": 200,
  "maxLinks": 5000,
  "checkExternalLinks": true,
  "checkImages": true,
  "onlyProblems": true,
  "excludeUrlPattern": "/cart|/login"
}
```

| Field | What it does | Default |
|---|---|---|
| `startUrls` | Crawl mode: where to start. List mode: the URLs to check | (required) |
| `mode` | `crawl` follows internal links. `list` checks only what you pasted | `crawl` |
| `maxPages` | Internal pages to open and read links from | `200` |
| `maxLinks` | Maximum unique URLs to check (each one is a billed event) | `5000` |
| `checkExternalLinks` | Check links to other sites (they're checked, never crawled) | `true` |
| `checkImages` | Check `<img>` and `srcset` URLs | `true` |
| `checkScriptsAndStyles` | Check `<script src>` and stylesheets | `false` |
| `onlyProblems` | Output only non-OK links. Turn off to get every link | `true` |
| `excludeUrlPattern` | Regex for URLs to skip completely | empty |
| `respectRobotsTxt` | Don't crawl pages that robots.txt disallows | `true` |
| `concurrency` / `perHostConcurrency` | Parallel requests overall and per server | `10` / `2` |
| `timeoutSecs` | Per-request timeout | `20` |

### Output

One row per link, worst problems first. For example:

```json
{
  "url": "https://www.woodbetweenstudio.com/does-not-exist",
  "result": "broken",
  "isBroken": true,
  "statusCode": 404,
  "error": null,
  "redirected": false,
  "redirectCount": 0,
  "finalUrl": null,
  "redirectChain": [],
  "linkType": "internal",
  "element": "a",
  "anchorText": "Holiday printables",
  "nofollow": false,
  "foundOnCount": 2,
  "foundOn": ["https://www.woodbetweenstudio.com/", "https://www.woodbetweenstudio.com/holiday/"],
  "responseTimeMs": 84,
  "contentType": "text/html; charset=utf-8",
  "checkedAt": "2026-10-30T19:35:10.000Z"
}
```

A redirect looks like this:

```json
{
  "url": "https://httpbin.org/redirect/3",
  "result": "ok",
  "statusCode": 200,
  "redirected": true,
  "redirectCount": 3,
  "finalUrl": "https://httpbin.org/get",
  "redirectChain": ["302 https://httpbin.org/redirect/3", "302 https://httpbin.org/relative-redirect/2", "302 https://httpbin.org/relative-redirect/1"]
}
```

The key-value store also gets:

- `SUMMARY`: pages crawled, links checked, counts by result.
- `REPORT`: a one-page HTML report you can open in a browser or send to a client.

### Pricing

In plain words: **$0.80 per 1,000 links checked** (that's $0.0008 per link), plus Apify's small standard Actor start fee. A typical 50-page site with about 300 unique links costs roughly $0.25.

- You pay once per unique URL. A link that appears on 50 pages is checked and billed once.
- Crawled pages count as checked links, because opening a page also checks it.
- With `onlyProblems` on, healthy links are hidden from the output but were still checked, so they are still billed.
- Cap your spend with `maxLinks` or a maximum cost per run. The Actor stops at the cap and still saves everything it checked.

### FAQ

**Can I use it on a site I don't own?**
Checking whether public links work is ordinary web hygiene. Even so, the Actor respects robots.txt for crawling, never crawls external sites, and keeps per-server load low (2 parallel requests by default). Point it at your own sites or your clients' sites, and follow each site's terms.

**Why do Etsy, LinkedIn or Instagram links show as "blocked"?**
Those sites refuse automated requests whatever the page status, so the Actor can't tell whether the link works. It marks them `blocked` instead of guessing. Spot-check them in a browser.

**Does it run JavaScript?**
No. It reads the HTML the server sends, which covers most sites, including WordPress, Shopify storefronts, Squarespace, Wix and static sites. Links that only appear after JavaScript runs won't be found.

**Does it check links inside PDFs?**
No. PDFs that are linked from pages get their own status checked, but the Actor doesn't open them to look for links.

**What about `#anchor` links?**
The fragment is removed and the page itself is checked. The Actor doesn't verify that the anchor exists on the page.

**How long does a run take?**
A 50-page site with about 300 links takes roughly 15 seconds. A 25-page site with 2,700 links takes about 3 minutes, mostly spent waiting on slow external servers.

### Related tools

These work well together for a quick technical SEO check:

- **[SEO Meta Tag Audit](https://apify.com/wood-between-studio/seo-meta-audit)**: bulk-check meta titles, meta descriptions, canonicals, H1s and schema, with a 0-100 score per page.
- **[Sitemap & RSS Feed Exporter](https://apify.com/wood-between-studio/sitemap-feed-exporter)**: export a sitemap.xml or RSS feed to CSV, Excel or JSON.

Typical workflow: export the sitemap first, then run this Actor in list mode on exactly the pages you care about.

***

Made by Wood Between Studio.

# Actor input Schema

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

In crawl mode: the homepage (or section) to start from. In list mode: every URL you want checked.

## `mode` (type: `string`):

Crawl = follow internal links and check everything found on each page. List = just check the URLs you pasted, nothing else.

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

Crawl mode only. How many internal pages to open and read links from.

## `maxLinks` (type: `integer`):

Hard cap on unique URLs checked (each one is a billed event).

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

Also check links that point to other websites (they are checked, never crawled).

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

Check <img> and srcset image URLs too.

## `checkScriptsAndStyles` (type: `boolean`):

Check <script src> and stylesheet links.

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

On: the dataset lists only broken, blocked, timed-out and other non-200 links. Off: every checked link, including the healthy ones.

## `excludeUrlPattern` (type: `string`):

Optional. Example: /cart|/login|?replytocom=

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

Do not crawl internal pages that robots.txt disallows.

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

Requests in flight at once, across all hosts.

## `perHostConcurrency` (type: `integer`):

Keeps the load on any single server low.

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

How long to wait for each server before marking the link as timed out.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.woodbetweenstudio.com"
    }
  ],
  "mode": "crawl",
  "maxPages": 200,
  "maxLinks": 5000,
  "checkExternalLinks": true,
  "checkImages": true,
  "checkScriptsAndStyles": false,
  "onlyProblems": true,
  "respectRobotsTxt": true,
  "concurrency": 10,
  "perHostConcurrency": 2,
  "timeoutSecs": 20
}
```

# Actor output Schema

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

No description

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

No description

## `report` (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://www.woodbetweenstudio.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wood-between-studio/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://www.woodbetweenstudio.com" }] }

# Run the Actor and wait for it to finish
run = client.actor("wood-between-studio/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://www.woodbetweenstudio.com"
    }
  ]
}' |
apify call wood-between-studio/broken-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wood-between-studio/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/6e1xMVgDhCnHTPIot/builds/TvgQ46yuEmWMYp1MX/openapi.json
