# Bulk URL Status, Redirect & Broken Link Checker (`faglez/url-redirect-checker`) Actor

Bulk check HTTP status codes (200, 301, 404, 500) and full redirect chains for thousands of URLs. Find broken links, dead pages and redirect loops after a site migration. Fast, no browser.

- **URL**: https://apify.com/faglez/url-redirect-checker.md
- **Developed by:** [Chaseb Gonzalez](https://apify.com/faglez) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 results

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 at once and see exactly what happens to each one: its HTTP status code (200, 301, 404, 500...), every redirect hop, where it finally lands, and a one-word verdict (ok, redirected, broken...). Download the results as Excel, CSV or JSON, or pass them to another Actor.

Use it as a bulk **HTTP status code checker**, a **redirect chain checker** or a **broken link checker** for any list of URLs. No browser, so it is fast and cheap: it reads only the response headers of each address, several websites in parallel.

### What does it do?

- **Full redirect chains, hop by hop.** Every redirect is recorded with its status code (301, 302, 307, 308...) and where it points, up to the final page.
- **A clear verdict for every URL:** `ok`, `redirected` (works after redirects), `broken` (4xx), `server-error` (5xx), `redirect-loop`, `too-many-redirects`, `unreachable` (no answer), or `redirect` (when you turn off following redirects).
- **Spots redirect loops** and over-long chains instead of hanging on them.
- **Big lists welcome.** Paste URLs or link a text file with one URL per line. Duplicates are checked (and charged) only once.
- **Polite and reliable.** At most 2 requests at a time per website, retries on temporary errors, follows `robots.txt`, and checks each address the way a browser visits it (a GET request whose download stops after the headers).

### Who uses it?

- **Site migrations:** check that every old URL redirects to the right new page, with a single 301 and no chains or loops.
- **SEO audits:** find broken links, redirect chains that waste crawl budget, and pages that answer 5xx.
- **Link and backlink checks:** see which links in a list still work and where they end up.
- **Expanding short links and tracking URLs:** get the real destination behind each one.
- **Marketing and affiliate teams:** check that campaign, QR-code and affiliate links still land on the right page.
- **Developers and monitoring:** run it after each release, or on a schedule, to catch important pages that stop answering 200.

### How to use it

1. Add the URLs to check (`https://example.com/old-page`), or link a text file with one URL per line.
2. Optional: set **Maximum URLs**, turn off **Follow redirects** to see only the first answer, or change the timeout.
3. Click **Start**, then download the results as Excel, CSV, JSON or HTML, or get them through the API.

#### Input example

```json
{
    "startUrls": [
        { "url": "http://apify.com" },
        { "url": "https://crawlee.dev" },
        { "url": "https://crawlee.dev/this-page-does-not-exist" }
    ],
    "maxUrls": 10
}
```

#### Output example

```json
{
    "url": "http://apify.com/",
    "outcome": "redirected",
    "statusCode": 301,
    "finalUrl": "https://apify.com/",
    "finalStatusCode": 200,
    "redirectCount": 1,
    "redirectChain": [
        { "url": "http://apify.com/", "statusCode": 301, "redirectTo": "https://apify.com/" },
        { "url": "https://apify.com/", "statusCode": 200, "redirectTo": null }
    ],
    "error": null,
    "contentType": "text/html; charset=utf-8",
    "responseTimeMs": 777,
    "position": 1,
    "checkedAt": "2026-11-08T05:14:58.174Z"
}
```

`statusCode` is the first answer, and `finalStatusCode` the answer at the end of the chain. `error` explains what went wrong for unreachable URLs (timeout, DNS error...). `position` is the URL's place in your input, so you can sort the results back into your original order.

Each run also saves a **SUMMARY** record (in the key-value store) with the count per outcome, duplicates removed, invalid values skipped, and any URLs not checked because `robots.txt` does not allow it.

### Use it from the API or an AI agent

- **AI agents:** connect your AI assistant to the [Apify MCP server](https://mcp.apify.com) and it can find and run this Actor on its own. The Actor's ID is `faglez/url-redirect-checker`, and every input field has a plain description, so the agent knows what to send.
- **API:** a single call starts a run and returns the results. This suits small runs that finish within 5 minutes:

```
POST https://api.apify.com/v2/acts/faglez~url-redirect-checker/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>
Content-Type: application/json

{ "startUrls": [{ "url": "http://apify.com" }, { "url": "https://crawlee.dev/missing-page" }] }
```

For bigger jobs, start a run and read its dataset when it finishes, or use the Apify clients for JavaScript and Python.

- **No code:** set up schedules, webhooks and integrations (Make, Zapier, Slack, Google Drive and more) from the Actor's Integrations tab.

### How much does it cost?

You only pay for URLs actually checked:

| Event | Price |
| --- | --- |
| Each URL checked | $0.50 per 1,000 URLs |
| Actor start | $0.001 per run |

Example: checking 10,000 URLs costs about $5. Set **Maximum URLs** or a maximum cost per run and the Actor stops cleanly at your limit, keeping everything it already checked.

### Tips

- **Big lists:** try the first 100 URLs with **Maximum URLs** to check the settings, then run the rest.
- **Want the lightest possible requests?** Turn off **Check like a browser** to use HEAD requests. Be aware that some servers answer HEAD differently from real visits: `http://www.google.com/maps` answers HEAD with 200 but sends visitors to `https://` with a 302.
- **Only want the first redirect?** Turn off **Follow redirects** to see the first status and where it points, without following the chain.
- **Slow websites:** raise **Timeout per request** before counting a URL as unreachable.

### Questions

**Why is a URL "unreachable" when it opens in my browser?** Some websites block automated requests, or answer too slowly. Try a longer timeout. The `error` field says what happened.

**What is "blocked-by-robots"?** A redirect led to an address that the target website's `robots.txt` asks tools not to visit, so the Actor stopped there instead of checking it.

**Does it check links inside my pages?** No. It checks exactly the URLs you give it. To check every page of a website, get the list first with [Sitemap URL Extractor](https://apify.com/faglez/sitemap-url-extractor), then check that list here.

**Is it allowed?** The Actor sends one request per URL (plus redirects) and reads only the response headers, the same as a browser opening a link, and respects `robots.txt`. It only reads public status information. You are responsible for how you use the results, including any website's terms.

**Why is a page "broken" with status 403 when it works in my browser?** A 403 means the server refused the request. Many large websites refuse automated tools while letting browsers in, so a 403 often means "blocked by a bot firewall", not "the page is gone". A 404 or 410 means the page really does not exist.

**How do I check all my redirects after a website migration?** Paste the list of your old URLs (or link a text file with them). Each row shows where the old URL ends up now (`finalUrl`), how many hops it took, and every hop with its status. Sort by `outcome` to find the broken ones and the redirect chains to shorten.

**Does it follow JavaScript or meta-refresh redirects?** No. It follows HTTP redirects (301, 302, 303, 307, 308), which are the ones search engines rely on. Redirects done with JavaScript or a meta-refresh tag inside the page are not followed.

**Found a bug or need a feature?** Open an issue in the Issues tab and I will look into it.

# Changelog

This Actor's version history is a separate document: https://apify.com/faglez/url-redirect-checker/changelog.md

# Actor input Schema

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

The pages to check, for example https://example.com/old-page. Add as many as you like, or link a text file with one URL per line. Duplicates are checked once.

## `maxUrls` (type: `integer`):

Check at most this many URLs. You pay per checked URL, so this also caps the cost of a run.

## `followRedirects` (type: `boolean`):

Follow each redirect to the final page and record every hop. Turn off to see only the first answer (for example 301 and where it points).

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

Stop following after this many redirects and report "too-many-redirects". Browsers give up after about 20.

## `alwaysUseGet` (type: `boolean`):

On (recommended): each URL is checked with a GET request, like a real visit; only the response headers are read, then the download stops. Off: a lighter HEAD request is used first, but some servers answer HEAD differently from real visits (for example a page that redirects visitors to https:// can answer a HEAD request with 200).

## `requestTimeoutSecs` (type: `integer`):

How long to wait for a website to answer before reporting the URL as unreachable (after 2 retries).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "http://apify.com"
    },
    {
      "url": "https://crawlee.dev"
    },
    {
      "url": "https://crawlee.dev/this-page-does-not-exist"
    }
  ],
  "maxUrls": 10,
  "followRedirects": true,
  "maxRedirects": 10,
  "alwaysUseGet": true,
  "requestTimeoutSecs": 15
}
```

# Actor output Schema

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

No description

## `summary` (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": "http://apify.com"
        },
        {
            "url": "https://crawlee.dev"
        },
        {
            "url": "https://crawlee.dev/this-page-does-not-exist"
        }
    ],
    "maxUrls": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("faglez/url-redirect-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": [
        { "url": "http://apify.com" },
        { "url": "https://crawlee.dev" },
        { "url": "https://crawlee.dev/this-page-does-not-exist" },
    ],
    "maxUrls": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("faglez/url-redirect-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": [
    {
      "url": "http://apify.com"
    },
    {
      "url": "https://crawlee.dev"
    },
    {
      "url": "https://crawlee.dev/this-page-does-not-exist"
    }
  ],
  "maxUrls": 10
}' |
apify call faglez/url-redirect-checker --silent --output-dataset

```

## MCP server setup

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