# Bulk URL Status & Redirect Chain Checker (`klyve1/url-redirect-checker`) Actor

Check thousands of URLs: final status code, full redirect chain (301, 302, 307, 308, meta refresh), final URL, response time, content type. Find broken links, redirect loops and chains before SEO migrations.

- **URL**: https://apify.com/klyve1/url-redirect-checker.md
- **Developed by:** [Nico Klyve](https://apify.com/klyve1) (community)
- **Categories:** SEO tools, Developer tools
- **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 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 Chain Checker

Check thousands of URLs at once: final HTTP status code, every hop of the redirect chain (301, 302, 303, 307, 308 and meta refresh), final URL, response times, content type and X-Robots-Tag. Detect broken links, redirect loops, long chains and temporary redirects that should be permanent, and validate SEO migrations against your redirect map.

### What people use it for

- **SEO migrations**: paste `old-url expected-new-url` pairs and get `matchesExpectedFinalUrl` for each line, before and after go-live.
- **Broken link checks**: find 404, 410 and 5xx pages in a list of URLs from a sitemap, a CMS export or a backlink tool.
- **Redirect audits**: spot chains of several hops, loops, 302 instead of 301, missing HTTP to HTTPS upgrade.
- **Affiliate and short links**: expand short or tracking links and see where they really land.
- **Monitoring**: schedule the check on your key URLs and get alerted when one stops answering 200.

### Example output

```json
{
  "inputUrl": "http://apple.com",
  "finalUrl": "https://www.apple.com/",
  "finalStatusCode": 200,
  "ok": true,
  "redirectCount": 1,
  "redirectTypes": ["301"],
  "hasPermanentRedirectOnly": true,
  "httpsUpgrade": true,
  "expectedFinalUrl": null,
  "matchesExpectedFinalUrl": null,
  "totalResponseTimeMs": 281,
  "contentType": "text/html; charset=utf-8",
  "xRobotsTag": null,
  "error": null,
  "chain": [
    { "url": "http://apple.com", "statusCode": 301, "redirectType": "301", "location": "https://www.apple.com/", "responseTimeMs": 94 },
    { "url": "https://www.apple.com/", "statusCode": 200, "redirectType": null, "location": null, "responseTimeMs": 187, "server": "Apple" }
  ],
  "checkedAt": "2026-11-18T17:58:47.175Z"
}
```

### Input

| Field | What it does |
|---|---|
| URLs to check | One URL per line. Add the expected destination after a space or comma to validate a redirect map. |
| HTTP method | GET (default, detects meta refresh) or HEAD (lighter, falls back to GET when refused). |
| Follow meta refresh redirects | Also follow `<meta http-equiv="refresh">`. |
| Max redirects | Stop after this many hops (default 10). |
| Timeout per request | Default 15 seconds. |
| Parallel checks | Default 10. Lower it when all URLs are on one small server. |

### Pricing

Pay per result: **$0.0005 per URL checked** ($0.50 per 1,000 URLs). A dead link (DNS error, timeout, 404) is a valid result and counts as one check.

### Good to know

- The Actor sends normal requests with a clear user agent and does not bypass bot protection: a site behind an anti-bot wall reports the status it gives to any automated client (often 403).
- Redirects are followed manually so every hop is recorded, including relative `Location` headers.
- Check only URLs you are allowed to request, and keep the parallelism reasonable on small sites.

# Actor input Schema

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

One URL per line. To validate an SEO migration, add the expected destination after a space or a comma, for example: http://old.example.com/page https://www.example.com/page

## `method` (type: `string`):

GET is the most reliable and detects meta refresh redirects. HEAD is lighter but some servers answer it differently.

## `followMetaRefresh` (type: `boolean`):

Also follow HTML <meta http-equiv="refresh"> redirects (GET only).

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

Stop following a chain after this many redirects (reported as an error).

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

A request that takes longer is reported as a timeout.

## `concurrency` (type: `integer`):

How many URLs are checked at the same time. Lower it to be gentle with a single server.

## Actor input object example

```json
{
  "urls": [
    "http://apple.com",
    "http://github.com/apify",
    "https://www.google.com/this-page-does-not-exist",
    "https://www.wikipedia.org"
  ],
  "method": "GET",
  "followMetaRefresh": true,
  "maxRedirects": 10,
  "timeoutSecs": 15,
  "concurrency": 10
}
```

# Actor output Schema

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

All rows produced by the run.

# 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://apple.com",
        "http://github.com/apify",
        "https://www.google.com/this-page-does-not-exist",
        "https://www.wikipedia.org"
    ]
};

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

# Run the Actor and wait for it to finish
run = client.actor("klyve1/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 '{
  "urls": [
    "http://apple.com",
    "http://github.com/apify",
    "https://www.google.com/this-page-does-not-exist",
    "https://www.wikipedia.org"
  ]
}' |
apify call klyve1/url-redirect-checker --silent --output-dataset

```

## MCP server setup

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