# Broken Link Checker: Find 404s & Dead Links (`digitalni.produkty.pro.zivot/broken-link-checker`) Actor

Crawl your website and find every broken link (404, 410, 5xx, dead domains, timeouts), malformed link and optional redirect, with the exact pages and anchor texts where each one appears. Pay per crawled page, not per link.

- **URL**: https://apify.com/digitalni.produkty.pro.zivot/broken-link-checker.md
- **Developed by:** [Digitální produkty pro život](https://apify.com/digitalni.produkty.pro.zivot) (community)
- **Categories:** SEO tools, Developer tools
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 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 & Dead Links

Crawl your whole website and find **every broken link**: 404 and 410 pages, server errors, dead domains, timeouts and malformed links. For each problem you get the **exact pages where the link appears and its anchor text**, so you can fix it in minutes.

**Pay per crawled page, not per link.** A typical page has 50–150 links, and they are all checked for the price of one page.

### What it checks

- **Internal links**: every page of your site is crawled and every link on it is followed.
- **External links**: links to other websites are checked (not crawled).
- **Optional**: images, JavaScript, CSS and iframes, plus **redirects** (great for SEO clean-ups).
- **Smart re-checks**: links are first checked with a fast HEAD request, and anything suspicious is re-checked like a real browser to avoid false alarms. Sites that block bots (LinkedIn, Facebook…) are reported separately and hidden by default.
- **Polite crawling**: respects robots.txt and limits parallel requests per host.

### Output

One row per problematic link, sorted by severity and frequency:

```json
{
  "url": "https://apify.github.io/fingerprint-suite/docs/guides/fingerprint-generator/",
  "status": "broken",
  "httpStatus": 404,
  "reason": "Not found",
  "linkType": "external",
  "occurrences": 1,
  "foundOnPages": 1,
  "foundOn": [
    { "page": "https://crawlee.dev/js/docs/guides/got-scraping", "text": "Header Generator documentation", "tag": "a" }
  ]
}
```

`status` is one of `broken`, `error` (unreachable: DNS, timeout, SSL), `invalid` (malformed URL), `redirect` and `blocked`. The `SUMMARY` record has totals: pages crawled, links checked, broken, redirects and more.

### Use cases

- **SEO audits**: broken links hurt rankings and waste crawl budget.
- **Website maintenance**: schedule a weekly run and get an e-mail or Slack message when something breaks.
- **Agencies**: check client sites in bulk and attach the CSV to reports.
- **Content migrations**: verify that nothing broke after a redesign or domain move.

### Tips

- Start small with **Max pages** (e.g. 100) to see the results and cost, then raise it.
- Use **Ignore URLs matching** for endless filters, calendars or cart links (e.g. `\?sort=`, `/cart`).
- Turn on **Report redirects** to find links you should update to their final URL.

### Questions or ideas?

Open an issue on the **Issues** tab. Feature requests are welcome.

### How to use it via API

You can run the Actor from the Apify Console, on a schedule, or from your own code. Get your API token in Apify Console → Settings → Integrations.

**Python**

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("digitalni.produkty.pro.zivot/broken-link-checker").call(run_input={
    "startUrls": [
        "https://crawlee.dev"
    ],
    "maxPages": 100
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**JavaScript / Node.js**

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_API_TOKEN>' });
const run = await client.actor('digitalni.produkty.pro.zivot/broken-link-checker').call({
    "startUrls": [
        "https://crawlee.dev"
    ],
    "maxPages": 100
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

### Integrations and AI agents

- Export results as **JSON, CSV, Excel, XML or HTML**, or open them directly in **Google Sheets**.
- Connect to **Make, Zapier, n8n, Slack, Google Drive, Airbyte** or any **webhook** to get broken links on a website into your workflow automatically.
- Use it from **AI agents and LLM apps** (Claude, ChatGPT, Cursor, LangChain…) through the **Apify MCP server**: the agent can call this Actor as a tool.
- **Schedule** runs (hourly, daily, weekly) to keep data fresh without any code.

### FAQ

**How much does it cost?**
$2 per 1,000 crawled pages, all links on each page included. A 100-page website costs $0.20.

**Will it flag links that work in a browser?**
Suspicious links are re-checked like a real browser to avoid false alarms, and sites that block bots (LinkedIn, Facebook…) are reported separately.

**Can I check my site regularly?**
Yes. Schedule the Actor weekly and get notified by email or Slack when new broken links appear.

### More tools from the same developer

All tools with code examples: [github.com/Phenixik/apify-actors](https://github.com/Phenixik/apify-actors)

- [Sitemap URL Extractor](https://apify.com/digitalni.produkty.pro.zivot/sitemap-url-extractor): every URL from a website's sitemaps
- [PageSpeed & Lighthouse Audit](https://apify.com/digitalni.produkty.pro.zivot/pagespeed-audit): bulk Core Web Vitals and SEO scores
- [Website Screenshot](https://apify.com/digitalni.produkty.pro.zivot/website-screenshot): full-page, mobile and PDF screenshots
- [Domain WHOIS & DNS Lookup](https://apify.com/digitalni.produkty.pro.zivot/domain-whois-lookup): expiry, DNS, SPF/DMARC and SSL for many domains
- [PDF Text Extractor](https://apify.com/digitalni.produkty.pro.zivot/pdf-text-extractor): text, Markdown and RAG chunks from PDFs
- [AI Image Upscaler](https://apify.com/digitalni.produkty.pro.zivot/ai-image-upscaler): 4x Real-ESRGAN upscaling, no GPU
- [RSS Feed Reader & Monitor](https://apify.com/digitalni.produkty.pro.zivot/rss-feed-reader): only-new-items feed monitoring
- [ATS Jobs](https://apify.com/digitalni.produkty.pro.zivot/ats-jobs): jobs from Greenhouse, Lever, Ashby & more
- [App Store Reviews](https://apify.com/digitalni.produkty.pro.zivot/app-store-reviews): iOS reviews from 50+ countries

# Actor input Schema

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

Home page or any page of the website. All pages on the same domain are crawled.

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

You pay per crawled page, so this also caps the price.

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

How many clicks away from the start page to crawl.

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

Also check links pointing to other websites (they are checked, not crawled).

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

Also find broken images, JavaScript, CSS and iframes.

## `reportRedirects` (type: `boolean`):

Also list links that redirect (useful for SEO clean-ups).

## `reportBlocked` (type: `boolean`):

Some sites (LinkedIn, Facebook…) refuse automated checks. They are usually fine in a browser, so they are hidden by default.

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

Do not crawl pages that robots.txt disallows.

## `includePatterns` (type: `array`):

Optional regular expressions or text, e.g. /blog/. Only matching pages are crawled.

## `excludePatterns` (type: `array`):

Optional regular expressions or text for links to skip completely, e.g. /cart, ?sort=.

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

Links that do not answer in time are reported as unreachable.

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

How many pages are crawled at the same time. Lower it for small or slow websites.

## Actor input object example

```json
{
  "startUrls": [
    "https://crawlee.dev"
  ],
  "maxPages": 20,
  "maxDepth": 10,
  "checkExternalLinks": true,
  "checkResources": false,
  "reportRedirects": false,
  "reportBlocked": false,
  "respectRobotsTxt": true,
  "timeoutSecs": 20,
  "concurrency": 10
}
```

# Actor output Schema

## `problems` (type: `string`):

Broken, unreachable, malformed and optionally redirected or blocked links with HTTP status, reason and source pages.

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

Pages crawled, links checked and counts by result.

# 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://crawlee.dev"
    ],
    "maxPages": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("digitalni.produkty.pro.zivot/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://crawlee.dev"],
    "maxPages": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("digitalni.produkty.pro.zivot/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://crawlee.dev"
  ],
  "maxPages": 20
}' |
apify call digitalni.produkty.pro.zivot/broken-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digitalni.produkty.pro.zivot/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/twaRhUfHtRQiltuII/builds/f6p7dF2WMSylulLA9/openapi.json
