# Broken Link Checker: Crawl a Site, 404s, Dead Links & Images (`arnaud437/broken-link-checker`) Actor

Crawl a website and check every link and image: 404s, dead domains and errors listed per page, with link text, status code and error. External links too.

- **URL**: https://apify.com/arnaud437/broken-link-checker.md
- **Developed by:** [Open Data Tools](https://apify.com/arnaud437) (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 $2.10 / 1,000 page 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: Crawl a Site, 404s, Dead Links & Images

Give a **start page**, the checker **crawls the site** and checks **every link and image** of each page: **404s**, **410s**, **server errors**, **dead domains** and **timeouts**, listed per page with the **link text**, **status code** and **error**. Links to **other sites** are checked too, and links blocked by robot protection are kept apart so they are not mistaken for broken ones. Fast and cheap: **$3.00 per 1,000 pages**.

### What you get

One row per page read:

- **Page URL** and its **status code**.
- Number of **links checked**, **working**, **broken**, **blocked** and **not checked**.
- **Broken links**: URL, type (**link** or **image**), **link text** or alt text, **status code** or **error**.
- **Blocked links**: answers such as 401, 403, 429 or 999 that usually mean "no robots" (LinkedIn, some shops) rather than "page gone".
- **Not checked**: links whose site forbids robots in its robots.txt.

Each link is checked once per site, even when many pages share it.

### Use cases

- **SEO**: broken links waste crawl budget and hurt rankings; find them before Google does.
- **Site migrations**: check that no page still links to the old URLs.
- **Agencies**: a list of fixes for each client site, with the exact page and link text.
- **Content teams**: find dead sources in old articles.

### How to use

- **Without changing anything**: the start page only of the Wikipedia article on web scraping, which links to some dead sites, and example.com.
- **Start pages**: one per line, up to 1,000 per run. The checker follows links of the same site (with or without www).
- **Maximum pages per site**: 1 checks only the start page; up to 500.
- **Check links to other sites** and **Check images**: on by default.

### Input example

```json
{
  "urls": ["https://en.wikipedia.org/wiki/Web_scraping"],
  "maxPagesPerSite": 1,
  "checkExternal": true,
  "checkImages": true
}
```

### Output example

```json
{
  "recordType": "page",
  "id": "https://en.wikipedia.org/wiki/Web_scraping",
  "url": "https://en.wikipedia.org/wiki/Web_scraping",
  "input": "https://en.wikipedia.org/wiki/Web_scraping",
  "site": "en.wikipedia.org",
  "statusCode": 200,
  "linkCount": 348,
  "okCount": 275,
  "brokenCount": 9,
  "blockedCount": 5,
  "skippedCount": 59,
  "brokenLinks": [
    {
      "url": "http://www.gooseeker.com/en/node/knowledgebase/freeformat",
      "type": "link",
      "text": "Semantic annotation based web scraping",
      "status": 404,
      "error": null
    }
  ],
  "blockedLinks": [
    {
      "url": "https://www.jstor.org/stable/example",
      "type": "link",
      "text": "JSTOR",
      "status": 403,
      "error": null
    }
  ],
  "skippedLinks": [],
  "status": "ok",
  "sourceName": "Links of en.wikipedia.org",
  "sourceUrl": "https://en.wikipedia.org/wiki/Web_scraping",
  "licence": "Status codes any visitor receives; page text is not kept",
  "sourceUpdatedAt": null,
  "actorVersion": "0.1.1",
  "retrievedAt": "2026-11-19T13:05:44.218Z"
}
```

### Pricing

Pay per event: **$3.00 per 1,000 pages checked** (`page-checked`, $0.003 each, all the links of the page included), plus Apify's start fee of $0.00005 per run. A start page that does not answer and text that is not a URL give a **free** error row.

| Pages        | Price |
| ------------ | ----- |
| 100 pages    | $0.30 |
| 1,000 pages  | $3.00 |
| 10,000 pages | $30   |

### Data source

The answers each site gives any visitor: one HEAD request per link (a GET when a server refuses HEAD), up to 500 links per page, four at a time, with a pause between requests to the same site. Each site's robots.txt is respected. Page text is read to find links and is not kept.

### Is it legal?

Checking a link sends the same request a browser sends when someone clicks it. The checker waits between requests to the same site, follows robots.txt, never visits private addresses and keeps no page content.

### FAQ

- **Why "blocked" and not "broken"?** Some sites answer 403 or 999 to every robot while the page works in a browser: they are listed apart so you can check them by hand.
- **Why are some links "not checked"?** Their site's robots.txt asks robots not to visit them.
- **Does it run JavaScript?** No: links added by JavaScript only are not seen.

### Related Actors

- [Sitemap Extractor](https://apify.com/arnaud437/sitemap-extractor): All URLs of a Site, Lastmod & Priority
- [Website Logo Finder](https://apify.com/arnaud437/website-logo-finder): Logos, Favicons & Brand Colors
- [Redirect Checker](https://apify.com/arnaud437/redirect-checker): Full Chain, Status Codes, Loops & Timing
- [SSL Certificate Checker](https://apify.com/arnaud437/ssl-certificate-checker): Expiry, Issuer, Chain, HSTS & Grade
- [Website to Markdown](https://apify.com/arnaud437/website-to-markdown): Fast Crawler for LLM & RAG (No Browser)

Every Actor here also works as a tool for AI agents (Claude, ChatGPT, Cursor…) through [Apify’s MCP server](https://mcp.apify.com).

### Changelog

See [CHANGELOG.md](CHANGELOG.md).

### En français

#### Tous les liens cassés d'un site, page par page

Donnez une page de départ : l'outil parcourt le site et vérifie chaque lien et chaque image. Il liste les erreurs 404, les domaines morts et les délais dépassés, avec le texte du lien et le code d'erreur. Les liens bloqués par une protection anti-robots sont mis à part.

#### Prix

3,00 $ les 1 000 pages. Les lignes d'erreur sont gratuites.

#### Source et légalité

Les réponses que chaque site donne à tout visiteur. Une requête par lien, robots.txt respecté, aucun contenu gardé.

# Changelog

This Actor's version history is a separate document: https://apify.com/arnaud437/broken-link-checker/changelog.md

# Actor input Schema

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

One page per line, usually a home page. The checker follows the links of the same site from there. Without http:// or https://, it starts from https://. Up to 1,000 per run.

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

Pages of the same site read from each start page (1 to 500). Each page read is one charged row; 1 checks the start page only.

## `checkExternal` (type: `boolean`):

Also check links that leave the site.

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

Also check the images of each page.

## Actor input object example

```json
{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "example.com"
  ],
  "maxPagesPerSite": 1,
  "checkExternal": true,
  "checkImages": true
}
```

# Actor output Schema

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

One row per page read: links checked, broken links with their text, status code and error, links blocked by robot protection.

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

Pages checked, error rows, and dates of the run.

# 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://en.wikipedia.org/wiki/Web_scraping",
        "example.com"
    ],
    "maxPagesPerSite": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("arnaud437/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 = {
    "urls": [
        "https://en.wikipedia.org/wiki/Web_scraping",
        "example.com",
    ],
    "maxPagesPerSite": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("arnaud437/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 '{
  "urls": [
    "https://en.wikipedia.org/wiki/Web_scraping",
    "example.com"
  ],
  "maxPagesPerSite": 1
}' |
apify call arnaud437/broken-link-checker --silent --output-dataset

```

## MCP server setup

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