# Bulk URL Status & Redirect Checker: Codes, Chains, Headers (`forgeloop/url-status-checker`) Actor

Check status codes and redirects for a list of URLs. Full redirect chain, final URL, response time, time to first byte, content type, server, X-Robots-Tag, HSTS and optional security headers. Flags broken links, redirect loops and http to https moves. Pay per URL.

- **URL**: https://apify.com/forgeloop/url-status-checker.md
- **Developed by:** [Markus Heiß](https://apify.com/forgeloop) (community)
- **Categories:** SEO tools, Developer tools
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 checked urls

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 Checker: Codes, Chains, Headers

Check a list of URLs and get back one row per URL with the final status code, the full redirect chain, the final URL, response times and the headers that matter for SEO and operations.

Built for SEO migrations, redirect audits, link list checks and simple monitoring. The Actor sends one light request per hop, usually HEAD, and does not crawl or scrape pages.

### What it does

- **Follows redirects by hand,** up to 10 hops, and records every hop with its URL, status code and Location target. You see exactly how `http://apple.com` ends up at `https://www.apple.com/`.
- **Returns the final status code and text,** for example `200 OK`, `301 Moved Permanently` or `404 Not Found`, and the final URL.
- **Measures time:** the total response time over all hops and the time to first byte of the final response.
- **Reads key headers** of the final response: content type, content length, server, X-Robots-Tag, Last-Modified and Strict-Transport-Security (HSTS).
- **Summarizes security headers** on request: which of Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy are present and which are missing.
- **Flags problems:** `isBroken` for 4xx and 5xx answers, network errors, timeouts and redirect loops, `redirectLoop`, `httpToHttps` for URLs that move from http to https, and `mixedChainProtocols` for chains that fall back from https to http.
- **Uses HEAD first, GET when needed.** Many servers do not allow HEAD or answer it wrongly. In auto mode the Actor repeats the request with GET when HEAD returns 405, 501 or another error code, or when the connection fails. GET reads at most 64 KB of the page.
- **Polite:** at most 2 parallel requests per host with a short pause between requests, so a list with 1,000 URLs on one site does not hammer it.
- **Safe:** private and local network targets like `192.168.0.1`, `10.0.0.1` or `localhost` are blocked, also when a redirect points there.

### Use cases

- **SEO migrations:** check that every old URL redirects with a 301 to the right new page, in one hop, without loops.
- **Redirect audits:** find redirect chains, temporary redirects (302, 307) that should be permanent, and http to https moves.
- **Link lists:** check the links in a spreadsheet, a newsletter or a link directory and find the broken ones.
- **Monitoring:** run it on a schedule against your key pages and watch status codes and response times.
- **Indexing checks:** find pages that send `X-Robots-Tag: noindex` by mistake.
- **Security reviews:** see which sites of a list send HSTS and the common security headers.

### Input

| Field | Description | Default |
|---|---|---|
| URLs | A list of URLs. URLs without a scheme get `https://` | |
| URLs as text | Optional text block, one URL per line or separated by spaces. Used together with the list | |
| Request method | `auto` (HEAD, then GET when needed), `head` or `get` | `auto` |
| Follow redirects | Follow up to 10 redirects and record every hop | on |
| Security headers | Add the present and missing security headers | off |
| Timeout | Seconds before a single request is given up, 3 to 60 | 15 |
| Parallel URLs | URLs checked at the same time, 1 to 50 | 10 |
| User agent | `neutral` (UrlStatusChecker/0.1) or `browser` (desktop Chrome) | `neutral` |

Example:

```json
{
  "urls": ["http://apple.com", "https://www.google.com/nonexistent-page-404", "https://httpbin.org/redirect/3"],
  "method": "auto",
  "followRedirects": true,
  "securityHeaders": true
}
```

### Output

One dataset item per unique URL:

```json
{
  "inputUrl": "http://apple.com",
  "url": "http://apple.com/",
  "finalUrl": "https://www.apple.com/",
  "statusCode": 200,
  "statusText": "OK",
  "isRedirect": true,
  "redirectCount": 1,
  "isBroken": false,
  "redirectLoop": false,
  "httpToHttps": true,
  "mixedChainProtocols": false,
  "responseTimeMs": 127,
  "ttfbMs": 68,
  "method": "HEAD",
  "contentType": "text/html; charset=utf-8",
  "contentLength": 43302,
  "server": "Apple",
  "xRobotsTag": null,
  "lastModified": null,
  "hsts": "max-age=31536000; includeSubdomains; preload",
  "securityHeaders": {
    "present": ["Strict-Transport-Security", "Content-Security-Policy", "X-Frame-Options", "X-Content-Type-Options", "Referrer-Policy"],
    "missing": ["Permissions-Policy"],
    "score": "5/6"
  },
  "redirectChain": [
    { "url": "http://apple.com/", "status": 301, "location": "https://www.apple.com/", "method": "HEAD" },
    { "url": "https://www.apple.com/", "status": 200, "location": null, "method": "HEAD" }
  ],
  "blocked": false,
  "error": null,
  "checkedAt": "2026-11-15T19:50:03.666Z"
}
```

- The flat fields at the top fill the table view and the CSV export. `redirectChain` holds every request, the last entry is the final response.
- `statusCode`, `finalUrl` and the header fields are `null` when no final answer came back: network errors, timeouts, redirect loops and more than 10 redirects. `error` says why.
- `responseTimeMs` is the time of all requests of the URL added up, including a repeated GET. `ttfbMs` is the time to the first byte of the final response.
- `contentLength` comes from the Content-Length header. Without the header it is the size of a GET body below 64 KB, otherwise `null`.
- `method` shows which request gave the final answer, `HEAD` or `GET`.
- `httpToHttps` is `true` when the URL starts on http and ends on https. `mixedChainProtocols` is `true` when any hop goes from https back to http.
- `blocked` is `true` for private or local targets. These items are free.
- Invalid lines like `ftp://example.com` or `not a url` return an item with only `inputUrl` and `error` set.

Export as JSON, CSV or Excel, or read it through the Apify API.

### Pricing

Pay per URL: 0.001 USD per checked URL, so 1.00 USD per 1,000 URLs. Broken URLs count too, because the check is the product: a 404, a timeout or a domain that does not exist is a result. Invalid input lines, duplicates and blocked private addresses are free. You can cap the cost of a run with the maximum charge setting in Apify.

Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.

### Limits

- The Actor checks HTTP answers only. It does not run JavaScript, so redirects done in JavaScript or with a meta refresh tag are not followed.
- Some servers block automated requests or answer them with 403 or 429. Try the browser user agent for these, or check them again later. The Actor does not bypass bot protection.
- Cookies are not stored between hops. Sites that redirect to set a cookie and then redirect back can show up as a redirect loop.
- Response times are measured from Apify's servers and depend on their location and load. Use them to compare, not as absolute values.
- Fragments (`#part`) are removed, because browsers never send them to the server.
- At most 10 redirects are followed per URL.

### Data source, permitted use and legal

- **Data source:** the HTTP answers of the URLs you enter. The Actor reads status codes and headers and at most 64 KB of a page when it needs a GET. It does not store page content.
- **Snapshot:** Results show the state at the time of the run. We do not guarantee that they are complete, current or correct.
- **For business use:** This Actor is offered to businesses only, not to consumers.
- **Permitted use:** Check only URLs you have a legitimate reason to check, for example your own sites, your customers' sites or links you publish. Respect the terms of use of the sites you check.
- **Your responsibility:** You choose the URLs and decide what happens with the results. If your input or the results contain personal data, you are the controller and need your own legal basis.
- **No circumvention:** The Actor sends plain HTTP requests without login. It does not bypass access restrictions, paywalls, CAPTCHAs or rate limits.
- **Request volume:** At most 2 parallel requests per host with a short pause between requests. Do not use it to put excessive load on a site.
- **Provider:** forgeloop, Markus Heiss, Austria. [Imprint](https://devhem.github.io/forgeloop-legal/imprint.html), [Privacy Notice](https://devhem.github.io/forgeloop-legal/privacy.html), [Terms of Use](https://devhem.github.io/forgeloop-legal/terms.html).

### Questions and issues

Open an issue on the Actor page.

# Actor input Schema

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

URLs to check, one per entry. URLs without a scheme get https://, so example.com becomes https://example.com/. Fragments (#part) are removed, duplicates are removed. Format: a list of strings like \["https://apify.com", "http://example.com/old-page"].

## `urlsText` (type: `string`):

Optional. Paste a whole column of URLs here instead, one per line or separated by spaces. Used together with the list above.

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

Auto sends HEAD first and repeats with GET when the server does not allow HEAD (405, 501), answers HEAD with another error code, or the connection fails. GET reads at most 64 KB of each page.

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

Follow up to 10 redirects and record every hop. Turn off to see only the first answer of each URL.

## `securityHeaders` (type: `boolean`):

Add a summary of which security headers the final response has and which are missing: Strict-Transport-Security, Content-Security-Policy, X-Frame-Options, X-Content-Type-Options, Referrer-Policy and Permissions-Policy.

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

Give up on a single request after this many seconds. A URL that times out counts as broken.

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

How many URLs are checked at the same time. Requests to one host are limited to 2 at a time anyway.

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

Neutral identifies the checker as UrlStatusChecker. Browser sends a desktop Chrome user agent, for servers that answer unknown clients differently.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "http://github.com",
    "https://www.wikipedia.org/this-page-does-not-exist"
  ],
  "method": "auto",
  "followRedirects": true,
  "securityHeaders": false,
  "timeoutSecs": 15,
  "maxConcurrency": 10,
  "userAgent": "neutral"
}
```

# Actor output Schema

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

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

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

```

## MCP server setup

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