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

Find broken links, images and scripts on any website. Crawls the site, checks every URL once and shows which pages contain each dead link. Also checks plain lists of URLs. HTML report, CSV and JSON output.

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

## Pricing

from $0.80 / 1,000 checked links

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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, image, script and stylesheet on a website. The Actor crawls the site, checks each unique URL once and tells you **which links are broken and which pages contain them**, so you know exactly where to fix them.

It can also check only the links on pages you list, or a plain list of URLs, without crawling.

### Who it is for

- **Site owners and developers** who want to catch 404s, dead external links and missing images before visitors do, or after a migration or redesign.
- **SEO agencies and freelancers** who need a clean broken-link report for a client, with source pages and anchor text.
- **Content teams** who schedule a weekly check and fix what turns up.
- **AI agents and automations** that need link status as structured data (JSON, CSV, Excel).

### What you get

1. **One dataset row per checked URL**, broken ones first: result, status code, a plain-English reason, link type, how many pages link to it, the pages themselves, anchor text, redirect chain and final URL.
2. **An HTML report** (`REPORT` in the key-value store) you can open in a browser or send to a client: broken links, the pages with the most broken links, links to check manually, and redirected links.
3. **A CSV of broken links by page** (`BROKEN_LINKS` in the key-value store): one line per broken link and page that contains it, ready for a developer or a spreadsheet.
4. **A JSON summary** (`OUTPUT` in the key-value store) with counts by result and status code, top broken links and what was not checked.

### How results are classified

| Result | Meaning |
|---|---|
| **broken** | The link does not work for visitors: 404, 410 and other 4xx errors, 5xx errors, a domain that does not resolve, a refused connection, a TLS certificate error, a redirect loop, or a redirect that ends in an error. |
| **uncertain** | The server refused or did not answer an automated request: 401, 403, 429, a timeout or a dropped connection. These links often work in a browser, so they are listed as "check manually" and never counted as broken. |
| **redirect** | The link works but goes through one or more redirects. The row shows every hop and the final URL. |
| **ok** | The link works. |

Each URL is checked with a lightweight `HEAD` request first. If the server answers `HEAD` with an error, the Actor tries a normal `GET` before reporting a problem, which avoids the false alarms that `HEAD`-only checkers produce.

### Three ways to use it

| Mode | What it does |
|---|---|
| **Crawl the site** (default) | Starts at your URL, follows internal links and checks every link and resource found on every page. |
| **Check the links on the pages I list** | Reads only the pages you give it and checks the links on them. Good for landing pages or a single article. |
| **Check only the URLs I list** | A bulk URL status check: no pages are read, each URL is checked once. |

### How to use it

1. Enter one or more **Start URLs**, usually the homepage.
2. Set **Maximum links to check**. Start with 1,000 to get a feel for the output.
3. Run the Actor. Open the **Output** tab for the table, or the key-value store for the `REPORT`, `BROKEN_LINKS` and `OUTPUT` records.

#### Input options

| Field | What it does | Default |
|---|---|---|
| `startUrls` | The site to crawl, or the pages or URLs to check | required |
| `mode` | `crawl`, `pages` (links on the listed pages) or `urls` (the listed URLs only) | `crawl` |
| `maxLinks` | Stop adding new links after this many unique URLs | 1000 |
| `checkExternalLinks` | Check links that point to other websites | `true` |
| `checkResources` | Check images, scripts, stylesheets, icons, frames and media files | `true` |
| `crawlScope` | `hostname`, `domain` (include subdomains) or `path` (stay in the start folder) | `hostname` |
| `useSitemap` | Also check the URLs listed in XML sitemaps | `false` |
| `respectRobotsTxt` | Respect robots.txt and `Crawl-delay` on the crawled site | `true` |
| `maxCrawlPages` | Stop reading new pages for links after this many (0 = no separate limit) | 0 |
| `maxDepth` | Maximum clicks from a start URL | 20 |
| `maxConcurrency` | Requests in parallel across all hosts | 10 |
| `excludeUrlPatterns` | Skip links whose URL matches these texts or `*` wildcards | none |
| `userAgent` | Custom User-Agent string | SiteAuditBot |

#### Example input

```json
{
    "startUrls": [{ "url": "https://www.example.com/" }],
    "maxLinks": 5000,
    "excludeUrlPatterns": ["*/calendar/*", "?replytocom="]
}
```

### Example output (one row)

```json
{
    "url": "https://www.example.com/old-pricing",
    "result": "broken",
    "isBroken": true,
    "statusCode": 404,
    "reason": "404 Not Found",
    "linkType": "internal",
    "resourceType": "link",
    "finalUrl": null,
    "redirectCount": 0,
    "redirectChain": null,
    "foundOnCount": 12,
    "foundOn": ["https://www.example.com/", "https://www.example.com/blog/launch"],
    "anchorTexts": ["See pricing", "Plans"],
    "contentType": "text/html",
    "responseTimeMs": 143,
    "method": "GET",
    "depth": 1,
    "crawled": false,
    "linksOnPage": null,
    "inSitemap": false,
    "checkedAt": "2026-11-17T12:00:00.000Z"
}
```

### Pricing

You pay per result: **$1 per 1,000 links checked**, plus Apify's small Actor start fee. Customers on Apify's Starter, Scale and Business plans pay $0.95, $0.90 and $0.80 per 1,000. There is no monthly rental and you do not pay for platform compute separately.

Every unique URL that is checked produces one result: pages, external links, images and other resources alike. A URL linked from 500 pages is still checked and charged once. Links that are not checked, for example because another site's robots.txt disallows it, are not charged.

Set **Maximum links to check**, or a maximum cost per run in Apify Console, to cap your spend. The Actor never checks more links than your limit can pay for.

| Links checked | Approximate cost |
|---|---|
| 1,000 | $1 |
| 10,000 | $10 |
| 100,000 | $100 |

### Good to know

- **HTML is read as the server sends it.** Links that JavaScript adds after the page loads are not seen, so single-page apps without server-side rendering will show few links.
- **The crawler is polite.** It identifies itself as `SiteAuditBot`, sends at most about 10 requests per second to the site it crawls and at most 2 per second to any other host, and honours `Crawl-delay` up to 3 seconds.
- **robots.txt is respected.** On the site you crawl you can turn this off if you own the site. The robots.txt files of other websites are always respected: links they disallow are listed as not checked.
- **If your firewall blocks it,** allowlist the `SiteAuditBot` user agent or set a custom User-Agent that your firewall accepts.
- **What is checked:** `a`, `area`, `img`, `script`, `link` (stylesheets and icons), `iframe`, `video`, `audio`, `source`, `track`, `embed` and `object` URLs. Links inside `noscript` are included. Files referenced only from CSS, and `srcset` variants, are not checked.
- **Not checked:** `mailto:`, `tel:` and `javascript:` links, and whether a `#fragment` exists on the target page.
- **Local addresses:** links from a public site to `localhost` or a private network address are flagged for a manual check without being requested.
- **Limits:** up to 100,000 links per run and 5 MB of HTML per page.
- **Run timeout:** a run stops at the timeout set in its run options (one hour by default) and saves everything checked up to that point. As a guide, one site is checked at up to 10 URLs per second, so allow about an hour for every 30,000 links and raise the timeout for larger or slower sites. A run stopped with **Abort gracefully** also saves what it has checked so far; **Abort now** stops at once and saves nothing.
- **Memory:** pages are read without building a document tree, so the default 1 GB is enough even for sites with very large pages.
- This is an independent tool. It is not affiliated with or endorsed by any search engine.

### FAQ

**The run finished and mentions broken links in its status. Did something go wrong?**
No. Those numbers are the links found on the website you checked. A run that completed shows the status Succeeded.

**Why is a link listed as "check manually" instead of broken?**
The server answered with 401, 403 or 429, or did not answer in time. Many sites refuse automated requests but work in a browser, so reporting them as broken would be wrong. Open them yourself to confirm.

**Why was a link not checked at all?**
Either the target site's robots.txt disallows automated requests to it, the maximum number of links was reached, or you excluded it. The report lists the counts.

**How do I see which page a broken link is on?**
Every row has `foundOn` with up to 20 pages, and the `BROKEN_LINKS` CSV has one line per broken link and page.

**Can I check a list of URLs without crawling?**
Yes. Put the URLs in Start URLs and choose "Check only the URLs I list". In that mode the link type, source pages and anchor text stay empty, because there is no site to relate them to.

**Can I schedule it?**
Yes. Use Apify schedules to run a weekly or monthly check and compare the summaries.

### Related tools

- [Technical SEO Audit & Site Crawler](https://apify.com/sitegauge/seo-audit-crawler): crawls a site and audits every URL with 57 technical and on-page SEO checks, a score per page and an HTML report.
- [Website Technology & Tech Stack Detector](https://apify.com/sitegauge/website-technology-detector): finds the CMS, e-commerce platform, analytics, frameworks and other technologies that a list of websites use.

### Feedback

Found a false positive or want something added? Open an issue on the Issues tab and it will be looked at.

Source code: [github.com/sitegaugeHQ/broken-link-checker](https://github.com/sitegaugeHQ/broken-link-checker) (MIT licence).

# Actor input Schema

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

The site to crawl, usually its homepage. In the other two modes these are the pages whose links are checked, or the URLs to check.

## `mode` (type: `string`):

Crawl a whole site, check only the links on the pages you list, or check a plain list of URLs.

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

The run stops adding new links after this many unique URLs. Every checked URL counts as one result, including the pages that are crawled.

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

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

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

Also check the images, scripts, stylesheets, icons, frames and media files that pages load.

## `crawlScope` (type: `string`):

Which pages are read for links in crawl mode. Links that lead outside the scope are still checked, but not followed.

## `useSitemap` (type: `boolean`):

Read the sitemaps listed in robots.txt and /sitemap.xml and check the URLs in them too (crawl mode only).

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

Skip disallowed URLs and honour Crawl-delay on the site you crawl. Turn this off only for a site you own or are authorised to test. The robots.txt files of other websites are always respected.

## `maxCrawlPages` (type: `integer`):

Stop reading new pages for links after this many. 0 means no separate limit; Maximum links to check still applies.

## `maxDepth` (type: `integer`):

How many clicks from a start URL the crawler follows links.

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

How many requests run at the same time across all hosts. Requests to any single host are always spaced out.

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

Links whose URL contains one of these texts are not checked. Use \* as a wildcard to match a whole URL, for example https://example.com/calendar/\*.

## `userAgent` (type: `string`):

Leave empty to identify as SiteAuditBot. Set a custom value if your firewall only allows a specific user agent.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://crawlee.dev/"
    }
  ],
  "mode": "crawl",
  "maxLinks": 100,
  "checkExternalLinks": true,
  "checkResources": true,
  "crawlScope": "hostname",
  "useSitemap": false,
  "respectRobotsTxt": true,
  "maxCrawlPages": 0,
  "maxDepth": 20,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

No description

## `report` (type: `string`):

No description

## `brokenLinksCsv` (type: `string`):

No description

## `summary` (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/"
        }
    ],
    "maxLinks": 100
};

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

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

```

## MCP server setup

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