# Find broken links and redirect chains on a website

**Use case:** 

Crawls a website and lists broken internal links, 404 pages, redirect chains, redirect loops and the pages that link to them. Internal links outside the crawl budget are status checked too, so the broken link list covers more of the site. The example uses crawler-test.com, a public test site full of link problems.

## Input

```json
{
  "startUrls": [
    "https://crawler-test.com/"
  ],
  "maxPages": 25,
  "crawlMode": "links-and-sitemap",
  "maxDepth": 0,
  "includeSubdomains": false,
  "checkExternalLinks": false,
  "checkUncrawledInternalLinks": true,
  "maxLinkChecks": 100,
  "userAgent": "chrome-desktop",
  "respectRobotsTxt": true,
  "maxConcurrency": 3,
  "requestDelayMs": 200,
  "requestTimeoutSecs": 20,
  "maxSitemapUrls": 10000,
  "pushSummaryToDataset": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

## Output

```json
{
  "url": {
    "label": "URL",
    "format": "link"
  },
  "statusCode": {
    "label": "Status",
    "format": "number"
  },
  "indexable": {
    "label": "Indexable",
    "format": "boolean"
  },
  "errorCount": {
    "label": "Errors",
    "format": "number"
  },
  "warningCount": {
    "label": "Warnings",
    "format": "number"
  },
  "issues": {
    "label": "Issues",
    "format": "array"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The SEO Audit Crawler: Site Audit, Broken Links, Redirects, Orphans Actor is ready to run with the inputs already set for "Find broken links and redirect chains on a website". [Sign up or log in](https://console.apify.com/create-task-from-example/f4Asb8dFN1E4DOqh3) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Find broken links and redirect chains on a website" task

The SEO Audit Crawler: Site Audit, Broken Links, Redirects, Orphans Actor will start running based on the input automatically. You can also change all the input fields, like websites to audit (urls or domains), max urls per site, and more, to match your specific use case.

### 3. Receive the "Find broken links and redirect chains on a website" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as URL, status, indexable, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Find broken links and redirect chains on a website" task via API](https://apify.com/zhtech/seo-audit-crawler.md).

## FAQ

### What does the broken links finder task return?

The broken links finder task returns one row per crawled URL with its status code, redirect chain and issue codes, the broken links found on each page, and a summary row with a health score, broken link counts and the top issues to fix.

### Can the broken links finder task check external links too?

Turn on Check external links in the broken links finder task. Every outbound link is requested and broken ones are reported. Bot walls and 401, 403 or 429 answers are marked unverified, never broken.

### Can I run the broken links finder task on a schedule or through the API?

Save the broken links finder task to your Apify account, then add it to an Apify Schedule (for example daily) or start it from the Apify API, webhooks, Zapier, Make, n8n or the Apify MCP server for AI agents.

### How much does the broken links finder task cost?

The broken links finder task is pay per event: a small start fee per run plus a fee per audited page saved. Link checks, redirects, 404s and the summary are free. Prices are on the Pricing tab.

## About this Actor

This example demonstrates how to use [SEO Audit Crawler: Site Audit, Broken Links, Redirects, Orphans](https://apify.com/zhtech/seo-audit-crawler.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/zhtech/seo-audit-crawler.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/zhtech/seo-audit-crawler.md

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`).
