# URL Status & Redirect Chain Checker (`digital-tools/url-status-redirect-checker`) Actor

Bulk HTTP status code and redirect chain checker. Give it a list of URLs and get the final URL, every redirect hop (301/302/303/307/308), status code, response time, and whether the scheme or host changed. Fast, no browser, cheap per URL.

- **URL**: https://apify.com/digital-tools/url-status-redirect-checker.md
- **Developed by:** [凡 方](https://apify.com/digital-tools) (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

Pay per event

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

### What does URL Status & Redirect Chain Checker do?

**URL Status & Redirect Chain Checker** is a bulk **HTTP status code checker** and **redirect tracer**. Give it a list of URLs and it returns the **final URL**, **every redirect hop** (301, 302, 303, 307, 308), the **status code**, **response time**, and whether the **scheme** (http→https) or **host** (example.com→www.example.com) changed.

Use it for **SEO redirect audits**, **HTTP to HTTPS checks**, **canonical / vanity URL traces**, and **uptime / status monitoring** — no browser, no API key.

### Why use it?

- 🔗 **Full redirect chain** – each hop includes the URL, status code, `Location` header and time in milliseconds.
- 🚦 **Clear outcome** – `ok`, `statusCode`, `finalUrl`, `redirected`, `hopCount`, `schemeChanged` and `hostChanged` in one row.
- ⚡ **Fast bulk checks** – plain HTTP, many URLs in parallel, response body is not downloaded.
- 🛡️ **Loop and hop limits** – redirect loops and over-long chains are reported instead of hanging.
- 💸 **Pay per URL** – you only pay when an HTTP status is obtained. Timeouts and DNS failures are free.

### How to use it

1. Paste URLs into **URLs** (one per line, or upload a file).
2. Optionally set **Max redirects** (use `0` to inspect only the first response).
3. Click **Start** and export the table as JSON, CSV or Excel, or fetch it through the API.

#### Input example

```json
{
  "startUrls": [
    { "url": "https://example.com" },
    { "url": "http://github.com" }
  ],
  "maxRedirects": 10,
  "requestMethod": "GET"
}
```

#### Output example

```json
{
  "url": "http://github.com",
  "finalUrl": "https://github.com/",
  "statusCode": 200,
  "ok": true,
  "redirected": true,
  "hopCount": 2,
  "schemeChanged": true,
  "hostChanged": false,
  "redirectChain": [
    {"url": "http://github.com", "statusCode": 301, "location": "https://github.com/", "contentType": null, "responseTimeMs": 80},
    {"url": "https://github.com/", "statusCode": 200, "location": null, "contentType": "text/html; charset=utf-8", "responseTimeMs": 130}
  ],
  "contentType": "text/html; charset=utf-8",
  "responseTimeMs": 210,
  "error": null
}
```

### How much does it cost?

This Actor uses **pay-per-event (PPE)** pricing: you pay only for results, and the Apify platform compute it uses is already included.

| Event | Price | Per 1,000 |
|---|---|---|
| URL checked | **$0.0005** per URL | **$0.50** per 1,000 URLs |
| Actor start | $0.0005 per run | – |

Timeouts and DNS failures are **not charged**. You pay only when an HTTP status code is obtained, including 4xx/5xx responses. For example, 1,000 URLs cost about **$0.50**. The Actor start fee is charged once per run (one event per GB of memory; the default memory setting counts as one). You can set a **maximum cost per run** in the run options and the Actor stops cleanly when it is reached. Apify's free plan includes $5 of monthly credit, enough to try it at no cost.

### Use cases

- **SEO redirect audits** – find chains that are too long, HTTP URLs that never upgrade to HTTPS, or hops to the wrong host.
- **After a site migration** – verify that old URLs still land on the right final page.
- **Monitoring** – schedule a daily run of important URLs and alert when a status is no longer 200.
- **Complement to a crawl** – check a known URL list; to discover links on a site, use [Broken Link Checker](https://apify.com/Digital-Tools/broken-link-checker).

### FAQ

**Does it download the whole page?** No. It reads response headers and follows `Location`. The body is not saved.

**HEAD or GET?** GET is the default because some servers handle HEAD poorly. Switch to HEAD if you want to be even lighter.

**What about JavaScript redirects?** Only HTTP redirects are followed. Meta-refresh and JavaScript `location.href` changes are not.

### Other tools by Digital-Tools

- [Webpage to Markdown Converter for LLM & RAG](https://apify.com/Digital-Tools/webpage-to-markdown) – Convert any website or web page URL into clean, LLM-ready Markdown.
- [URL Metadata & Open Graph Link Preview Extractor](https://apify.com/Digital-Tools/url-metadata-extractor) – Bulk extract URL metadata and Open Graph link previews: title, description, og:image, favicon, canonical URL, Twitter Card, RSS feeds and JSON-LD schema.
- [Broken Link Checker - Find 404s & Dead Links](https://apify.com/Digital-Tools/broken-link-checker) – Crawl a website and find broken links, 404s, dead links, 5xx errors, timeouts and redirects.
- [Chinese Simplified/Traditional Converter & Pinyin Toolkit](https://apify.com/Digital-Tools/chinese-text-toolkit) – Bulk convert Simplified and Traditional Chinese (Taiwan and Hong Kong variants, with phrase conversion), generate pinyin with tones or initials, segment Chinese words and extract keywords.
- [Sitemap URL Extractor - Get All URLs from sitemap.xml](https://apify.com/Digital-Tools/sitemap-url-extractor) – Extract every URL from a website sitemap.xml.
- [RSS to JSON Feed Reader - Parse RSS & Atom](https://apify.com/Digital-Tools/rss-feed-reader) – RSS to JSON API: read RSS, Atom and RDF feeds in bulk and get clean JSON (title, link, date, author, categories, summary, full content, images and podcast enclosures).
- [Bulk SSL Certificate Checker & DNS Lookup](https://apify.com/Digital-Tools/ssl-dns-checker) – Bulk SSL certificate expiry checker and DNS lookup for many domains at once: expiry date, days left, issuer, SANs, TLS version and validity, plus A, AAAA, CNAME, MX, NS, TXT, CAA, SOA, SPF and DMARC.
- [PDF to Text Extractor for LLM & RAG (DOCX, PPTX, XLSX)](https://apify.com/Digital-Tools/document-to-text) – PDF to text API plus Word (DOCX), PowerPoint (PPTX) and Excel (XLSX) text extraction by URL.
- [HTML Table Extractor - Tables to CSV & JSON](https://apify.com/Digital-Tools/html-table-extractor) – Extract HTML tables from any web page to CSV and JSON.

Questions or feature requests? Open an issue in the **Issues** tab.

# Actor input Schema

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

URLs to check for HTTP status codes and redirect chains (301/302/303/307/308). Paste one per line or upload a file.

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

Maximum number of redirect hops to follow for each URL. Use 0 to record only the first response and not follow Location.

## `requestMethod` (type: `string`):

HTTP method used for each hop. GET is more reliable; HEAD skips the body but some servers respond incorrectly.

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

How many URLs to check in parallel.

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

Timeout in seconds for each hop in the redirect chain.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    },
    {
      "url": "http://github.com"
    }
  ],
  "maxRedirects": 10,
  "requestMethod": "GET",
  "maxConcurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

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

Dataset with one item per result.

# 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": "https://example.com"
        },
        {
            "url": "http://github.com"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("digital-tools/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 = { "startUrls": [
        { "url": "https://example.com" },
        { "url": "http://github.com" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("digital-tools/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 '{
  "startUrls": [
    {
      "url": "https://example.com"
    },
    {
      "url": "http://github.com"
    }
  ]
}' |
apify call digital-tools/url-status-redirect-checker --silent --output-dataset

```

## MCP server setup

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