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

Find broken links (404, 5xx, timeouts) on any website and check status codes, redirect chains and response times for URL lists. Respects robots.txt. $0.69 per 1,000 links.

- **URL**: https://apify.com/wholesome_spring/broken-link-checker-url-status.md
- **Developed by:** [Czech Data Tools](https://apify.com/wholesome_spring) (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.69 / 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.

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 **broken links** on any website and check **HTTP status codes, redirect chains and response times** for any list of URLs. Fast, polite and cheap: **$0.69 per 1,000 checked links**.

### What it does

- **Crawl mode** – give one or more start URLs. The checker reads every link on the page, checks it, and (optionally) follows internal links up to *Max pages*.
- **URL list mode** – paste a list of URLs (e.g. from a sitemap, backlinks export or spreadsheet) and get status code, final URL and redirects for each one.
- Detects **404 / 410**, **5xx server errors**, **timeouts**, **DNS errors** and **redirect chains**.
- Shows **where** each broken link was found and its **anchor text**, so you can fix it fast.
- *Output only broken links* – save (and pay for) just the problems.
- Respects **robots.txt** when crawling and paces requests per host.

### Output example

| url | statusCode | isBroken | foundOn | anchorText | redirectCount | responseTimeMs |
|---|---|---|---|---|---|---|
| https://example.com/old-page | 404 | true | https://example.com/blog | Read more | 0 | 132 |
| http://example.com/about | 200 | false | https://example.com/ | About us | 1 | 210 |

Fields: url, foundOn, anchorText, isExternal, statusCode, isBroken, finalUrl, redirectCount, redirectChain, responseTimeMs, contentType, error, checkedAt.

### Use cases

- SEO audits and site migrations (find 404s and redirect chains)
- Checking outbound/affiliate links before they break
- Validating URL lists from spreadsheets, CRMs or sitemaps
- Scheduled monitoring – run it weekly with *Output only broken links* and connect a webhook, Slack or email integration

### Pricing

Pay per event: **$0.003 per run + $0.69 per 1,000 links** in the dataset. No platform usage costs passed to you. With *Output only broken links* you only pay for broken ones.

### Related Actors by Czech Data Tools

- [PDF & Webpage to Markdown for AI / RAG](https://apify.com/wholesome_spring/pdf-webpage-to-markdown-for-ai-rag)
- [Sreality.cz Scraper & Price-Drop Monitor](https://apify.com/wholesome_spring/sreality-scraper-price-monitor)
- [Jobs.cz Scraper & New-Job Monitor](https://apify.com/wholesome_spring/jobs-cz-scraper-new-job-monitor)

# Actor input Schema

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

Pages to start from. Every link on them is checked; with "Crawl same domain" the checker follows internal links up to Max pages.

## `urlsToCheck` (type: `array`):

Optional plain list of URLs to check directly (status, redirects, response time).

## `crawlSameDomain` (type: `boolean`):

Follow internal links to find more pages.

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

How many pages of the site to crawl (only with Crawl same domain).

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

Stop after this many links are saved to the dataset.

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

Also check links pointing to other websites.

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

Only 4xx/5xx, timeouts and DNS errors are saved (and charged).

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

How long to wait for each URL before reporting a timeout.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "crawlSameDomain": true,
  "maxPages": 3,
  "maxLinks": 200,
  "checkExternal": true,
  "onlyBroken": false,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `results` (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://books.toscrape.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("wholesome_spring/broken-link-checker-url-status").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://books.toscrape.com/" }] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,wholesome_spring/broken-link-checker-url-status"
        }
    }
}
```

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/VSoafMLrhaqFBTeST/builds/2jPokYsd6fhFgHjDb/openapi.json
