# Broken Link Checker & Bulk URL Status Checker (404s, Redirects) (`kramer_labs/broken-link-checker`) Actor

Find broken links (404s, dead pages, DNS errors) on any website, or bulk-check a list of URLs for status codes, redirect chains, and response time. Uses the site's sitemap, shows which page each broken link is on. $0.80 per 1,000 links checked.

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

## Pricing

$0.80 / 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 Checker

**Find every broken link on a website and the page it's on.** Or paste any list of URLs and get each one's status code, redirect chain, final URL, and response time. No setup and no browser, at cents per thousand links.

- **Scan a whole site:** type `yoursite.com`. Pages come from the site's sitemap (or by following internal links if there isn't one), and every link on them is checked: internal and outbound.
- **Shows where each broken link lives:** `foundOn` lists up to 5 pages linking to it, so you know exactly what to edit.
- **Bulk status check:** thousands of URLs → status, redirects (301 → 200), final URL, ms.
- **Fewer false alarms:** sites that block bots (401/403/429, social networks) are marked `restricted`, not `broken`. Servers that refuse `HEAD` requests are re-checked with `GET`.
- **Polite and safe:** obeys every site's robots.txt, and sends at most 4 requests at a time to any one server.

### Sample output (real, python.org, Oct 2026)

30 pages scanned, 2,000 links found: 1,829 checked and 171 skipped by robots.txt, in about a minute. Summary row:

```json
{
  "type": "summary",
  "website": "python.org",
  "checked": 1829,
  "pages": 30,
  "broken": 4,
  "restricted": 5,
  "skippedByRobotsTxt": 171,
  "redirected": 114,
  "brokenUrls": [
    "http://mcsp.wartburg.edu/zelle/python/",
    "http://pragprog.com/book/gwpy2/practical-programming",
    "http://wiki.python.org/moin/TkInter",
    "http://code.activestate.com/recipes/langs/python/"
  ]
}
```

One broken link (a redirect that ends in a 404):

```json
{
  "type": "link",
  "url": "http://wiki.python.org/moin/TkInter",
  "status": 404,
  "verdict": "broken",
  "finalUrl": "https://wiki.python.org/moin/TkInter",
  "redirects": 1,
  "redirectChain": [301],
  "responseMs": 41,
  "linkType": "external",
  "foundOn": ["https://www.python.org/about/apps/"],
  "website": "python.org"
}
```

`verdict` is `ok`, `broken` (404/410/5xx, DNS failure, refused connection, timeout), `restricted` (the server blocks automated checks; open it in a browser to confirm), or `skipped` (the site's robots.txt asks crawlers not to visit; not checked and not charged).

### How to use

1. **Websites** to scan for broken links, and/or **URLs** to status-check.
2. Optional: **only output problems** (broken, restricted, redirected), **check links to other websites**, **max pages** and **max links** per website.
3. Run, then export from the Dataset tab (JSON, CSV, Excel, or API). Schedule it weekly to catch new broken links.

#### Sample input

```json
{ "websites": ["python.org"], "onlyProblems": true, "maxPagesPerWebsite": 30 }
```

```json
{ "urls": ["https://example.com", "http://github.com", "https://example.com/old-page"] }
```

### Pricing

- **$0.0008 per link checked** ($0.80 per 1,000), with pages scanned counted as links.
- **No start fee.** Websites that can't be reached and links skipped because of robots.txt cost nothing. Use "max links per website" to cap the cost; the default cap is 2,000 links ($1.60).

### Who it's for

- **SEO and site owners:** fix 404s and redirect chains that waste crawl budget and annoy readers
- **Agencies:** a client-ready broken-link report in minutes, on a schedule
- **Migrations:** paste the old URL list and confirm every page redirects to the right place
- **Developers and AI agents:** check that URLs in a dataset, docs, or LLM output actually resolve

### Works well with

- [Sitemap URL Extractor](https://apify.com/kramer_labs/sitemap-url-extractor): get every URL a site lists, then status-check them here
- [WHOIS Domain Lookup](https://apify.com/kramer_labs/domain-lookup): expiry, registrar, and DNS for the domains you link to

### FAQ

**Does it run JavaScript?** No. It reads the HTML the server sends. Sites built entirely with JavaScript return no links. You'll see a note in the summary, and the pages themselves are still checked.
**Why "restricted" and not "broken"?** LinkedIn, X, Instagram, and many firewalls reject automated requests even when the page is fine in a browser. We don't call those broken.
**Does it check images or scripts?** Only links (`<a href>`) for now.

More tools from the same studio: [Kramer Labs](https://kramer-labs.netlify.app/).

### Data source and responsible use

This Actor only makes ordinary web requests to public pages and follows each site's robots.txt (RFC 9309). It doesn't log in, bypass blocks or CAPTCHAs, or collect personal data. Use it on sites you own or manage, or to check links you publish, and follow the terms of the sites you check.

# Actor input Schema

## `websites` (type: `array`):

Domains or homepages, e.g. "yoursite.com". Pages come from the site's sitemap (or by following internal links if there is none). Every link on those pages is checked.

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

Any list of URLs. Each gets its status code, redirect chain, final URL, and response time.

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

Only save broken, restricted, and redirected links. A summary row per website is always saved. You still pay for every link checked.

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

Also check outbound links (to other domains). Turn off to check only your own site's links.

## `maxPagesPerWebsite` (type: `integer`):

How many of the site's pages to read for links.

## `maxLinksPerWebsite` (type: `integer`):

Caps cost. Includes the pages themselves.

## Actor input object example

```json
{
  "websites": [
    "apify.com"
  ],
  "onlyProblems": false,
  "checkExternalLinks": true,
  "maxPagesPerWebsite": 100,
  "maxLinksPerWebsite": 2000
}
```

# Actor output Schema

## `links` (type: `string`):

No description

## `allResults` (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 = {
    "websites": [
        "apify.com"
    ]
};

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

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

```

## MCP server setup

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