# Broken Link Checker & Bulk HTTP Status Code Checker (`wellbuilt_seahare/broken-link-checker`) Actor

Find broken links (404s, 5xx, dead domains) on any website, or bulk check HTTP status codes and redirect chains for a URL list or sitemap. Each URL gets status code, final URL, redirects, response time, content type and the page + anchor text it was found on. Honors robots.txt.

- **URL**: https://apify.com/wellbuilt_seahare/broken-link-checker.md
- **Developed by:** [Kossin Labs](https://apify.com/wellbuilt_seahare) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 urls 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 & Bulk HTTP Status Code Checker

Find broken links (404s, 5xx, dead domains) on any website, or bulk check HTTP status codes and redirect chains for a URL list or sitemap. Each URL gets status code, final URL, redirects, response time, content type and the page + anchor text it was found on. Honors robots.txt.

**Good for:** broken link checker, dead link checker, 404 checker, bulk HTTP status code checker, redirect checker, redirect chain checker, website link audit, sitemap URL checker.

### What you get

Real rows from a default run on November 29, 2026 (a 20-page crawl of kossinlabs.com plus 3 demo URLs; a few columns shown, every row has more fields):

| URL | Result | Status | Final status | Redirects | Response ms | Link type | Found on | Anchor text |
|---|---|---|---|---|---|---|---|---|
| https://kossinlabs.com/ | ok | 200 | 200 | 0 | 79 | internal | https://kossinlabs.com/ | Kossin Labs |
| https://kossinlabs.com/tools/ | ok | 200 | 200 | 0 | 99 | internal | https://kossinlabs.com/ | Data tools |
| https://apify.com/wellbuilt_seahare/sec-edgar-filings | ok | 200 | 200 | 0 | 701 | external | https://kossinlabs.com/ | Try it on Apify |
| https://kossinlabs.com/tools | redirected | 308 | 200 | 1 | 140 | input |  |  |
| https://kossinlabs.com/index.html | redirected | 308 | 200 | 1 | 447 | input |  |  |
| https://kossinlabs.com/this-page-does-not-exist/ | broken | 404 | 404 | 0 | 63 | input |  |  |
| https://x.com/kossinlabs | blocked_by_robots |  |  | 0 |  | external | https://kossinlabs.com/ | X: @kossinlabs |

That run checked 133 unique URLs from 20 crawled pages in about a minute at 256 MB: 130 ok, 2 redirected, 1 broken, 2 blocked by robots.txt (not charged).

### Three ways to use it

- **Crawl a website for broken links.** Add a start URL. The Actor crawls same-site pages up to *Max pages to crawl*, then checks every link it found (internal and external) and tells you the page and anchor text of each one.
- **Bulk HTTP status code and redirect check.** Paste a list of URLs. Each gets its status code, redirect chain, final URL, response time and content type. Nothing is crawled.
- **Sitemap check.** Add one or more XML sitemaps (or sitemap indexes, .xml.gz too). Every listed URL is status-checked, and you can optionally scan those pages for broken links as well.

You can combine all three in one run. Each unique URL is checked once.

### Use cases

- SEO audits: find 404s, dead outbound links and long redirect chains before they hurt rankings
- Site migrations and redesigns: check that every old URL redirects to the right new page, and how many hops it takes
- Content teams: get a fix list with the exact page and anchor text of every broken link
- Bulk HTTP status checks for backlink lists, ad landing pages, affiliate links or a CSV export of URLs
- Sitemap health checks: confirm every URL in your sitemap returns 200 and isn't redirected
- Scheduled weekly link monitoring, with results sent to Slack, Google Sheets or a webhook

### How to use it

1. Open the Broken Link Checker on the Apify Store and click Try for free (Apify's free plan includes monthly credit).
2. To audit a website, put its home page in **Websites to crawl**, for example `https://example.com/`, and set **Max pages to crawl** (default 20). Every link on those pages is checked, including links to other sites.
3. To check a list instead, paste URLs into **URLs to check**, one per line, or add a sitemap such as `https://example.com/sitemap.xml`. Each URL gets its status code, redirect chain and final URL.
4. Optional: turn on **Only output broken URLs** for a short table, **Also check images, scripts and stylesheets**, or add **Exclude URLs containing** patterns like `/tag/`.
5. Click Start. The default run (a 20-page crawl plus 3 demo URLs) finished in about a minute.
6. Open the **Where each URL was found** view to see each broken link's source page and anchor text, then download CSV, Excel or JSON, or schedule the run weekly.

Step-by-step guide: [How to find broken links and check HTTP status codes in bulk](https://kossinlabs.com/tools/broken-link-checker/)

### Input

| Field | What it does |
|---|---|
| Websites to crawl | Start pages; same-site pages are crawled and every link found is checked |
| URLs to check | Plain list for a bulk HTTP status / redirect check (no crawling) |
| Sitemap URLs | XML sitemaps or sitemap indexes; every URL is status-checked |
| Max pages to crawl | Pages opened and scanned for links (default 20) |
| Max URLs per sitemap / in total | Spend control (defaults 200 and no limit) |
| Check external links | Also check links to other sites (default on; never crawled) |
| Also check images, scripts and stylesheets | Check img, script, CSS, icon, media and iframe URLs too |
| Only output broken URLs | Keep the table short; every URL is still checked |
| Count 401/403/429 as broken | Off by default: these are reported as 'restricted' |
| Exclude URLs containing | Skip URLs with these strings or /regex/ (free) |

Example:

```json
{
  "startUrls": [
    "https://example.com/"
  ],
  "maxPages": 50,
  "checkExternalLinks": true,
  "urls": [
    "https://example.com/old-pricing",
    "example.com/blog"
  ],
  "sitemapUrls": [
    "https://example.com/sitemap.xml"
  ],
  "maxUrlsPerSitemap": 500,
  "onlyBroken": true,
  "excludeUrlPatterns": [
    "/tag/",
    "?replytocom="
  ]
}
```

### Output fields

| Field | Meaning |
|---|---|
| url | The URL that was checked |
| broken | true for 4xx/5xx (except restricted codes) and unreachable URLs |
| result | ok, redirected, broken, restricted or blocked_by_robots |
| statusCode | First HTTP status code (e.g. 301, 200, 404) |
| finalStatusCode | Status code after following redirects |
| finalUrl | Where the URL ends up |
| redirected / redirectCount / redirectChain | Whether it redirects, how many hops, and each hop's URL, status and Location |
| responseTimeMs | Time to response headers, summed over all hops |
| contentType / contentLength | From the final response headers |
| linkType | internal, external, or input (from your list or sitemap) |
| scannedAsPage / linksFoundOnPage | Whether the page was crawled for links, and how many links it had |
| sourcePage / anchorText | First crawled page the link was found on, and its link text |
| foundOnCount / foundOn | How many crawled pages link to it, and up to 10 of them with anchor text |
| tags | Where it was found: a, img, script, css, icon, iframe... |
| error | Why it is broken, restricted or blocked |
| checkedAt | ISO timestamp |

A real redirect row from the default run:

```json
{
  "url": "https://kossinlabs.com/index.html",
  "broken": false,
  "result": "redirected",
  "statusCode": 308,
  "finalStatusCode": 200,
  "finalUrl": "https://kossinlabs.com/",
  "redirected": true,
  "redirectCount": 1,
  "redirectChain": [
    {
      "url": "https://kossinlabs.com/index.html",
      "statusCode": 308,
      "location": "https://kossinlabs.com/"
    }
  ],
  "responseTimeMs": 447,
  "contentType": "text/html; charset=utf-8",
  "contentLength": null,
  "linkType": "input",
  "scannedAsPage": false,
  "linksFoundOnPage": null,
  "sourcePage": null,
  "anchorText": null,
  "foundOnCount": 0,
  "foundOn": [],
  "tags": [],
  "error": null,
  "checkedAt": "2026-11-29T12:52:18.326Z"
}
```

A real external link row from the same run (foundOn trimmed to 2 pages):

```json
{
  "url": "https://apify.com/wellbuilt_seahare/sec-edgar-filings",
  "broken": false,
  "result": "ok",
  "statusCode": 200,
  "finalStatusCode": 200,
  "finalUrl": "https://apify.com/wellbuilt_seahare/sec-edgar-filings",
  "redirected": false,
  "redirectCount": 0,
  "redirectChain": [],
  "responseTimeMs": 701,
  "contentType": "text/html; charset=utf-8",
  "contentLength": null,
  "linkType": "external",
  "scannedAsPage": false,
  "linksFoundOnPage": null,
  "sourcePage": "https://kossinlabs.com/",
  "anchorText": "Try it on Apify",
  "foundOnCount": 3,
  "foundOn": [
    {
      "pageUrl": "https://kossinlabs.com/",
      "anchorText": "Try it on Apify",
      "tag": "a",
      "nofollow": false
    },
    {
      "pageUrl": "https://kossinlabs.com/tools/",
      "anchorText": "Try it on Apify",
      "tag": "a",
      "nofollow": false
    }
  ],
  "tags": [
    "a"
  ],
  "error": null,
  "checkedAt": "2026-11-29T12:52:49.619Z"
}
```

From a bulk list run the same day: `https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404` returned 301 to `https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404` (200), and `https://this-domain-should-not-exist-kl12345.com/` was broken with `DNS lookup failed (ENOTFOUND)`.

Two dataset views are included: **Checked URLs** (status, redirects, timing) and **Where each URL was found** (source page and anchor text). A run summary with counts is saved to the key-value store as `SUMMARY`.

### Pricing

It costs the same $1.00 per 1,000 as the most-used broken link checker on the Store, and one Actor covers all three jobs: crawling a site for broken links, bulk status checks for a URL list, and sitemap checks.

Pay per URL checked: **$1.00 per 1,000 URLs checked**. You pay $1.00 per 1,000 unique URLs checked (crawled pages, links found on them, and URLs from your list or sitemaps), so a 20-page site with about 130 unique links costs about 13 cents. URLs blocked by robots.txt, excluded URLs and duplicates are free. Apify also adds its standard tiny per-run start fee. Set a maximum charge per run and the Actor stops cleanly when it's reached (checked on the platform: a run with a $0.02 cap stopped at 19 URLs). Apify's free plan includes monthly platform credit, enough to try it on real data.

### Integrations and API

Every run's results can be downloaded as **JSON, CSV, Excel, XML or HTML**, or fetched through the **Apify API** (REST, plus official JavaScript and Python clients). You can also:

- **Schedule** runs daily or weekly in Apify Console, for ongoing link monitoring.
- Send results to **Make, Zapier, n8n**, Google Sheets, Slack, webhooks and other Apify integrations.
- Let **AI agents** call it through the **Apify MCP server** (mcp.apify.com) from Claude, Cursor, VS Code and other MCP clients. Input fields have plain descriptions and examples so an agent can fill them in correctly.

### Politeness and limits

- robots.txt is honored for every request and every redirect hop (user agent `KossinLabsLinkChecker`), including Crawl-delay up to 10 s.
- At most 2 requests at a time per host, at least 250 ms apart. One retry on timeouts, 429 and 503 (Retry-After respected up to 5 s).
- Plain HTTP GET only: no JavaScript rendering, no form submits, no logins. Links that only appear after JavaScript runs are not found in crawl mode.
- Pages larger than 4 MB are read only up to 4 MB for link extraction.

### FAQ

**What counts as a broken link?**\
Any URL that ends in HTTP 404, 410, another 4xx or a 5xx error, or that can't be reached at all (DNS failure, refused or dropped connection, TLS certificate error, timeout, redirect loop or more than 10 redirects). Each row has broken true or false, a result (ok, redirected, broken, restricted or blocked_by_robots) and an error message that says why.

**Why is a link marked 'restricted' and not broken?**\
HTTP 401, 403, 429 and 999 usually mean bot protection or a login wall (LinkedIn returns 999, for example), and the page often works fine in a browser. They are reported as restricted with broken = false so your fix list isn't full of false alarms. Turn on 'Count 401/403/429 as broken' if you want them flagged.

**Does it show where each broken link is?**\
Yes. In crawl mode every link row has sourcePage and anchorText for the first page it was found on, foundOnCount for how many crawled pages link to it, and a foundOn list with up to 10 pages and their anchor text.

**Does it follow redirects?**\
Yes, hop by hop. Each row has the first status code (for example 301 or 308), the final status code, the final URL, the number of redirects and the full redirect chain. Every hop is checked against that site's robots.txt.

**Does it respect robots.txt and crawl politely?**\
Yes. Every request is checked against the site's robots.txt for the KossinLabsLinkChecker user agent, and Crawl-delay is honored (up to 10 seconds). It sends at most 2 requests at a time to one host with at least 250 ms between them, never submits forms and doesn't run JavaScript. URLs blocked by robots.txt are listed as blocked_by_robots and are free.

**Does it crawl other websites?**\
No. Only pages on the start URL's site are crawled (www. included, subdomains optional). Links to other sites are checked once each but never crawled.

**Does it collect personal data?**\
No. It records URLs, status codes, headers like content type, and the visible link text. Email addresses in link text are removed, and mailto:, tel: and Cloudflare email-protection links are skipped.

**What does it cost?**\
$1.00 per 1,000 unique URLs checked, plus Apify's standard $0.00005 start fee. Each URL is checked and charged once per run even if 50 pages link to it. Robots-blocked, excluded and duplicate URLs are free.

### Support

Found a bug, a wrong status or want a new option? Open an issue on the Issues tab. Issues are checked daily. If the Actor saves you time, a quick review helps other people find it.

Made by [Kossin Labs](https://kossinlabs.com/tools/). Not affiliated with any of the websites, platforms or companies mentioned.

# Actor input Schema

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

Start pages to crawl (e.g. https://example.com/). The Actor follows links on the same site up to 'Max pages to crawl' and checks every link it finds (internal and, if enabled, external), recording the page and anchor text each link was found on. Leave empty to only check the URL list or sitemaps below.

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

A plain list of URLs to check, one per line. Each one gets its status code, redirect chain and final URL; pages are not crawled. A bare domain like example.com is checked as https://example.com/. Duplicates are removed.

## `sitemapUrls` (type: `array`):

XML sitemaps or sitemap indexes (e.g. https://example.com/sitemap.xml, .xml.gz works too). Every URL listed is status-checked, up to 'Max URLs per sitemap'. Turn on 'Also scan sitemap pages for broken links' to check the links on those pages as well.

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

How many same-site pages to open and scan for links (start URLs count). Every link found on these pages is checked. Default 20.

## `maxUrlsPerSitemap` (type: `integer`):

How many URLs to take from each sitemap, in sitemap order. Default 200.

## `scanSitemapPages` (type: `boolean`):

When on, sitemap URLs are opened as pages (up to 'Max pages to crawl') and every link on them is checked too. When off, sitemap URLs are only status-checked.

## `maxUrls` (type: `integer`):

Stop after checking this many URLs across all inputs (0 = no limit). Use it to cap cost. The run also stops cleanly at your maximum charge per run.

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

Also check links that point to other websites (they are checked, never crawled). Turn off to check only your own site's links.

## `checkResources` (type: `boolean`):

Besides <a href> links, check img, script, stylesheet, icon, video/audio source and iframe URLs found on crawled pages.

## `includeSubdomains` (type: `boolean`):

Treat subdomains (e.g. blog.example.com when starting at example.com) as the same site and crawl them. www. is always treated as the same site.

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

Save only broken URLs to the dataset. Every URL is still checked and counted, so the price is the same; this just keeps the table short.

## `treatRestrictedAsBroken` (type: `boolean`):

By default HTTP 401, 403, 429 and 999 are reported as result 'restricted' (usually bot protection or a login wall, the page often works in a browser) and broken = false. Turn on to flag them as broken.

## `excludeUrlPatterns` (type: `array`):

Skip any URL that contains one of these strings (e.g. /tag/, ?replytocom=) or matches a /regex/. Skipped URLs are neither crawled nor checked nor charged.

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

URLs checked in parallel overall (1-30). The Actor never sends more than 2 requests at a time to one host and waits at least 250 ms (or the site's robots.txt Crawl-delay, up to 10 s) between them.

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

Give up on a URL after this many seconds (5-60) and report it as broken with 'Request timed out'. Default 15.

## Actor input object example

```json
{
  "startUrls": [
    "https://kossinlabs.com/"
  ],
  "maxPages": 20,
  "maxUrlsPerSitemap": 200,
  "scanSitemapPages": false,
  "maxUrls": 0,
  "checkExternalLinks": true,
  "checkResources": false,
  "includeSubdomains": false,
  "onlyBroken": false,
  "treatRestrictedAsBroken": false,
  "maxConcurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

Dataset with one row per checked URL.

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

Counts of ok, redirected, broken, restricted and robots-blocked URLs.

# 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": [
        "https://kossinlabs.com/"
    ]
};

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

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

```

## MCP server setup

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