# Broken Link Checker: Crawl a Website, Find 404s & Dead Links (`goldensky_api/website-broken-link-checker`) Actor

Crawl a website or a list of pages and find broken links, dead redirects and missing images. Each result says where the link is. Links we cannot check are free.

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

## Pricing

from $1.50 / 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: find 404s and dead links on any website

Give it a page or a whole site. It reads the pages, finds every link, and tells you which ones are **broken**, which **redirect**, and where each one sits, so you know which page to fix. **Failures are free:** you pay only for links that get a real verdict. Links a site would not let us check (bot check, 403, 429, timeout) cost nothing and are never called broken.

**$1.50 per 1,000 links checked** (about $0.0015 a link, less on higher Apify plans). Start a run for pennies; a 25-page site with 600 links costs about $0.90.

### What you get for each link

- the link, its **verdict**: `ok`, `redirect` or `broken`, and the HTTP code and reason (`HTTP 404`, `domain name does not exist`, `redirect loop`, `connection failed (ECONNREFUSED)`)
- **the pages it was found on** (first ten, plus how many), and the **link text**, so a person can find and fix it
- for redirects: where it ends up, every hop, and whether it is permanent (301/308)
- how fast the link answered

### What it checks

- links on every page it reads (`<a href>`, image maps) and, if you turn it on, **images**
- internal links, and links to **other sites** (checked with one request each, never crawled)
- redirects, followed by hand, hop by hop; loops and long chains are reported as broken
- sites that refuse `HEAD` requests: it asks again with `GET`

### Honest by design

- **It never gets around a bot check.** A Cloudflare-style challenge page, a 403 or a 429 means the site does not want a robot looking. The row says `blocked`, is free, and is **not** reported as broken, because the link may be fine for a person.
- A timeout is `timeout`, free, not broken: it may be our network.
- It reads `robots.txt` and does not crawl pages it asks robots to avoid (turn off in the input if it is your own site).
- Social networks, video platforms, search-result pages and AI chat apps are not read. Private and internal addresses are refused (so it cannot be pointed at your network).
- No login, no cookies, no browser: plain HTTP, which is why it is cheap and fast. Pages that build their links with JavaScript only will show fewer links.

### Price against the alternatives (Apify Store, checked 2026-11-21)

| Actor | Price per 1,000 links |
|---|---|
| This Actor | $1.50 (failures free) |
| khadinakbar/broken-link-checker | $1.00 |
| parseforge/broken-link-checker | $1.20 |
| logiover/bulk-url-status-checker | $2.50 |
| automation-lab/sitewide-broken-link-checker | $0.92 |

We charge a little more than the cheapest because you are not charged for blocked, timed-out or refused links, and every row tells you where to fix it. Prices change; check the Store.

### Input

| Field | What it does |
|---|---|
| Pages to check | Start pages. Same-site links are followed. |
| Most pages to read / How many clicks deep | Crawl limits (defaults 20 pages, 2 clicks). Set depth 0 to check only the pages you list. |
| Check links to other sites | On by default |
| Check images | Off by default |
| Respect robots.txt | On by default |
| Most links to check | Cost cap (default 1,000). One result row says how many were left. |

The default input checks two pages of crawlee.dev and finishes in a few seconds.

### Output (example)

```json
{
  "action": "link",
  "url": "https://example.com/old-pricing",
  "status": "success",
  "linkStatus": "broken",
  "httpStatus": 404,
  "reason": "HTTP 404",
  "type": "internal",
  "foundOn": ["https://example.com/", "https://example.com/blog/launch"],
  "foundOnCount": 2,
  "anchorText": ["Pricing"],
  "charged": true
}
```

`status` is `success` for every link that got a verdict (ok, redirect or broken). Other values (`blocked`, `timeout`, `refused`, `skipped`, `http_error`) are free and say why in `message`. Filter on `linkStatus: "broken"` for the fix list.

### For AI agents and MCP

Call this Actor to audit a site before a launch or a migration. Input: `startUrls` (array of `{url}`), `maxPages`, `maxDepth`. Output: dataset rows, one per link; fix list = rows where `linkStatus == "broken"`, each with `foundOn` pages. A run that finds nothing to check fails instead of returning an empty success. Rows that are not verdicts have a `status` other than `success` and were not charged.

### Limits

- Pages are read as plain HTML; links added by JavaScript after load are not seen.
- Up to 500 pages and 10,000 links per run; at most 4 requests at once to the same site.
- It does not check `mailto:`, `tel:` or `#anchors`.

# Changelog

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

# Actor input Schema

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

Public http(s) pages to start from. Links to other pages on the same site are followed up to the depth and page limits below. Addresses on private networks, social networks, video platforms, search-result pages and AI chat apps are refused.

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

How many pages of the site are read for links. Use 1 to check only the pages you listed.

## `maxDepth` (type: `integer`):

0 reads only the pages you listed. 1 also reads the pages they link to on the same site, and so on.

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

On: links that leave the site are checked too (one request each, never crawled). Off: only links inside the site.

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

Also checks the address of every image on the pages.

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

Pages the site's robots.txt asks crawlers to avoid are not read. Links to them are still checked.

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

Links past the limit are not checked and not charged; one result row says how many were left.

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

At most 4 of them go to the same site at the same time, whatever this is set to.

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

A link that does not answer in this time is reported as 'timeout' and not charged: it may be our network, not a dead link.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://crawlee.dev/"
    }
  ],
  "maxPages": 2,
  "maxDepth": 1,
  "checkExternal": false,
  "checkImages": false,
  "respectRobotsTxt": true,
  "maxLinks": 100,
  "concurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `links` (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://crawlee.dev/"
        }
    ],
    "maxPages": 2,
    "maxDepth": 1,
    "checkExternal": false,
    "maxLinks": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("goldensky_api/website-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://crawlee.dev/" }],
    "maxPages": 2,
    "maxDepth": 1,
    "checkExternal": False,
    "maxLinks": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("goldensky_api/website-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://crawlee.dev/"
    }
  ],
  "maxPages": 2,
  "maxDepth": 1,
  "checkExternal": false,
  "maxLinks": 100
}' |
apify call goldensky_api/website-broken-link-checker --silent --output-dataset

```

## MCP server setup

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