# Broken Internal Link Checker - Source Pages and Repair CSV (`variable_mitts/internal-link-source-checker`) Actor

Find broken internal links with source pages and anchor text. Export a CSV repair queue from bounded static HTML and HTTP checks.

- **URL**: https://apify.com/variable_mitts/internal-link-source-checker.md
- **Developed by:** [Dhan sites](https://apify.com/variable_mitts) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 1 total users, 1 monthly users, 90.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.28 / 1,000 url checked with http responses

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 Internal Link Checker - Source Pages and Repair CSV

Find broken internal links and redirects, then identify the source pages and anchor text that need attention. Download a prioritized repair queue based on the pages observed in a bounded static-HTML crawl.

### Start with this workflow

Turn broken target URLs into a source-page repair queue.

**After the run:** Open FIX_QUEUE.csv to find source pages needing changes. Priorities reflect observed references, not site traffic or a complete-site guarantee.

**What is billed:** URLs with completed supported HTTP responses, including 404 and server errors; unchecked failures are free. Check the Pricing tab for the applicable subscription-tier rate. Result rows and billable input units can differ. A successful execution does not guarantee full coverage.

The example uses a small supplied fixture or the scraping-practice demonstration target. Replace it with input you are authorized to process; inspect coverage, diagnostics and limits before downstream use.

### Quick start

1. Open the Input tab or the public Example task and restore the example input.
2. Run the small example below. For website checks, replace URLs only with sites you own or have permission to inspect. For record tools, use non-sensitive sample records first.
3. Open the dataset for individual results, then read `REPORT` for coverage and diagnostics. A successful execution alone does not establish that all requested work was completed.
4. Download the relevant files from the Output tab, or retrieve the dataset through Apify's API for your next workflow step.

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

### Output example

This excerpt comes from the Books to Scrape example run. The dataset contains the complete row.

```json
{
  "url": "https://books.toscrape.com/",
  "final_url": "https://books.toscrape.com/",
  "status": 200,
  "checked": true,
  "category": "ok",
  "error": "",
  "elapsed_ms": 789,
  "source_pages": [],
  "source_count": 0,
  "source_evidence": [],
  "source_evidence_truncated": false
}
```

### Input reference

| Field | Type | Required | Description |
|---|---|---|---|
| `startUrls` | array | Yes | 1–100 public HTML pages you have permission to audit. A small example is prefilled. |
| `allowedHosts` | array | No | Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly. |
| `maxPages` | integer | No | Maximum unique URLs to check across seed pages and discovered internal links. Up to 100; the 75-second processing budget may stop earlier. |
| `permissionConfirmed` | boolean | Yes | The prefilled demo checks books.toscrape.com, the scraping-practice demonstration site. If replacing the URLs, confirm that you own or have permission to audit those websites. Uncheck to cancel all page checks. |

### Advanced workflow

#### Prioritized repair queue and anchor evidence

FIX_QUEUE and FIX_QUEUE.csv rank broken targets, server errors, redirects and other review candidates. Impact ordering uses source pages observed in this run, not full-site traffic. Each checked target includes source_evidence with source page, anchor text, original href sample and rel. Evidence is capped at20 distinct references per target,160 anchor-text characters and500 href characters; truncation is explicit. Each visited page parses up to5000 anchor links; source evidence remains a bounded sample. Unchecked or restricted URLs require verification and are not automatically declared broken.

### Pricing

$1.6 per 1,000 checked URLs with a completed supported HTTP response ($0.0016 each) at the entry tier. Billable responses include HTTP 200, redirects, 404/not-found responses, server errors and non-HTML responses when the result has `checked: true`. A broken URL is still a completed check. Network failures, robots restrictions and other unchecked URLs (`checked: false`) have no page event fee. A checked URL is charged even when there are no findings. No run-start event or automatic output-row event. The Pricing tab shows the applicable subscription-tier price. The spending limit can reduce the number of processed items.

For example, 100 billable items cost $0.16 in Actor event fees at the entry tier. Zero findings is different from zero processed items. Inspect the report's processed/checked counts and the run's charge events to reconcile a run.

### Limits and interpretation

Static HTML only. The crawl is bounded by maxPages, maxLinks and its processing budget. Respect robots restrictions and exact allowed hosts; private-network destinations are excluded. A repair queue reflects only observed source pages, not traffic or every link on the website. Unchecked targets are not automatically broken.

Results cover only the inspected input. Truncation and unchecked records require review; do not treat them as a complete-source guarantee. Input is not overwritten. The Actor uses limited permissions.

### Troubleshooting and support

- **Run succeeded but output is diagnostic:** inspect `REPORT` and `INPUT_ERRORS`, correct the named fields, and rerun. Handled invalid input can finish with `SUCCEEDED` and no billable items.
- **Fewer results than requested:** check coverage, truncation, spending limits and the limits above. Website checks can also be restricted by robots rules, redirects or target availability.
- **Repeat a workflow:** save a task with your input and use Apify scheduling or its API. Review each run's coverage before passing results downstream.
- **Report a problem:** open this Actor's Issues tab with the run ID, expected behavior and a minimal non-sensitive input. Never post tokens, credentials or private source data.

### Related tools

- [site regression auditor](https://apify.com/variable_mitts/site-regression-auditor)
- [json ld page extractor](https://apify.com/variable_mitts/json-ld-page-extractor)

### Who is this for?

Site owners and SEO teams locating the pages that contain broken internal links. Supply authorized starting pages and inspect the reported coverage.

### Frequently asked questions

#### Does this show which page contains a broken link?

It retains source-page and anchor evidence for discovered internal links and provides a repair queue. Coverage is bounded; JavaScript-only links and undiscovered pages may be missed.

#### How do I try it before using my full input?

Open the Input tab, review the prefilled example, and run a small batch with a spending limit. Inspect the dataset and report before increasing the batch. Examples can incur the documented inspection or analysis fee; an execution marked successful can still contain rejected records or incomplete coverage.

#### Can I use the Actor through an API or on a schedule?

Yes. Use Apify's [Actor API](https://docs.apify.com/api/v2/acts-run-sync-get-dataset-items-post) or [schedules](https://docs.apify.com/platform/schedules). Keep credentials private and use the documented input fields. The pricing and limits below apply to API runs too.

### Related tools for the next step

- [Canonical and Hreflang Checker - SEO Regression Audit](https://apify.com/variable_mitts/site-regression-auditor)
- [URL Tracking Parameter Remover - UTM Cleanup and Evidence](https://apify.com/variable_mitts/tracking-query-url-cleaner)

# Actor input Schema

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

1–100 public HTML pages you have permission to audit. A small example is prefilled.

## `allowedHosts` (type: `array`):

Leave empty to infer exact hostnames and their www variants from Page URLs. Add separate language domains explicitly.

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

Maximum unique URLs to check across seed pages and discovered internal links. Up to 100; the 75-second processing budget may stop earlier.

## `permissionConfirmed` (type: `boolean`):

The example checks Books to Scrape, a public site built for scraping practice. For other URLs, confirm that you have permission before running.

## Actor input object example

```json
{
  "startUrls": [
    "https://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}
```

# Actor output Schema

## `links` (type: `string`):

No description

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

No description

## `csv` (type: `string`):

No description

## `fixQueue` (type: `string`):

No description

## `fixQueueCsv` (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": [
        "https://books.toscrape.com/"
    ],
    "allowedHosts": [
        "books.toscrape.com"
    ],
    "maxPages": 3,
    "permissionConfirmed": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("variable_mitts/internal-link-source-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://books.toscrape.com/"],
    "allowedHosts": ["books.toscrape.com"],
    "maxPages": 3,
    "permissionConfirmed": True,
}

# Run the Actor and wait for it to finish
run = client.actor("variable_mitts/internal-link-source-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://books.toscrape.com/"
  ],
  "allowedHosts": [
    "books.toscrape.com"
  ],
  "maxPages": 3,
  "permissionConfirmed": true
}' |
apify call variable_mitts/internal-link-source-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,variable_mitts/internal-link-source-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/eGJqsLe9UcmGhzCLa/builds/LHrZlcaWBRLUWHbpq/openapi.json
