# Link Rot Checker: Dead Links with Closest Archived Copy (`accountable_eel/link-rot-check`) Actor

Broken link checker for a list of URLs. One row per link: alive, redirected or dead, the HTTP status, the full redirect chain and, for every dead link, the newest working copy in the Wayback Machine to replace it with. Blocked and unreachable links are never charged.

- **URL**: https://apify.com/accountable_eel/link-rot-check.md
- **Developed by:** [Adriana Voss](https://apify.com/accountable_eel) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.60 / 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

## Link Rot Checker: Dead Links with Closest Archived Copy

Paste a list of URLs and get one row per link: **alive, redirected or dead**, the HTTP status, the
full redirect chain, and for every dead link the **newest copy the Wayback Machine saved while the
page still worked**, ready to use as the replacement. A broken link checker that also hands you the
fix. No API key, no account, no proxy.

### Who it's for

- **Content and SEO teams** cleaning outbound links in a blog, a docs site or a knowledge base, who
  need the dead ones and something to point them at instead.
- **Researchers, librarians and editors** checking the references of a paper, a report or a wiki
  article for link rot, and swapping in an archived address where the source is gone.
- **Newsletter and course authors** checking every link before a send or a relaunch.
- **Developers and agencies** auditing the links of a site they inherited, straight from a sitemap
  or a database export.

### What you get

One flat row per link:

| What | Columns |
| --- | --- |
| The verdict | `sourceUrl`, `linkStatus`, `isBroken`, `statusCode`, `reason` |
| Where it goes now | `finalUrl`, `redirectKind`, `redirectCount`, `redirectChain` |
| The replacement | `archiveStatus`, `archivedUrl`, `archivedAt` |
| Details | `blockedBy`, `contentType`, `responseTimeMs`, `scrapedAt` |

Three example rows, shortened. They are the three pre-filled links, read on 2026-10-11:

| sourceUrl | linkStatus | statusCode | reason | archiveStatus | archivedUrl | archivedAt |
| --- | --- | --- | --- | --- | --- | --- |
| https://example.com/ | alive | 200 | OK | NOT_CHECKED | | |
| https://example.com/this-page-does-not-exist | dead | 404 | HTTP_404 | NONE | | |
| https://www.google.com/reader/about/ | dead | 404 | HTTP_404 | FOUND | https://web.archive.org/web/20210503140021/https://www.google.com/reader/about/ | 2021-05-03T14:00:21Z |

#### What each status means

| `linkStatus` | Meaning | Charged |
| --- | --- | --- |
| `alive` | Answers normally at the address you gave. | yes |
| `redirected` | Works, but at another address. `redirectKind` says how far it moved. | 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). The page is probably fine in a browser, so it is **not** called dead. | no |
| `unreachable` | No answer after two attempts. It cannot be said whether the link is dead. | no |

#### What each redirect type means

| `redirectKind` | Meaning |
| --- | --- |
| `same-page` | Only `https`, `www` or a trailing slash changed. Nothing to fix. |
| `same-site` | Another page on the same site. |
| `other-site` | Another site. The original may be gone, so an archived copy is looked up. |
| `to-homepage` | A deep link that now lands on a front page. The content is usually gone even though the status is 200, so an archived copy is looked up. |

### How to use Link Rot Checker

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~link-rot-check/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
     -X POST \
     -H "Content-Type: application/json" \
     -d '{"urls":["https://example.com","https://example.com/this-page-does-not-exist","https://www.google.com/reader/about/"]}'
   ```
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://example.com",
    "https://example.com/this-page-does-not-exist",
    "https://www.google.com/reader/about/"
  ]
}
```

One URL per line. Each one is opened the way a browser would open it, redirects are followed, and you get back whether it is alive, redirected or dead. A dead link also gets the newest copy the Wayback Machine saved while the page still worked. Accepted formats: https://example.com/some/page, example.com/pricing, http://old-site.org/article.html.

### Output

| query | found | status | sourceUrl | linkStatus | isBroken | statusCode | reason | finalUrl | redirectKind | redirectCount | redirectChain | archiveStatus | archivedUrl | archivedAt | blockedBy | contentType | responseTimeMs | scrapedAt |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| https://example.com | true | OK | <link checked> | <link status> | <broken> | <http status> | <reason> | <final url> | <redirect type> | <redirects> | <redirect chain> | <archived copy> | <archived copy url> | <archived on> | <blocked by> | <content type> | \<response time (ms)> | 1970-01-01T00:00:00.000Z |

A line that is not a web link, a blocked link and an unreachable link come back as one row with
`"found": false` and a `message` that says why. They are never charged.

### Example runs

Three inputs that need no credentials of any kind and return rows as they stand. Paste one into the
Input tab and press Start.

**1. Which of these links are dead, and what can replace them?**

```json
{
  "urls": [
    "https://example.com",
    "https://example.com/this-page-does-not-exist",
    "https://www.google.com/reader/about/"
  ],
  "checkArchive": true
}
```

**2. A permanent archived address next to every reference, working or not**

```json
{
  "urls": [
    "https://www.w3.org/TR/html401/",
    "https://www.rfc-editor.org/rfc/rfc2616",
    "https://example.com"
  ],
  "checkArchive": true,
  "archiveLiveLinks": true
}
```

**3. A fast status and redirect pass over a list, dead links only in the result**

```json
{
  "urls": [
    "http://example.com",
    "https://example.org/missing-page",
    "https://www.iana.org/domains/example"
  ],
  "checkArchive": false,
  "includeKeywords": ["dead"]
}
```

### Pricing

Pay-per-event. A flat per-run fee covers session/proxy warmup; each independent
source is billed under its own event, only when that source actually returns
data — 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 line that is not a URL are free.
- The archived copy is included in the price of the link. There is no separate charge for it.
- A row hidden by "Only keep rows containing" is not returned and not charged, so example 3 above
  pays for the dead links only.
- Use "Stop after this many results" to put a ceiling on a long list.

### 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~link-rot-check/run-sync-get-dataset-items?token=<YOUR_TOKEN>" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://example.com","https://example.com/this-page-does-not-exist","https://www.google.com/reader/about/"]}'
```

**n8n.** Add an HTTP Request node: Method `POST`, URL `https://api.apify.com/v2/acts/accountable_eel~link-rot-check/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body Content Type `JSON`, JSON Body `{"urls":["https://example.com","https://example.com/this-page-does-not-exist","https://www.google.com/reader/about/"]}` (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~link-rot-check/run-sync-get-dataset-items?token=<YOUR_TOKEN>`, Body `{"urls":["{{link}}"]}`, mapping the row's link into the `urls` array.

**MCP.** In Claude, Cursor, or any MCP client with the Apify MCP server, ask for "broken link checker" — the agent will find and run this actor.

### Where the data comes from

- **The status and the redirect chain** come from opening each link once with a normal browser
  request and following every redirect. Page bodies are not downloaded.
- **The archived copy** comes from the Internet Archive's public Wayback Machine index. The row
  carries the newest capture taken while the page still answered normally, not a capture of the
  error page that replaced it.

### Limits, stated plainly

- **A blocked link is not a verdict.** Some sites refuse every request that does not come from a
  home connection. 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 of the page. A deep link that was redirected to a front page is
  flagged as `to-homepage`.
- **The Wayback Machine throttles bulk lookups.** On a long list with very many dead links it may
  stop answering part-way. Those rows say `RATE_LIMITED` or `ERROR` in `archiveStatus`, which means
  "not known this run", never "no copy exists". Run those links again later.
- **`NONE` means no working capture.** A page the archive only ever saved as an error page has no
  copy worth linking to.
- **One moment in time.** A server that was down for the two attempts is reported as it was.
  Server errors (5xx) are retried once before they count as dead.
- **It checks the links you give it.** It does not crawl a site to find links.
- **No login, no cookies, no JavaScript.** A link that only works when signed in is reported as
  `blocked` with the reason `LOGIN_REQUIRED`.

### Data & privacy

The actor opens the URLs you list and reads the public Wayback Machine index. It stores nothing
between runs and returns no personal data beyond what your own URLs contain.

### 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.

**Why does a dead link have no archived copy?**
Either the Wayback Machine never saved the page while it worked (`NONE`), or it did not answer
during this run (`ERROR`, `RATE_LIMITED`).

**Is the archived copy the closest one to today?**
Yes: it is the most recent capture in which the page still returned a normal response.

**Can I check thousands of links?**
Yes. Status checks run in parallel, with no more than two requests at a time to any one site, so a
thousand links take a few minutes. An archive lookup can take 10 to 15 seconds and they run three
at a time, which is about 900 dead links an hour. For a list with more dead links than that, turn
"Find an archived copy for broken links" off for a first pass, then run the dead ones again with it
on.

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

### Related actors

- **HTTP Status Lookup** for status and headers only.
- **Redirect Chain Tracer** for every hop of a redirect.
- **Wayback Machine Snapshot Lookup** for a site's first and last capture and its age.
- **Soft 404 Detector** for pages that say "not found" with status 200.
- **Sitemap URL Discovery** to get the list of URLs to check.

# Actor input Schema

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

One URL per line. Each one is opened the way a browser would open it, redirects are followed, and you get back whether it is alive, redirected or dead. A dead link also gets the newest copy the Wayback Machine saved while the page still worked. Accepted formats: https://example.com/some/page, example.com/pricing, http://old-site.org/article.html. You're only charged for the ones we actually find — a miss costs nothing.

## `checkArchive` (type: `boolean`):

On: every dead link, and every link that now lands on a front page or on another site, gets the newest Wayback Machine copy saved while the page still worked. Off: status and redirects only, which is faster on a long list. The price per link is the same either way.

## `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.

## `archiveLiveLinks` (type: `boolean`):

Turn this on to get a permanent archived address next to every link, for a citation list or a reference section. It adds one archive lookup per link, so a long list takes longer.

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

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

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

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

## Actor input object example

```json
{
  "urls": [
    "https://example.com",
    "https://example.com/this-page-does-not-exist",
    "https://www.google.com/reader/about/"
  ],
  "checkArchive": true,
  "testRun": false,
  "onlyFound": false,
  "includeKeywords": [],
  "excludeKeywords": [],
  "archiveLiveLinks": false,
  "columns": [
    "sourceUrl",
    "linkStatus",
    "isBroken",
    "statusCode",
    "reason",
    "finalUrl",
    "redirectKind",
    "redirectCount",
    "redirectChain",
    "archiveStatus",
    "archivedUrl",
    "archivedAt",
    "blockedBy",
    "contentType",
    "responseTimeMs"
  ],
  "maxConcurrency": 10
}
```

# 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://example.com",
        "https://example.com/this-page-does-not-exist",
        "https://www.google.com/reader/about/"
    ],
    "includeKeywords": [],
    "excludeKeywords": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("accountable_eel/link-rot-check").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://example.com",
        "https://example.com/this-page-does-not-exist",
        "https://www.google.com/reader/about/",
    ],
    "includeKeywords": [],
    "excludeKeywords": [],
}

# Run the Actor and wait for it to finish
run = client.actor("accountable_eel/link-rot-check").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://example.com",
    "https://example.com/this-page-does-not-exist",
    "https://www.google.com/reader/about/"
  ],
  "includeKeywords": [],
  "excludeKeywords": []
}' |
apify call accountable_eel/link-rot-check --silent --output-dataset

```

## MCP server setup

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

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/KXIWUcXfUwFCDl5aC/builds/o9AxhAbcKGY4Qhi2o/openapi.json
