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

Crawl any website and find its broken links: 404s, dead external links, server errors and redirect chains, each with the pages and anchor text where it appears. One summary row per site. Half the usual price per link.

- **URL**: https://apify.com/laudedignus/broken-link-checker.md
- **Developed by:** [Mouhamed Wade](https://apify.com/laudedignus) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 links checked

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/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, Find Dead Links & 404s

Give it a website. It crawls the pages, checks every link it finds, and returns the ones that are broken, each with the pages where it appears and the text of the link, so you know exactly what to fix and where.

It also reports redirects and links it could not verify, and adds one summary row per site.

### What does it find?

| Result | Meaning |
|---|---|
| `broken` | The link answers 404, 410 or another error, the domain no longer exists, the certificate is invalid, or the redirects never end |
| `uncertain` | The link answers 401, 403, 429 or 503, times out, or the connection is cut. This is usually a login page or a site that blocks automated checks, not a dead link. Open it by hand before changing it |
| `ok` | The link works. Returned only when **Return only problem links** is off |

For every problem link you get its address, HTTP status, whether it is internal or external, its anchor text, up to five pages where it was found, how many pages use it, and where it redirects.

### Who is it for?

- **Site owners and content teams**: clean up dead links before they cost visitors and rankings.
- **SEO consultants and agencies**: deliver a fix list to a client, or check a prospect's site before a pitch.
- **Developers**: verify a migration or a redesign; schedule a weekly check and catch regressions.
- **Link builders**: find dead outbound links on a site in your niche.

### How to use it

1. Put one or more site addresses in **Websites to check**.
2. Set **Maximum pages to crawl per site** (50 by default).
3. Click **Start**. Export the results as JSON, CSV or Excel, or read them through the API.

The dataset has two views: **Problem links** and **Site summaries**.

### Input

```json
{
    "startUrls": [{ "url": "https://example.com" }],
    "maxPagesPerSite": 50,
    "checkExternalLinks": true,
    "checkImages": false,
    "onlyProblems": true,
    "respectRobotsTxt": true
}
```

| Field | Default | Description |
|---|---|---|
| `startUrls` | required | Sites to check. The crawl stays on the same domain. |
| `maxPagesPerSite` | 50 | Pages crawled per site. All links on those pages are checked. |
| `checkExternalLinks` | `true` | Also check links to other sites (checked, never crawled). |
| `checkImages` | `false` | Also check that images load. |
| `onlyProblems` | `true` | Return broken and uncertain links only. |
| `respectRobotsTxt` | `true` | Do not crawl pages disallowed by robots.txt. |
| `maxLinksPerSite` | 2000 | Safety limit on unique links checked per site. |
| `maxConcurrencyPerHost` | 3 | Parallel requests to one website. |

### Output

A problem link:

```json
{
    "type": "link",
    "site": "example.com",
    "linkUrl": "https://example.com/old-page",
    "result": "broken",
    "statusCode": 404,
    "reason": "HTTP 404",
    "linkType": "internal",
    "kind": "link",
    "anchorText": "Read the guide",
    "foundOn": ["https://example.com/", "https://example.com/blog"],
    "foundOnCount": 2,
    "finalUrl": null,
    "redirectCount": 0,
    "checkedAt": "2026-12-02T20:30:00.000Z"
}
```

A site summary:

```json
{
    "type": "summary",
    "site": "example.com",
    "ok": true,
    "pagesCrawled": 50,
    "linksChecked": 612,
    "brokenLinks": 7,
    "brokenInternal": 2,
    "brokenExternal": 5,
    "uncertainLinks": 11,
    "redirectedLinks": 48,
    "pagesSkippedByRobotsTxt": 0,
    "notice": null
}
```

### Pricing

You pay per unique link checked. A link that appears on a hundred pages is checked and charged once. Results are saved before anything is charged. Set a maximum cost per run in the run options and the Actor stops checking when it is reached.

### How it works, and its limits

- Each link is first asked for its headers only. If the answer is not a clean success, the Actor confirms with a full request before calling the link broken, because many servers answer header-only requests wrongly.
- At most 3 requests run in parallel on one website, and a site that answers "too many requests" is given a pause before one more try.
- A link that redirects to a mobile app (app store or deep link) counts as working.
- Pages are read without running JavaScript. Links that only appear after scripts run are not seen.
- The crawl follows links from the start address; pages that nothing links to are not found. For those, check your sitemap.
- Some sites block automated checks and answer 403 or 429 to every request. Their links are reported as `uncertain`, never as broken.

### FAQ

**Why is a link uncertain and not broken?** Because a wrong "broken" is worse than a cautious "uncertain": social networks and many shops refuse automated visits while the page works in a browser.

**Something looks wrong?** Open an issue in the Issues tab with the site and the run ID.

### More tools from the same developer

Same approach in each: public sources only, no login, one clear row per result, errors explained.

- [Security Headers Checker](https://apify.com/laudedignus/security-headers-audit): grade the HTTP security headers of any list of websites.
- [SEO Audit Tool](https://apify.com/laudedignus/seo-page-audit): score the on-page SEO of any list of URLs.
- [Tech Stack Detector](https://apify.com/laudedignus/tech-stack-detector): find the CMS, shop platform, analytics and hosting behind any list of websites.
- [SPF, DKIM & DMARC Checker](https://apify.com/laudedignus/email-security-audit): check SPF, DKIM and DMARC for any list of domains.
- [App Store Reviews Scraper](https://apify.com/laudedignus/app-store-reviews): get the App Store reviews of an iOS app across 50+ countries.
- [Bulk WHOIS Lookup (RDAP)](https://apify.com/laudedignus/domain-rdap-lookup): look up registration, expiry and availability for thousands of domains.
- [Sitemap URL Extractor](https://apify.com/laudedignus/sitemap-url-extractor): list every URL a website declares in its sitemaps.
- [Wayback Machine Scraper](https://apify.com/laudedignus/wayback-snapshots): list every archived capture of a page, folder or domain.
- [RSS Feed Reader](https://apify.com/laudedignus/rss-feed-reader): read RSS and Atom feeds and get only the new items on each run.

# Actor input Schema

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

One or more website addresses. The Actor crawls the pages of each site, starting from this address, and checks every link it finds.

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

The crawl stops after this many pages. Links found on those pages are all checked.

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

Also check links that point outside the site. They are checked but never crawled.

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

Also check that every image on the crawled pages loads.

## `onlyProblems` (type: `boolean`):

Return broken and uncertain links only. Turn off to get one row for every link checked, including working ones.

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

Do not crawl pages that the site's robots.txt file disallows. Links to those pages are still checked.

## `maxLinksPerSite` (type: `integer`):

Safety limit on the number of unique links checked for one site.

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

Total number of requests running at the same time.

## `maxConcurrencyPerHost` (type: `integer`):

Limit for a single website, so a small server is never overloaded.

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

A link that does not answer within this time is reported as uncertain.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://crawlee.dev"
    }
  ],
  "maxPagesPerSite": 50,
  "checkExternalLinks": true,
  "checkImages": false,
  "onlyProblems": true,
  "respectRobotsTxt": true,
  "maxLinksPerSite": 2000,
  "maxConcurrency": 10,
  "maxConcurrencyPerHost": 3,
  "timeoutSecs": 15
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://crawlee.dev"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("laudedignus/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" }] }

# Run the Actor and wait for it to finish
run = client.actor("laudedignus/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"
    }
  ]
}' |
apify call laudedignus/broken-link-checker --silent --output-dataset

```

## MCP server setup

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