# Http Status Scanner (`zerobreak/http-status-scanner`) Actor

HTTP status scanner that checks URL status codes and redirect chains in bulk. Built for SEO teams and developers who need to catch broken links and verify redirects at scale.

- **URL**: https://apify.com/zerobreak/http-status-scanner.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 1 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.99 / 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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## HTTP Status Scanner: Check URL status codes and redirect chains in bulk

HTTP Status Scanner checks the HTTP status code, redirect chain, and response time for any list of URLs. Drop in a batch of URLs and get a dataset showing what each one actually returns: a 200, a redirect chain ending somewhere unexpected, a 404, or a server error. Good before site launches, after migrations, and during SEO audits when you need to know what your URLs are doing without opening each one by hand.

### Use cases

- **SEO auditing**: find pages returning 404 errors or unexpected redirects before they show up as crawl issues
- **Site migration**: verify that old URLs redirect correctly to new destinations after a domain change or URL restructure
- **Pre-launch QA**: confirm that every published URL resolves before a site goes live
- **Broken link detection**: scan URLs from a sitemap or crawl export to catch dead links in bulk
- **Redirect chain cleanup**: identify chains longer than two hops that add latency and split link equity across hops

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | string | - | A single URL to check. Combined with the `urls` list if both are provided. |
| `urls` | array | - | List of URLs to check, one per line. |
| `followRedirects` | boolean | true | Follow redirects and record each hop. Disable to capture only the first response. |
| `maxRedirects` | integer | 10 | Maximum redirects to follow per URL before reporting an error. |
| `maxUrls` | integer | 100 | Maximum URLs to process per run. Hard cap at 1000. |
| `requestTimeoutSecs` | integer | 30 | Per-request timeout in seconds. |
| `timeoutSecs` | integer | 300 | Overall actor timeout in seconds. |
| `proxyConfiguration` | object | Datacenter (Anywhere) | Proxy type and location for requests. Supports Datacenter, Residential, Special, and custom proxies. Optional. |

#### Example input

```json
{
    "urls": [
        "https://apify.com/",
        "https://apify.com/store",
        "http://apify.com/blog"
    ],
    "followRedirects": true,
    "maxRedirects": 10,
    "maxUrls": 100,
    "requestTimeoutSecs": 30,
    "proxyConfiguration": { "useApifyProxy": true }
}
```

### What data does this actor return?

The actor stores one record per URL in the Apify dataset. Each record contains:

```json
{
    "url": "http://apify.com/blog",
    "finalUrl": "https://apify.com/blog",
    "statusCode": 200,
    "statusText": "OK",
    "redirectCount": 1,
    "redirectChain": ["https://apify.com/blog"],
    "responseTimeMs": 312,
    "contentType": "text/html; charset=utf-8",
    "checkedAt": "2025-03-04T10:22:45.123456+00:00",
    "error": null
}
```

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | Original URL submitted for checking. |
| `finalUrl` | string | Final URL after all redirects. Matches the original if no redirects occurred. |
| `statusCode` | integer | HTTP status code (e.g. 200, 301, 404, 500). Null on network error. |
| `statusText` | string | HTTP reason phrase (e.g. OK, Not Found). Null on error. |
| `redirectCount` | integer | Number of redirects followed. Zero means the URL responded directly. |
| `redirectChain` | array | Ordered list of intermediate URLs visited during redirects. |
| `responseTimeMs` | integer | Total response time in milliseconds, including all redirect hops. |
| `contentType` | string | Content-Type header from the final response. |
| `checkedAt` | string | ISO 8601 timestamp of when the URL was checked. |
| `error` | string | Error message if the request failed. Null on success. |

### How it works

1. The actor reads the `url` and `urls` inputs, deduplicates them, and adds `https://` to any URL missing a scheme.
2. For each URL, it sends an HTTP GET request with a realistic browser User-Agent and follows up to `maxRedirects` redirects.
3. It records the status code, final destination, every redirect hop, the response time, and the Content-Type header.
4. If a request times out, exceeds the redirect limit, or fails for any other reason, it records an error instead of stopping.
5. Results are pushed to the Apify dataset as they complete, one record per URL.

### Integrations

Connect HTTP Status Scanner with other apps using [Apify integrations](https://apify.com/integrations). Schedule it to run on a cron, pipe results into Google Sheets via Make or Zapier, or trigger downstream workflows with [webhooks](https://docs.apify.com/integrations/webhooks) whenever new results are ready.

### FAQ

**Can this actor check HTTP status codes without following redirects?**
Yes. Set `followRedirects` to `false` and the actor returns the first response status code without following any 3xx redirects.

**How many URLs can it check per run?**
Up to 1000 URLs per run (set via `maxUrls`). For larger lists, run the actor multiple times or split the input across runs.

**What counts as an error in the output?**
Timeouts, connection failures, SSL errors, and too-many-redirects all produce a record with a non-null `error` field. The actor never stops on a single bad URL.

**Does it work with HTTP and HTTPS URLs?**
Yes. Both protocols are supported. URLs without a scheme get `https://` prepended automatically.

**Can I use this to monitor URLs on a schedule?**
Yes. Save your URL list as the actor input, then set up a schedule in the Apify console to run it daily or weekly.

If you manage a large site, this handles the kind of URL checking that otherwise eats an afternoon of clicking through browser tabs.

# Actor input Schema

## `url` (type: `string`):

A single URL to check. Combined with the 'urls' list if both are provided.

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

List of URLs to check. Enter one URL per line. Combined with the single 'url' field if both are provided.

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

If enabled, the actor follows redirects and records each hop in the redirect chain. Disable to capture only the first response status code.

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

Maximum number of redirects to follow for a single URL before reporting a 'Too many redirects' error. Hard cap at 20.

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

Maximum number of URLs to check per run. Use to control cost and run time. Hard cap at 1000.

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

Timeout in seconds for each individual HTTP request. URLs that exceed this are recorded as errors.

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

Overall actor run timeout in seconds. The run stops after this limit even if not all URLs have been checked.

## `proxyConfiguration` (type: `object`):

Select proxies to use for requests. Helps avoid IP blocking and rate limits. Datacenter proxies are fastest; Residential proxies are harder to detect.

## Actor input object example

```json
{
  "url": "https://apify.com/",
  "urls": [
    "https://apify.com/",
    "https://apify.com/store"
  ],
  "followRedirects": true,
  "maxRedirects": 10,
  "maxUrls": 100,
  "requestTimeoutSecs": 30,
  "timeoutSecs": 300,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# 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 = {
    "url": "https://apify.com/",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/http-status-scanner").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 = {
    "url": "https://apify.com/",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/http-status-scanner").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 '{
  "url": "https://apify.com/",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call zerobreak/http-status-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zerobreak/http-status-scanner"
        }
    }
}

```

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/vH1cOmJqPY87Y8Ifu/builds/2gdbuG8UVm6uhf4Vi/openapi.json
