# Broken Link Checker - Find 404s and Dead Links on Any Website (`uianalize/broken-link-checker`) Actor

Crawl one or many websites and get every broken link (404, 410, 5xx, timeouts, DNS and SSL errors) with the page where it appears and its anchor text. Internal and external links. Pay per page crawled.

- **URL**: https://apify.com/uianalize/broken-link-checker.md
- **Developed by:** [Webstack Data](https://apify.com/uianalize) (community)
- **Categories:** SEO tools, Developer tools
- **Security:** 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 page crawleds

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 one or many websites. It crawls each site within its own domain and checks **every link it finds, internal and external**. You get a table of broken links with:

- the broken URL and the HTTP status (404, 410, 500…) or the network error (timeout, DNS not found, SSL error, connection refused)
- the **page where the link appears** and its **anchor text**, so you can fix it in minutes
- whether the link is internal or external

Each site also gets a summary row with pages crawled, links checked and broken links found.

### Who is it for?

- **SEO agencies and freelancers**: run link audits for many client sites at once and export them to CSV or Excel.
- **Site owners and marketers**: find dead links after a migration, redesign or content clean-up.
- **Developers and QA**: add it to a release check through the Apify API or a schedule.
- **Content teams**: catch outbound links to sources that have disappeared.

### Input

```json
{
  "startUrls": ["example.com", "https://blog.example.org"],
  "maxPagesPerSite": 50,
  "checkExternalLinks": true,
  "respectRobotsTxt": true
}
```

### Output (one row per broken link)

```json
{
  "type": "broken-link",
  "site": "example.com",
  "brokenUrl": "https://example.com/old-pricing",
  "statusCode": 404,
  "error": "HTTP_404",
  "isExternal": false,
  "foundOnPage": "https://example.com/blog/launch",
  "anchorText": "see our pricing",
  "checkedAt": "2026-11-02T10:00:00.000Z"
}
```

### Pricing

Pay per event: a small fee per run plus a fee per **page crawled**. Checking the links on those pages costs nothing extra. You choose the maximum pages per site and can set a maximum cost per run; the Actor stops when it is reached.

### Good to know

- It only follows links inside the domain you give it, respects robots.txt by default and uses a polite concurrency.
- Links are checked with a HEAD request and a GET fallback, so servers that refuse HEAD are not reported as broken.
- Some sites block automated requests (403/429). Those are reported as they are, so you can review them.
- It reads public pages only. It does not log in or collect personal data.

### Integrations

Schedule it weekly, call it from the Apify API, or connect it to Make, Zapier, n8n, Google Sheets or an AI agent via the Apify MCP server.

***

#### En español

Rastrea una o varias webs y te da todos los enlaces rotos (404, 5xx, timeouts, errores DNS/SSL) con la página donde aparecen y su texto. Pagas por página rastreada.

# Actor input Schema

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

Websites or start pages to check, one per line (e.g. example.com). Each one is crawled within its own domain.

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

How many pages of each site to crawl. Every link found on those pages is checked.

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

Also check links that point to other domains.

## `ignoreNofollow` (type: `boolean`):

Do not check links marked rel="nofollow".

## `includeBlockedLinks` (type: `boolean`):

Also list links whose server refused the automated check (401, 403, 429, LinkedIn 999). They usually work in a browser, so they are only counted in the summary by default.

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

Do not crawl pages disallowed by the site's robots.txt.

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

Parallel requests per site. Keep it low to be polite to the site.

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

How long to wait for each page or link before reporting a timeout.

## Actor input object example

```json
{
  "startUrls": [
    "apify.com"
  ],
  "maxPagesPerSite": 50,
  "checkExternalLinks": true,
  "ignoreNofollow": false,
  "includeBlockedLinks": false,
  "respectRobotsTxt": true,
  "maxConcurrency": 5,
  "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": [
        "apify.com"
    ]
};

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

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

```

## MCP server setup

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