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

Check thousands of URLs for HTTP status codes, redirect chains, final URLs, response times and errors, or find every broken link on your pages. Fast, cheap, great for SEO audits and site migrations.

- **URL**: https://apify.com/pankajbhatia/url-status-broken-link-checker.md
- **Developed by:** [Pankaj Bhatia](https://apify.com/pankajbhatia) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 url checkeds

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

## Bulk URL Status, Redirect & Broken Link Checker

**Check thousands of URLs in minutes.** For every URL you get the **HTTP status code**, a plain result group (ok, redirect, broken, blocked, server error, error), the full **redirect chain** with each hop's status, the **final URL**, **response time**, content type and size, server and X-Robots-Tag header.

Or switch to **broken-link mode**: give it your pages, and it opens each one, collects every link (and optionally images, scripts and stylesheets) and checks them all. You get the broken ones with the page they were found on and their link text, so you know exactly what to fix.

- **Fast**: HEAD requests first with an automatic GET fallback, up to 100 checks in parallel.
- **Redirect chains**: see every hop (301 → 302 → 200), loops and HTTP-to-HTTPS redirects.
- **Clear results**: errors are explained in plain English (domain not found, timeout, connection failed, redirect loop).
- **Short reports**: turn on **Only report problems** to see just broken links, errors and redirects.
- **Cheap**: a small fee per URL checked.

### Who is it for?

- **SEO specialists and agencies**: find 404s and redirect chains that waste crawl budget and lose link equity.
- **Site migrations**: verify that every old URL redirects to the right new page.
- **Content and marketing teams**: find dead outbound links in blog posts and docs.
- **Developers and QA**: monitor important URLs and APIs on a schedule.
- **Link builders**: check that backlinks and partner pages are still live.

### How to use it

1. Choose **What to check**:
   - **Check these URLs**: paste any list of URLs (from a sitemap, a spreadsheet or a crawl).
   - **Find broken links on these pages**: paste page URLs and every link on them is checked.
2. Optionally turn on **Only report problems**.
3. Click **Start**, then export to Excel, CSV or JSON. The `SUMMARY` record counts results per group.

**Tip:** get every URL of a website with a sitemap extractor first, then paste them here.

### Input example

```json
{
  "mode": "urls",
  "urls": ["http://apify.com", "https://example.com", "https://github.com/this-page-does-not-exist-123"],
  "onlyReportProblems": false
}
```

### Output example

```json
{
  "url": "http://apify.com",
  "statusCode": 200,
  "statusGroup": "ok",
  "finalUrl": "https://apify.com/",
  "redirected": true,
  "redirectCount": 1,
  "redirectChain": [{ "url": "http://apify.com", "status": 301, "to": "https://apify.com/" }],
  "httpsRedirect": true,
  "responseTimeMs": 148,
  "contentType": "text/html; charset=utf-8",
  "error": null
}
```

In broken-link mode each row also has `foundOn` (the page with the link), `anchorText`, `linkType`, `isInternal` and `nofollow`.

### How much does it cost?

Pay-per-event: a small fee **per URL checked** plus a tiny per-run start fee, with no subscription and no separate platform usage costs. For example, 1,000 URLs cost about $0.50. Pages that can't be opened in broken-link mode are not charged. Set **Maximum cost per run** to cap your spending.

### Good to know

- `blocked` (401, 403, 429) usually means the site blocks automated checks, not that the page is broken.
- Some servers answer HEAD requests wrongly, so the tool automatically re-checks with GET.
- The same URL found on several pages is checked once per run.

### Use it through the API, integrations or AI agents

Run it from the Apify API, on a schedule, or connect it to Make, Zapier, n8n or Google Sheets. AI agents can call it through the Apify MCP server.

### FAQ

**Will it overload my website?** No. Use **Max concurrency** to set how many checks run at once (for example 5 for a small site).

**Does it run JavaScript?** No. It checks HTTP responses and links in the page HTML, which is what search engines see first.

**Found a bug or need a feature?** Open an issue. We usually reply within 24 hours.

### More tools from this developer

- [SAM.gov Contract Opportunities Finder & Bid Alerts](https://apify.com/pankajbhatia/sam-gov-contract-opportunities): federal contract opportunities and bid alerts
- [Sitemap & URL Extractor](https://apify.com/pankajbhatia/sitemap-url-extractor): get every URL of a website from its sitemaps
- [Website to Markdown for AI & RAG](https://apify.com/pankajbhatia/website-to-markdown): turn web pages into clean Markdown for LLMs
- [Tech Stack Detector](https://apify.com/pankajbhatia/tech-stack-detector): find what any website is built with
- [Apple App Store Reviews Scraper](https://apify.com/pankajbhatia/app-store-reviews): App Store reviews and ratings for any app
- [ATS Jobs Scraper](https://apify.com/pankajbhatia/ats-jobs-scraper): jobs from Greenhouse, Lever, Ashby, Workable and more
- [Website Screenshot](https://apify.com/pankajbhatia/website-screenshot): full-page, mobile and PDF screenshots in bulk
- [PDF to Text & Markdown Extractor](https://apify.com/pankajbhatia/pdf-text-extractor): extract text from PDFs for AI and search
- [Domain WHOIS, DNS & SSL Checker](https://apify.com/pankajbhatia/domain-whois-dns-ssl-checker): bulk domain, DNS, email security and SSL checks
- [SEO Meta Tags & On-Page Audit](https://apify.com/pankajbhatia/seo-meta-tags-checker): bulk on-page SEO audit with fixes
- [RSS & Atom Feed Reader](https://apify.com/pankajbhatia/rss-feed-reader): merge and filter many news feeds
- [Hacker News Scraper](https://apify.com/pankajbhatia/hacker-news-scraper): HN stories, comments and Who is hiring jobs
- [Academic Paper Search](https://apify.com/pankajbhatia/academic-paper-search): papers from Crossref, arXiv and PubMed
- [SEC EDGAR Filings & Financials](https://apify.com/pankajbhatia/sec-edgar-filings-financials): 10-K, 10-Q, 8-K filings and company financials

# Actor input Schema

## `mode` (type: `string`):

Check the URLs themselves, or open each URL as a page and check every link on it (broken link finder).

## `urls` (type: `array`):

One per line. In broken-link mode, these are the pages whose links are checked.

## `onlyReportProblems` (type: `boolean`):

Leave out URLs that are fine (200 with no redirect) so the report only shows broken links, errors and redirects. Every checked URL still counts as checked.

## `internalLinksOnly` (type: `boolean`):

Only check links that point to the same website.

## `checkImagesAndAssets` (type: `boolean`):

Check image, script and CSS files on the pages too, not only links.

## `maxLinksPerPage` (type: `integer`):

Limit how many links are checked per page.

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

Stop following a redirect chain after this many hops.

## `useHeadRequests` (type: `boolean`):

Try a lightweight HEAD request first and fall back to GET when a server doesn't support it.

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

Mark a URL as timed out after this long.

## `maxConcurrency` (type: `integer`):

How many URLs to check in parallel. Lower it to be gentle on small websites.

## Actor input object example

```json
{
  "mode": "urls",
  "urls": [
    "http://apify.com",
    "https://example.com",
    "https://github.com/this-page-does-not-exist-123"
  ],
  "onlyReportProblems": false,
  "internalLinksOnly": false,
  "checkImagesAndAssets": false,
  "maxLinksPerPage": 500,
  "maxRedirects": 10,
  "useHeadRequests": true,
  "timeoutSecs": 20,
  "maxConcurrency": 20
}
```

# Actor output Schema

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

One item per URL with status, redirects and errors.

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

Counts per result group (ok, redirect, broken, blocked, server-error, error).

# 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 = {
    "urls": [
        "http://apify.com",
        "https://example.com",
        "https://github.com/this-page-does-not-exist-123"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("pankajbhatia/url-status-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 = { "urls": [
        "http://apify.com",
        "https://example.com",
        "https://github.com/this-page-does-not-exist-123",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("pankajbhatia/url-status-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 '{
  "urls": [
    "http://apify.com",
    "https://example.com",
    "https://github.com/this-page-does-not-exist-123"
  ]
}' |
apify call pankajbhatia/url-status-broken-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,pankajbhatia/url-status-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/s96Rng03l0ghsIVvG/builds/noXuumTN8cygKiCsZ/openapi.json
