# Broken Link Checker: 404s, Redirects and Final Status per Link (`accountable_eel/broken-link-checker-lookup`) Actor

Broken link checker for a page or sitemap: one row per link with source page, anchor text, final HTTP status, redirect target and internal or external. Sites that refuse the check are marked blocked, not broken.

- **URL**: https://apify.com/accountable_eel/broken-link-checker-lookup.md
- **Developed by:** [Adriana Voss](https://apify.com/accountable_eel) (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 $0.45 / 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: 404s, Redirects and Final Status per Link

Paste a web page or a sitemap and get **one row per link on it**: the page it sits on, its anchor
text, whether it points inside or outside the site, the final HTTP status, and where a redirect
ends up. Dead links are flagged `dead`; sites that simply refuse an automated check are flagged
`blocked`, never `broken`, so the list you hand to an editor is not full of false alarms. No API
key, no account, no proxy of your own.

### Who it's for

- **SEO and content teams** auditing a site for 404s and redirected internal links before a
  migration or a relaunch.
- **Editors and writers** checking every outbound link in a long article, a docs page or a
  newsletter, with the anchor text so the fix is easy to find.
- **Agencies** reporting dead links to a client page by page, or straight from the client's
  sitemap.
- **Developers** wiring a link check into a scheduled run, an n8n flow or a Clay table, with the result as plain JSON or CSV.

### Use it from an AI agent

In Claude, Cursor or any client with the Apify MCP server, ask for "Broken Link Checker: 404s, Redirects, Final Status" and give it a page or sitemap address. The agent gets back one row per link with the anchor text, the final status and the redirect target, so it can answer "which links on this page are dead" or "where does the old pricing link go now" from live data. Set `show` to "Broken links only" and `maxLinksPerPage` to 50 or less for a quick answer: each link checked is one more request.

### What you get

One flat row per distinct link on the page:

| What | Columns |
| --- | --- |
| Where it is | `sourcePage`, `anchorText`, `linkUrl`, `linkType` (internal or external), `occurrences`, `nofollow` |
| The verdict | `linkStatus`, `isBroken`, `statusCode`, `reason` |
| Where it goes now | `finalUrl`, `redirectKind`, `redirectCount`, `redirectChain` |
| Details | `blockedBy`, `contentType`, `responseTimeMs`, `scrapedAt` |
| Page totals on every row | `linksFound`, `linksChecked`, `brokenCount`, `redirectedCount`, `blockedCount`, `unreachableCount`, `truncated` |

Three example rows, shortened, read from `https://www.python.org/` on 2026-11-04:

| linkUrl | anchorText | linkType | linkStatus | statusCode | finalUrl | redirectKind |
| --- | --- | --- | --- | --- | --- | --- |
| https://www.python.org/ | Python | internal | alive | 200 | https://www.python.org/ | |
| https://docs.python.org/ | Docs | external | redirected | 200 | https://docs.python.org/3/ | same-site |
| https://www.linkedin.com/company/python-software-foundation/ | | external | blocked | 403 | | |

#### What each status means

| `linkStatus` | Meaning | Charged |
| --- | --- | --- |
| `alive` | Answers normally at the address on the page. | yes |
| `redirected` | Works, but at another address. `redirectKind` says how far it moved: `same-page` (https, www or a trailing slash), `same-site`, `other-site`, or `to-homepage` (a deep link that now lands on a front page, usually meaning the content is gone). | yes |
| `dead` | 404, 410, another error status, a domain that no longer exists, a refused connection or an invalid certificate. | yes |
| `blocked` | The site refused the check (403, 429, a login wall, a bot-protection page). Probably fine in a browser, so **not** called dead. | no |
| `unreachable` | No answer after two attempts. It cannot be said whether the link is dead. | no |

### How to use

1. **In the Apify Console.** Open the actor page and click **Start** — the `urls` field is already pre-filled with a working example. Results land in the run's dataset as soon as each item is found.
2. **Via the API.** Call it directly with a POST request — no Console needed once you have an API token:
   ```bash
   curl "https://api.apify.com/v2/acts/accountable_eel~broken-link-checker-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"urls":["https://www.python.org/"]}'
   ```
3. **On a schedule.** Save this actor as an Apify **Task** with the input you want, then add a **Schedule** (hourly, daily, weekly) so it runs on its own — no server of your own required.

### Input

```json
{
  "urls": [
    "https://www.python.org/"
  ]
}
```

One web page or sitemap URL per line. Every link on the page is opened and its final status is reported. A sitemap URL checks every address listed in it. Accepted formats: https://www.python.org/, docs.apify.com/platform, https://example.com/sitemap.xml.

`urls` is a list of web page or sitemap addresses. A sitemap address checks every address listed
in it (a sitemap index is refused: paste one of the files listed inside it). Each page gives one
row per distinct link; a page that cannot be read comes back as one row with `"found": false`
and a `message`, and is never charged.

### Output

One row per item, for example:

| query | found | status | linksFound | linksChecked | linkCount | brokenCount | redirectedCount | blockedCount | unreachableCount | truncated | links | sourcePage | linkUrl | anchorText | linkType | occurrences | nofollow | linkStatus | isBroken | statusCode | reason | finalUrl | redirectKind | redirectCount | redirectChain | blockedBy | contentType | responseTimeMs | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| https://www.python.org/ | true | OK | <distinct links on the page> | <links checked> | <links billed> | <broken links> | <redirected links> | <links the site refused to show us> | <links with no answer> | <more links on the page than were checked> | \<all links found (full list)> | <page the link is on> | <link address> | <anchor text> | <internal or external> | <times the link appears on the page> | <marked nofollow> | <verdict> | <is broken> | <http status> | <reason> | <final address> | <redirect kind> | <redirect hops> | <redirect chain> | <blocked by> | <content type> | \<response time (ms)> | 1970-01-01T00:00:00.000Z |

A miss comes back as a row with `"found": false` and is never charged.

### Example runs

Three inputs that need no credentials of any kind. Paste one into the Input tab and press Start.
Run 1 is the run the sample rows above come from (30 links checked in 4 seconds); runs 2 and 3
are the same actor with other settings.

**1. Every link on a page, capped at 30**

```json
{
  "urls": ["https://www.python.org/"],
  "maxLinksPerPage": 30
}
```

**2. Only the broken and redirected internal links of a page**

```json
{
  "urls": ["https://www.python.org/about/"],
  "linkScope": "internal",
  "show": "problems"
}
```

**3. Every address in a sitemap (swap in your own sitemap)**

```json
{
  "urls": ["https://example.com/sitemap.xml"],
  "maxLinksPerPage": 200,
  "show": "broken"
}
```

### Pricing

Pay-per-event. A flat per-run fee covers session/proxy warmup; you're billed
per item only when data is actually found and returned — see
`.actor/pay_per_event.json` for exact prices. A miss is never charged.

You pay once per link that got a verdict, and nothing else:

- A blocked link, an unreachable link and a page that could not be read are free.
- "Which results to return" is applied after the check: choose "Broken links only" and you pay for
  the broken links only, while the counts on each row still cover the whole page.
- "Most links to check per page" (default 100, at most 500) and "Stop after this many results" put a
  ceiling on a long run.

### Use it from Clay, n8n, Make, or an AI agent

This actor runs synchronously over plain HTTP — call it directly from a script, a workflow tool, or an AI agent, no Apify Console needed once you have an API token.

```bash
curl "https://api.apify.com/v2/acts/accountable_eel~broken-link-checker-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.python.org/"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~broken-link-checker-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"urls":["https://www.python.org/"]}` (swap in an expression from an earlier node for a real value).

**Clay.** Add an "HTTP API" column: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~broken-link-checker-lookup/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"urls":["{{page}}"]}`, mapping the row's page into the `urls` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "Broken Link Checker: 404s, Redirects, Final Status" — the agent will find and run this actor.

### Where the data comes from

- **The links** are read from the page's own HTML (`<a href>`; relative addresses are resolved
  against the page or its `<base>` tag), or from the `<loc>` entries of a sitemap.
- **The status and the redirect chain** come from opening each link once with a normal browser
  request and following every redirect by hand. Page bodies are not downloaded.

### Limits, stated plainly

- **It reads the HTML the server sends.** Links that a page builds with JavaScript after loading
  are not seen.
- **A blocked link is not a verdict.** Some sites refuse every request that does not come from a
  home connection (LinkedIn, for one). Those rows say `blocked` and are free. Open them in a
  browser to be sure.
- **A page that says "not found" with status 200 counts as alive.** The check reads the status and
  the redirects, not the text. A deep link redirected to a front page is flagged `to-homepage`.
- **One page at a time.** It does not crawl: to cover a site, paste its sitemap or a list of its
  pages.
- **At most two requests at a time to any one site**, so a page with many links to the same host
  takes a little longer. Server errors (5xx) and timeouts are retried once.
- **It does not read other sites' robots.txt.** It opens the links you point it at, the way a
  browser would.
- **No login, no cookies.** A link that only works when signed in is reported as `blocked` with
  the reason `LOGIN_REQUIRED`.

### Data & privacy

The actor opens the pages and links you give it and keeps nothing between runs. Rows contain
public web addresses and anchor text as they appear on the page.

### FAQ

**Why is a link I can open in my browser reported as `blocked`?**
The site refuses automated requests. The row is free, and `blockedBy` names the protection when it
could be identified.

**Does it check images, scripts and stylesheets?**
No, only links (`<a href>`).

**The same link is on the page ten times. Do I pay ten times?**
No. Each address appears once; `occurrences` says how often it is linked.

**Do I need a proxy?**
No.

### Related actors

- **Link Rot Checker** for a plain list of URLs, with the newest Wayback Machine copy of each dead one.
- **Redirect Chain Tracer** for every hop of a redirect.
- **Sitemap URL Discovery** to get the list of pages of a site.
- **Technical SEO Audit** for one scored row per domain.

# Actor input Schema

## `urls` (type: `array`):

One web page or sitemap URL per line. Every link on the page is opened and its final status is reported. A sitemap URL checks every address listed in it. Accepted formats: https://www.python.org/, docs.apify.com/platform, https://example.com/sitemap.xml. You're only charged for the ones we actually find — a miss costs nothing.

## `maxLinksPerPage` (type: `integer`):

Links beyond this are skipped (the row says more were available). You pay per link checked, so this is also your budget control. Up to 500.

## `linkScope` (type: `string`):

Applied before anything is opened, so skipped links are neither checked nor billed.

## `show` (type: `string`):

Applied after checking. You pay only for the links returned, and the broken-link counts on the row still cover the whole page.

## `testRun` (type: `boolean`):

Turn this on to test your input on a small sample before running the full list. Turn it off to process everything.

## `onlyFound` (type: `boolean`):

Only keep rows where something was actually found. Misses are always free, whether or not you show them here.

## `includeKeywords` (type: `array`):

Optional. Only keep results that mention at least one of these words (e.g. a job title, a city, a product name). Leave empty to keep everything.

## `excludeKeywords` (type: `array`):

Optional. Drop any result that mentions one of these words. Leave empty to skip nothing.

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

Optional. Stop the run once this many results have been found — useful for a quick, cheap sample. Leave blank for no limit.

## `columns` (type: `array`):

Choose which pieces of information to include in each result row. All are included by default.

## `expandRows` (type: `boolean`):

When on, each link found gets its own row instead of being grouped under its page. You're still only charged once per page, no matter how many rows it produces.

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

Parallel requests. Keep conservative — this target has no browser fallback, so getting blocked costs more than slow-and-steady.

## `proxyConfiguration` (type: `object`):

Apify Proxy config. Residential recommended for anti-bot-sensitive targets.

## Actor input object example

```json
{
  "urls": [
    "https://www.python.org/"
  ],
  "maxLinksPerPage": 100,
  "linkScope": "all",
  "show": "all",
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "columns": [
    "linksFound",
    "linksChecked",
    "linkCount",
    "brokenCount",
    "redirectedCount",
    "blockedCount",
    "unreachableCount",
    "truncated",
    "links",
    "sourcePage",
    "linkUrl",
    "anchorText",
    "linkType",
    "occurrences",
    "nofollow",
    "linkStatus",
    "isBroken",
    "statusCode",
    "reason",
    "finalUrl",
    "redirectKind",
    "redirectCount",
    "redirectChain",
    "blockedBy",
    "contentType",
    "responseTimeMs"
  ],
  "expandRows": true,
  "maxConcurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `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 = {
    "urls": [
        "https://www.python.org/"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/broken-link-checker-lookup").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 = {
    "urls": ["https://www.python.org/"],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/broken-link-checker-lookup").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 '{
  "urls": [
    "https://www.python.org/"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/broken-link-checker-lookup --silent --output-dataset

```

## MCP server setup

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

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/jWUHWUzkbGT24d83Y/builds/NSpAK6ynqdfN0ySDV/openapi.json
