# Broken Link, 404 & Redirect Chain Checker (`risimwell/bulk-rendered-broken-link-redirect-chain-auditor`) Actor

Audit client-side rendered links, detect broken URLs, track full HTTP and JS redirect chains, and uncover routing errors across enterprise web pages using Playwright.

- **URL**: https://apify.com/risimwell/bulk-rendered-broken-link-redirect-chain-auditor.md
- **Developed by:** [Ricardo Enriquez](https://apify.com/risimwell) (community)
- **Categories:** SEO tools, MCP servers, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 items extracted

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/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

## Bulk Rendered Broken Link & Redirect Chain Auditor

### Why use this Actor?

Maintain pristine website health, preserve SEO equity, and eliminate frustrating user navigation errors with the **Bulk Rendered Broken Link & Redirect Chain Auditor**. Traditional link checkers only look at static HTML, completely missing modern client-side JavaScript routing bugs, Single Page Application (SPA) redirect loops, and dynamic DOM elements. Powered by Playwright, this enterprise-grade Actor fully renders target pages, executes JavaScript, and accurately tracks complex multi-step HTTP and JS redirect chains.

Save dozens of hours of manual QA testing, prevent loss of organic search traffic, and instantly surface hidden routing errors. Integrate this scraper directly into your existing infrastructure without writing complex web automation code from scratch.

#### Dataset Overview

| Field | Type | Description |
| :--- | :--- | :--- |
| `source_url` | String | The originating page where the link was found. |
| `link_url` | String | The target URL extracted from the DOM. |
| `final_url` | String | The fully resolved destination URL after all redirects. |
| `is_external` | Boolean | Flag indicating whether the link points to an external domain. |
| `status_code` | Integer | The final HTTP status code received. |
| `is_broken` | Boolean | True if the link results in a 4xx, 5xx, or network failure. |
| `redirect_count` | Integer | Total number of redirects encountered during resolution. |
| `redirect_chain` | Array | Chronological list of intermediate redirect steps. |
| `error_message` | String | Detailed error text if resolution failed. |
| `response_time_ms` | Integer | Response latency in milliseconds. |

### Use Cases

- **Automated QA & Continuous Monitoring:** Connect to Make or n8n to automatically audit staging or production websites every week.
- **SEO Audits & Link Health:** Identify broken internal or external backlinks before search engine crawlers penalize your rankings.
- **AI Agent Context via MCP:** Power Model Context Protocol (MCP) servers to let AI assistants verify URL integrity on the fly.
- **B2B Due Diligence:** Rapidly audit target company websites for broken navigation and routing vulnerabilities during tech due diligence.

### Input JSON Example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://apify.com/store"
    }
  ],
  "checkExternalLinks": false,
  "maxRedirects": 10,
  "maxItems": 5,
  "timeoutSecs": 15
}
```

### Verified Output JSON Example

```json
[
  {
    "source_url": "https://apify.com",
    "link_url": "https://example.com/#main",
    "final_url": "https://example.com/#main",
    "is_external": false,
    "status_code": 200,
    "is_broken": false,
    "redirect_count": 0,
    "redirect_chain": [],
    "error_message": null,
    "response_time_ms": 727
  },
  {
    "source_url": "https://apify.com",
    "link_url": "https://example.com/",
    "final_url": "https://example.com/",
    "is_external": false,
    "status_code": 200,
    "is_broken": false,
    "redirect_count": 0,
    "redirect_chain": [],
    "error_message": null,
    "response_time_ms": 707
  }
]
```

### Quick Automation & Integration

#### n8n & Make Automation

Trigger this Actor seamlessly using an HTTP Request node via Apify's synchronous endpoint:

```bash
POST https://api.apify.com/v2/acts/bulk-rendered-broken-link-redirect-chain-auditor/run-sync-get-dataset-items?token=YOUR_API_TOKEN
```

Pass your JSON payload in the request body to receive immediate extracted records.

#### cURL Example

```bash
curl -X POST "https://api.apify.com/v2/acts/bulk-rendered-broken-link-redirect-chain-auditor/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"startUrls":[{"url":"https://apify.com"}],"maxItems":10}'
```

#### Model Context Protocol (MCP) Server

Connect this Actor directly to your AI agent workflows using the Apify MCP gateway at `https://mcp.apify.com`. Give your LLM the power to execute deep link auditing and inspect redirect histories programmatically through structured tool calls.

### Pricing & Pay-Per-Event Costs

This Actor operates on a transparent Pay-Per-Event (PPE) billing model:

- **ACTOR_START:** $0.002 base execution cost for initializing the Playwright browser automation session.
- **ITEM_EXTRACTED:** $0.003 per audited link record containing full redirect and status code analysis.

*Estimated Cost for 1,000 audited links:* Approximately $3.002 total (including base start fee and 1,000 extracted link items).

# Actor input Schema

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

List of URLs to audit for broken links and client-side/server-side redirect chains.

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

Whether to follow and verify status codes of external outgoing links.

## `maxRedirects` (type: `integer`):

Maximum number of redirects allowed before treating as a redirect loop.

## `maxItems` (type: `integer`):

Maximum number of links to process and return.

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

Timeout for page loads and resolution of redirect chains.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://apify.com/store"
    }
  ],
  "checkExternalLinks": false,
  "maxRedirects": 10,
  "maxItems": 5,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

Structured records extracted by this Actor.

# 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://apify.com"
        },
        {
            "url": "https://apify.com/store"
        }
    ],
    "checkExternalLinks": false,
    "maxRedirects": 10,
    "maxItems": 5,
    "timeoutSecs": 15
};

// Run the Actor and wait for it to finish
const run = await client.actor("risimwell/bulk-rendered-broken-link-redirect-chain-auditor").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://apify.com" },
        { "url": "https://apify.com/store" },
    ],
    "checkExternalLinks": False,
    "maxRedirects": 10,
    "maxItems": 5,
    "timeoutSecs": 15,
}

# Run the Actor and wait for it to finish
run = client.actor("risimwell/bulk-rendered-broken-link-redirect-chain-auditor").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://apify.com"
    },
    {
      "url": "https://apify.com/store"
    }
  ],
  "checkExternalLinks": false,
  "maxRedirects": 10,
  "maxItems": 5,
  "timeoutSecs": 15
}' |
apify call risimwell/bulk-rendered-broken-link-redirect-chain-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,risimwell/bulk-rendered-broken-link-redirect-chain-auditor"
        }
    }
}
```

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/3yF4GMxOy5VOvrbjp/builds/y1wdGhrg2chwElZAe/openapi.json
