# Broken Link Checker & Bulk URL Status (`elabstudio/broken-link-checker`) Actor

Crawl a website and find every broken link (404, 5xx, DNS, SSL, timeouts, redirect loops), or check a plain list of URLs. Shows status code, full redirect chain, final URL, the pages each link was found on and its anchor text. $0.50 per 1,000 links.

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

## Pricing

from $0.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 & Bulk URL Status

Find every broken link on a website in minutes, or check a plain list of URLs. Fast HTTP-only checker (no browser), so it is cheap: **$0.50 per 1,000 links**, and you can choose to pay only for the broken ones.

### What it does

- **Crawl mode**: give one or more start pages. The Actor follows internal links (up to *Max pages*) and checks every link it finds, internal and external.
- **List mode**: paste URLs (backlinks, sitemap export, ad landing pages). Each one is checked once.
- Detects **404 / 410, 5xx, DNS errors, SSL errors, timeouts, connection refused, redirect loops, too many redirects** and bot protection (e.g. LinkedIn 999).
- Records the **full redirect chain** and final URL, so you can also find 301/302 chains to clean up.
- Tells you **where each link was found** (up to 50 pages) and its **anchor text**, so fixing is quick.
- Uses HEAD first and falls back to GET when servers reject HEAD, to avoid false alarms.

### Output (one row per unique link)

| field | example |
|---|---|
| url | https://example.com/old-page |
| ok | false |
| statusCode | 404 |
| errorType | NOT_FOUND / SERVER_ERROR / DNS_ERROR / SSL_ERROR / TIMEOUT / REDIRECT_LOOP / BOT_PROTECTION ... |
| likelyFalsePositive | true for 429/403/999 answers from bot-protected sites (Instagram, LinkedIn ...) |
| finalUrl, redirectCount, redirectChain | where redirects end up |
| linkType, isInternal | link / img / script / stylesheet |
| foundOn, foundOnCount, anchorTexts | pages that contain the link |
| responseTimeMs, checkedAt | |

A `SUMMARY` record in the key-value store gives pages crawled, links checked, broken and redirected counts.

### Tips

- Turn on **Save only broken links** to get a short to-do list and pay only for broken rows.
- Use **Max links** to cap cost on very large sites.
- Schedule it weekly on Apify and connect a webhook or Slack integration to get alerted when new broken links appear.

### Pricing

Pay per event: $0.0005 per saved link row (= $0.50 per 1,000) plus a tiny start fee. Links that are checked but not saved (when *only broken* is on) are free.

Made by E:LAB STUDIO (elab-studio.com). Issues and feature requests are welcome in the Issues tab.

# Actor input Schema

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

Start pages. The Actor follows internal links up to 'Max pages' and checks every link it finds.

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

Each URL is checked once (no crawling). Use this for backlink lists, sitemaps or exported link lists.

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

Internal pages to open per run.

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

Hard limit on unique links checked (and billed).

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

Also check links pointing to other domains.

## `includeAssets` (type: `boolean`):

Also check <img>, <script>, <iframe> and stylesheet URLs.

## `onlyBroken` (type: `boolean`):

Only broken links are saved and billed. All links are still checked.

## `includeBlocked` (type: `boolean`):

Sites like Instagram or LinkedIn often answer 429/403/999 to automated checkers even when the page exists. These rows are marked likelyFalsePositive and skipped in 'only broken' mode unless you turn this on.

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

How many requests run at the same time.

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

Give up on a URL after this many seconds.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPages": 50,
  "maxLinks": 2000,
  "checkExternal": true,
  "includeAssets": false,
  "onlyBroken": false,
  "includeBlocked": false,
  "concurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

One row per checked link with status, error type, redirect chain and source pages.

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

Counts for this 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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        }
    ]
};

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

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

```

## MCP server setup

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