# Bulk URL Status Code & Redirect Chain Checker (`parth-tools/bulk-url-status-redirect-checker`) Actor

Check HTTP status codes and full redirect chains for thousands of URLs: 200/301/302/404/500, final URL, response time, broken links, HTTP→HTTPS, optional title/canonical. Fast HEAD with GET fallback. $0.30 per 1,000 URLs.

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

## Pricing

from $0.30 / 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 Code & Redirect Chain Checker

**Check thousands of URLs in minutes: HTTP status code, full redirect chain, final URL, response time and key headers.** Ideal for SEO migrations, broken-link cleanup, affiliate/short-link audits, backlink checks and uptime spot-checks.

Fast, cheap HTTP requests (HEAD with automatic GET fallback for servers that mishandle HEAD). **$0.30 per 1,000 URLs**, no start fee, no subscription.

### What you get for each URL

- **Status codes**: first response (e.g. `301`) and final status after redirects (e.g. `200` or `404`)
- **Full redirect chain**: every hop's URL, status and `Location`, redirect count, permanent vs temporary, HTTP→HTTPS detection, loop detection
- **Final URL** after redirects
- **Broken flag** for 4xx/5xx, DNS failures, timeouts, TLS and connection errors (with the error message)
- **Response time**, content type, content length, server, `X-Robots-Tag`, `Last-Modified`
- Optional: page **title**, **meta robots** and **canonical** (for SEO migrations)

### Use cases

- ✅ **Site migrations** — verify every old URL 301-redirects to the right new URL in one hop
- 🔗 **Broken link cleanup** — check exported link lists, sitemaps or CMS URLs for 404s
- 🧾 **Affiliate & short links** — expand bit.ly / tracking links and see where they land
- 📈 **Backlink audits** — find dead linking pages
- ⏱️ **Monitoring** — schedule it hourly with *Only output broken or redirected URLs* and get alerts

### Input example

```json
{
    "urls": ["http://github.com", "https://apify.com/this-page-does-not-exist", "https://httpbin.org/redirect/3"],
    "method": "auto",
    "followRedirects": true,
    "extractTitle": false,
    "onlyProblems": false
}
```

### Output example

```json
{
    "url": "https://httpbin.org/redirect/3",
    "statusCode": 302,
    "finalStatusCode": 200,
    "finalUrl": "https://httpbin.org/get",
    "ok": true,
    "isBroken": false,
    "redirectCount": 3,
    "redirectType": "temporary",
    "redirectChain": [
        { "url": "https://httpbin.org/redirect/3", "status": 302, "location": "https://httpbin.org/relative-redirect/2" },
        { "url": "https://httpbin.org/relative-redirect/2", "status": 302, "location": "https://httpbin.org/relative-redirect/1" },
        { "url": "https://httpbin.org/relative-redirect/1", "status": 302, "location": "https://httpbin.org/get" }
    ],
    "responseTimeMs": 273,
    "contentType": "application/json",
    "server": "gunicorn/19.9.0",
    "error": null
}
```

### Pricing

| Event | Price | When |
|---|---|---|
| URL checked | **$0.0003** ($0.30 / 1,000 URLs) | Each URL result |
| Actor start | $0.00005 | Once per run |

10,000 URLs ≈ $3. Use "Max cost per run" to cap spend.

### FAQ

**Why do some sites return 403 here but work in my browser?** Some sites block automated traffic. Try the *Desktop Chrome* user agent (default); heavily protected sites may still block.

**HEAD or GET?** *Auto* is fastest and most accurate: HEAD first, GET if the server returns an error or doesn't support HEAD.

**Can I check URLs from a sitemap?** Use a sitemap extractor to get the list, then paste it here (or chain the two Actors with an integration).

# Actor input Schema

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

URLs to check, one per line (up to hundreds of thousands). Missing scheme defaults to https://.

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

<b>Auto</b> uses a fast HEAD request and retries with GET when the server mishandles HEAD (recommended). <b>GET</b> always downloads the start of the page.

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

Follow redirects and record the full chain (each hop's URL and status). Off = report the first response only (e.g. 301 + Location).

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

Stop following after this many hops (reported as an error).

## `extractTitle` (type: `boolean`):

Uses GET and adds the page \<title>, meta robots and canonical for HTML pages. Same price.

## `onlyProblems` (type: `boolean`):

Skip healthy 2xx URLs in the output (they are still checked and billed).

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

Per-request timeout.

## `userAgent` (type: `string`):

Request identity.

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

Parallel requests.

## Actor input object example

```json
{
  "urls": [
    "http://github.com",
    "https://apify.com/this-page-does-not-exist",
    "https://httpbin.org/redirect/3",
    "example.com"
  ],
  "method": "auto",
  "followRedirects": true,
  "maxRedirects": 10,
  "extractTitle": false,
  "onlyProblems": false,
  "timeoutSecs": 20,
  "userAgent": "browser",
  "maxConcurrency": 20
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

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

// Run the Actor and wait for it to finish
const run = await client.actor("parth-tools/bulk-url-status-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://github.com",
        "https://apify.com/this-page-does-not-exist",
        "https://httpbin.org/redirect/3",
        "example.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("parth-tools/bulk-url-status-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://github.com",
    "https://apify.com/this-page-does-not-exist",
    "https://httpbin.org/redirect/3",
    "example.com"
  ]
}' |
apify call parth-tools/bulk-url-status-redirect-checker --silent --output-dataset

```

## MCP server setup

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