# Broken Link Checker - Find Dead Links & 404s on Any Site (`bigdavidson/broken-link-checker`) Actor

Unofficial. Reads pages of the sites you list, checks every link on them (pages, images, scripts, stylesheets, iframes) and returns one row per link: status code, reason, redirects, where it was found. Filter on broken. No key, robots.txt respected.

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

## Pricing

from $0.35 / 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.
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 & 404s on Any Site

Give it the addresses of one or more public web pages. It reads a number of pages of each site, collects the links on them (pages, images, scripts, stylesheets and iframes), checks every distinct link once and returns one row per checked link: the HTTP status code, whether it is broken and why, how many redirects it passed, where it was first found and how many of the pages it read link to it. Every checked link is a row, broken or not, so you filter on `broken` to get the dead ones.

Use it to find dead links and 404s on your own site before visitors and search engines do, to check outbound links after a migration, or to run a scheduled link check for a client site.

- **$0.50 per 1,000 links.** Pay only for rows delivered. No subscription.
- **Nothing to set up.** No account, no API key, no proxies.
- **Every link, with the reason.** Status code, redirect count, where the link was found and why it counts as broken.
- **Clean, consistent fields**, ready for CSV, Excel, JSON or a database.
- **Runs on a schedule** and connects to the Apify API, Make, Zapier, n8n and AI agents.

### Who uses it

- Site owners and SEO teams finding dead links and 404s before visitors and search engines do.
- Content and documentation teams checking outbound links after a migration or a redesign.
- Agencies running a scheduled link check for every client site.

### What you get

One row per distinct link target that was checked. A link that works, from a default run:

```json
{
  "linkUrl": "https://go.dev/solutions/case-studies",
  "finalUrl": "https://go.dev/solutions/case-studies",
  "statusCode": 200,
  "ok": true,
  "broken": false,
  "reason": null,
  "redirectCount": 0,
  "linkType": "internal",
  "tag": "a",
  "linkText": "Case Studies",
  "foundOnPage": "https://go.dev/doc/",
  "foundOnPages": 2,
  "checkedAt": "2026-11-11T18:30:22Z"
}
```

A broken link looks like this. The address was checked live with this Actor's code; the link text and the page it is said to be found on were filled in by hand for the example:

```json
{
  "linkUrl": "https://go.dev/doc/no-such-page-xyz",
  "finalUrl": "https://go.dev/doc/no-such-page-xyz",
  "statusCode": 404,
  "ok": false,
  "broken": true,
  "reason": "HTTP 404",
  "redirectCount": 0,
  "linkType": "internal",
  "tag": "a",
  "linkText": "Old tutorial",
  "foundOnPage": "https://go.dev/doc/",
  "foundOnPages": 1,
  "checkedAt": "2026-11-11T18:36:35Z"
}
```

- `linkUrl` is the link as written on the page, made absolute (against the page address and its `<base href>`), without the `#fragment`. `finalUrl` is where the redirects ended; it is empty when there was no answer. `linkUrl`, `finalUrl` and `foundOnPage` are web addresses and are reported exactly as found: an address is reported as written, including anything in its query string.
- `statusCode` is the HTTP status of the final answer. It is empty when there was no answer (for example `name not found`, `timeout`), and also when the target is larger than 256 KB (see Limits).
- `ok` is true for a final status below 400 and for a target larger than 256 KB. `broken` is true for HTTP 404, 410 and every 5xx, and for no answer at all. Any other 4xx status (for example 400 or 405) gives `ok` false and `broken` false: the server answered, but it does not clearly mean the page is gone, so look at `statusCode`.
- `reason` is empty for a working link, otherwise one of: `HTTP 404` (or the other status), `timeout`, `name not found`, `connection refused`, `connection failed`, `connection error`, `TLS error`, `too many redirects`.
- `redirectCount` is the number of redirect steps followed (at most 5; more is reported as `too many redirects`).
- `linkType` is `internal` when the host named in the link is the same site as the page it was first found on (`www.example.com` and `example.com` count as one site, other subdomains are `external`), otherwise `external`. It depends on the host the link names, not on where its redirects end.
- `tag` is the tag it was first found in: `a`, `img`, `link` (stylesheets, icons, canonical and similar), `script` or `iframe`.
- `linkText` is the visible text of the link, for `a` links only, as one line cut at 100 characters; it is empty for the other tags and for a link that holds only an image.
- `foundOnPage` is the first page it was seen on. `foundOnPages` is the number of pages **read in this run** that link to it; pages that were not read are not counted.
- `checkedAt` is the time of the check in UTC.

### Input

| Field | What it does |
|---|---|
| Start URLs | Addresses of public web pages, one per line, up to 100. Entries without `http://` or `https://` get `https://`. |
| Pages to read per site | How many pages of a site are read for their links, breadth first from the start pages, following only links to the same site; a page whose address ends on another site gets its row but is not read for links. Default 10, at most 100. Start URLs of the same site share this number. Links on pages that are not read are not found. |
| Check external links | Default on. Turn off to check only links within the sites you list. |
| Maximum results | Stop after this many checked links in total. Default 100. One result is one checked link, broken or not. Pages are read first and links are checked afterwards: no further page is read once this many distinct links have been collected. |

The pages are read first, then the links are checked in the order they were found; rows appear in the Output tab as they are checked. A link found twice is checked once. Two addresses that differ only by the `#fragment` are one link; a trailing slash, letter case in the path or tracking parameters (such as `utm_source`) make separate links. A page address that is already a link target is not fetched twice.

### What is not charged

A link that could not be checked gets no row and costs nothing. The run log and the final status message count them per reason:

- the link's site disallows it in robots.txt (`disallowed by robots.txt`), or its robots.txt could not be read because the site answered it with a server error (`robots.txt could not be read`);
- the site refused an automated request: HTTP 401 or 403 (also 407 and 451), a login redirect, a CAPTCHA or bot-challenge page, or a rate limit that did not go away (`site refused an automated request`). That site is then **left alone for the rest of the run**; its other links are counted as `site refused an earlier request in this run`. A refusal is never worked around and is not reported as a broken link;
- the address is not a public web address: private, local and internal addresses, addresses with a user name or password, and ports other than 80 and 443 (`not a public web address`);
- the site did not answer two links in a row (timeout or connection failure; a link that does get an answer in between starts the count again). A site whose robots.txt cannot be reached at all counts the same way. Those two links get a row each, and the site's other links in the run are not asked again and are counted as `site did not answer an earlier link in this run`;
- the link is not a web link, or not one that can be checked: `mailto:`, `tel:`, `javascript:`, `data:` and other schemes, fragment-only links (`#top`), a link to the page it is on, an address longer than 2,000 characters, or one that is not a valid address;
- an external link when "Check external links" is off, a link that would be the 51st outside site of the run (`outside-site limit`, see Limits), a link beyond the limit of 50 links on one outside site, or beyond the limit of 5,000 distinct links per run;
- a link the Actor did not get to because the run stopped early (see Limits).

The counts for `mailto:`, `tel:`, `javascript:`, other schemes, fragment-only and switched-off links are counted per link found on the pages read; the other counts are per distinct address.

### How to run it

1. Open the **Input** tab. The prefilled example (a documentation page of go.dev and the Python tutorial, three pages each) works as it is; replace the addresses with yours.
2. Press **Start**. Rows appear in the **Output** tab as links are checked.
3. Filter the table or the download on `broken` = true. Download the results as JSON, CSV, Excel, XML or HTML, or read them through the Apify API.

Requests are made one at a time, about a second apart, so a run takes roughly a second per checked link plus a second for every page read. In a default run, 100 checked links took about two minutes. A link to a site not seen before costs two or three seconds, because that site's robots.txt is read first.

### How much does it cost?

**$0.50 per 1,000 links** ($0.0005 per link), plus Apify's standard start charge of $0.00005 per run. There is no subscription and no rental fee.

| Results | Cost |
|---|---|
| 100 | $0.05 |
| 1,000 | $0.50 |
| 10,000 | $5.00 |

You pay only for rows delivered (the `link` charge). Platform usage is included in that price, and a run stops at the spending limit you set. The Pricing tab always shows the current price.

### FAQ

**Do I need an account, an API key or a proxy?** No. The Actor reads public pages only and needs nothing from you besides the input.

**Can I run it on a schedule?** Yes. Put it on an Apify schedule and filter each run on `broken` = true.

**Why is a link that opens in my browser missing from the results?** Probably it gets no row because its site refused an automated check or its robots.txt disallows it; the log says which. Links in a page's JavaScript, in `srcset` or in CSS are not found at all.

**Is it safe to give it any address?** The Actor only fetches public web addresses on the standard ports; private, local, internal, multicast and reserved addresses are refused, also when a redirect leads there. Every download has a size limit, every page and every link a time limit, and pages are read with a one-pass HTML parser that stops once a tag or comment that never ends has held back more than 100 KB. Pages of 3 MB of hostile markup (one endless tag, an unclosed quote or comment, an attribute flood, 100,000 short links) were read here in under five seconds with a peak, measured with Python's tracemalloc, below 30 MB. The memory of the whole run was not measured.

**Something looks wrong?** Open the **Issues** tab on this page and include the input you used.

### Limits

- **robots.txt is obeyed.** A page that the site's robots.txt disallows for this Actor is not read, and a link that it disallows is not checked. A site that bars all bots therefore cannot be checked at all, and no link on it is reported. The Actor identifies itself honestly and does not imitate a browser, so it also cannot check sites that only serve browsers.
- **Every new site costs an extra request.** The Actor reads each site's robots.txt before its first link, so a page with links to 40 different sites makes 40 robots.txt requests as well as 40 link checks, each about a second apart. At most 50 sites other than the ones you listed are contacted per run, and every site a request lands on counts, redirect steps included (an address you list that redirects to another site makes that site a listed one). Once 50 are used, a link that is to a new site, or would redirect to one, is not checked and gets no row (`outside-site limit`). At most 50 links are checked on any one outside site per run; the rest get no row. Links on the sites you list are bounded only by "Maximum results".
- **A GET request reads at most 256 KB of a link's target** (3 MB for a page that is read for its links). A larger target is reported as reachable (`ok` true, `broken` false) with an empty `statusCode`, `redirectCount` is empty and no more of it is read; whether its content is complete is not checked.
- **Only five kinds of tags are read:** `a` (href), `img` (src), `link` (href; `preconnect`, `dns-prefetch` and a few other non-fetching kinds are left out), `script` (src) and `iframe` (src). Links in `srcset`, `<source>`, `<area>`, `<video>`, `<audio>`, `<form>`, CSS, JavaScript, lazy-loading attributes such as `data-src`, and anything a script adds after the page loads are not found. Pages are not rendered, so a site that builds its links with JavaScript shows few or none.
- **Soft 404s are not detected.** A "page not found" page that the server sends with HTTP 200 counts as working. Fragments (`#section`) are removed and not verified.
- **Only pages are read, not everything.** From a page, only `a` links to the same site are followed, and addresses ending in file extensions such as `.pdf`, `.jpg`, `.zip`, `.css`, `.js` or `.json` are checked but not read for links. The page limit applies per site, so a large site is checked in part. A page whose address ends on another site is not read. At most 5,000 link tags per page, 3,000,000 characters of a page and 5,000 distinct links per run are looked at.
- **Redirects** are followed one step at a time, at most 5, and every step is checked against robots.txt and the address rules. A redirect that robots.txt or the address rules refuse leaves the original link without a row. The address a name resolves to is checked before each request and each redirect step; the connection itself resolves the name again, so a name that changes its answer between the two is not covered.
- **Server errors are retried.** The shared client asks again up to three times, with pauses, when a site answers with a 5xx status, before the link is reported as broken. A bot-challenge page is never retried, whatever its status code, and is not reported as broken. A rate limit (HTTP 429) is waited out once; if it persists the site counts as refusing.
- **Time limits.** Each link gets at most 45 seconds (robots.txt, download and redirects together), each page 60 seconds and 20 more for reading its markup. A link that takes longer is reported as `timeout`. A run stops early once links and pages that gave no answer have together taken more than 15 minutes; the links after that point are not checked, and the log says how many. Rows already delivered are kept. The run fails only when no start page at all could be read, and then it lists the reasons.
- A different answer in a browser is possible: some sites answer an automated client differently from a person, and a link that works in a browser can come back broken here, or the other way round.
- Uses ordinary web requests, one at a time and at least a second apart, and keeps no cookies. It does not log in, solve CAPTCHAs or work around blocks.
- Organisation-level data only: no profile or contact page is read for its content. Link text and addresses are returned as the site publishes them, so a link text or an address can contain a person's name. Email addresses in `linkText` are replaced with `[email removed]` before the text is cut to 100 characters; they are not removed from `linkUrl`, `finalUrl` and `foundOnPage`, which are delivered as they are, even if an address sits inside a query. Phone numbers in a long link text (80 characters or more with several words) are replaced with `[phone removed]`; the text is cut at 100 characters, so that rarely applies.
- Unofficial. Not affiliated with, endorsed by or sponsored by any of the sites it checks. Check each site's terms before using the data commercially.

# Actor input Schema

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

Addresses of public web pages, one per line, up to 100. The links on these pages, and on other pages of the same site that they lead to, are checked. A page that cannot be read (robots.txt disallows it, the site refuses an automated request, it is not a public address) is skipped and the run goes on; the run fails only when no start page at all could be read.

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

At most this many pages of the same site (www. and the bare name count as one site) are read for their links, breadth first from the start pages, obeying robots.txt. Every page costs about a second. Links on pages that are not read are not found.

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

Also check links that lead to other sites. Each new site costs an extra request for its robots.txt. At most 50 sites outside your own are contacted per run (redirect steps count), and at most 50 links are checked on any one outside site; links on your own sites are bounded only by Maximum results. Turn off to check only links within the sites you list.

## `maxResults` (type: `integer`):

Stop after this many checked links in total (one result is one checked link, broken or not). Pages are read first and links are checked afterwards: no further page is read once this many distinct links are collected. Links that could not be checked give no result and are not charged.

## Actor input object example

```json
{
  "startUrls": [
    "https://go.dev/doc/",
    "https://docs.python.org/3/tutorial/index.html"
  ],
  "maxPagesPerSite": 3,
  "checkExternalLinks": true,
  "maxResults": 100
}
```

# Actor output Schema

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

All result rows from the run's default dataset, as JSON.

# 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://go.dev/doc/",
        "https://docs.python.org/3/tutorial/index.html"
    ],
    "maxPagesPerSite": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigdavidson/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://go.dev/doc/",
        "https://docs.python.org/3/tutorial/index.html",
    ],
    "maxPagesPerSite": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("bigdavidson/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://go.dev/doc/",
    "https://docs.python.org/3/tutorial/index.html"
  ],
  "maxPagesPerSite": 3
}' |
apify call bigdavidson/broken-link-checker --silent --output-dataset

```

## MCP server setup

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