# HTTP Status Code Checker (`scrapers-hub/http-status-code-checker`) Actor

HTTP Status Code Checker tests URLs in bulk and reports status code, redirect flag and final redirect target. 🔗 Essential for broken-link audits, site migration QA, redirect-chain validation and technical SEO monitoring.

- **URL**: https://apify.com/scrapers-hub/http-status-code-checker.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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 Code Checker – Bulk URL Redirect & Response Code Audit

The **HTTP Status Code Checker** takes a list of URLs and tells you exactly what each one returns: the HTTP status code, whether the response is a redirect, and where that redirect points. It is a bulk link auditing tool for anyone who needs to know which URLs are alive, which are broken, and which are quietly bouncing traffic somewhere else — without opening a single browser tab.

This HTTP status code checker was built for the practical realities of technical SEO and site maintenance. Migrations create redirect chains. Old campaign links rot. HTTP-to-HTTPS and www-to-apex canonicalisation is easy to get subtly wrong. Feed your URL list in, and you get a clean dataset of `url`, `statusCode`, `isRedirect`, `redirectURL` and `error` that you can sort, filter and hand to a developer as an actionable fix list.

***

### 📊 What Data Can You Extract with This HTTP Status Code Checker?

The output schema is deliberately compact — five fields, one record per URL checked:

| Category | Fields | What it tells you |
|---|---|---|
| 🎯 Request target | `url` | The canonical URL that was checked, echoed back so every result is self-describing |
| 🔢 Response status | `statusCode` | The HTTP status code returned by the server: 200, 301, 302, 404, 410, 500 and so on |
| ↪️ Redirect flag | `isRedirect` | A boolean that makes filtering trivial — no parsing of status-code ranges required |
| 📍 Redirect target | `redirectURL` | The destination URL when the response is a redirect, empty otherwise |
| ⚠️ Failure detail | `error` | The error message when a URL could not be processed at all — DNS failure, connection refused, timeout |

The most operationally useful field is `isRedirect`. Because it is a plain boolean rather than something you have to derive from the status code, a single filter on your export separates every redirecting URL from the rest — which is the first step of virtually every redirect audit, migration QA pass and link-equity investigation.

***

### 🌟 Key Features of the HTTP Status Code Checker

| Feature | Description |
|---|---|
| 📋 Bulk URL checking | Supply a full list of URLs through `startUrls` and get one result row per URL in a single run |
| 🔢 Full status code capture | Returns the actual numeric `statusCode`, not just an alive/dead verdict, so 301 vs 302 vs 307 vs 308 is visible |
| ↪️ Redirect detection | The `isRedirect` boolean and `redirectURL` target let you map exactly where each URL sends traffic |
| ⚠️ Explicit error reporting | Network-level failures are captured in the `error` field instead of silently dropping the URL from the results |
| 🌐 Protocol and host comparison | Check `http://` and `https://`, `www` and apex variants side by side in one run to verify canonicalisation |
| ⚡ Async HTTP engine | Built on `httpx` for asynchronous requests, so a long URL list processes efficiently |
| 🪶 No browser, no proxy | The actor makes direct HTTP requests with no headless browser and no proxy layer, which keeps it fast and predictable |
| 📥 Request-list input editor | The `startUrls` field uses Apify's request-list editor, so you can paste URLs, upload a file or link a remote list |
| 📤 Standard dataset export | Results are written to an Apify dataset, exportable as CSV, JSON, Excel, XML or HTML |

***

### 🚀 Why Choose This HTTP Status Code Checker?

**One request per URL, one row per result.** There is no crawling, no link discovery and no depth setting to get wrong. You supply the exact URLs you care about and get exactly those URLs back, which makes the output trivially joinable against whatever list you started with.

**Redirect targets, not just redirect flags.** Knowing a URL is a 301 is only half the answer. The `redirectURL` field tells you where it lands, which is what you need to detect redirect chains, redirect loops and the classic migration bug where everything redirects to the homepage.

**Failures are data, not gaps.** When a hostname does not resolve or a connection times out, the `error` field records why. A URL that fails silently is a URL you forget about; a URL with an error message in your spreadsheet is a URL that gets fixed.

**No proxy, no browser, no configuration.** This HTTP status code checker has a single input field. There is nothing to tune, no proxy group to select and no browser to warm up — which is exactly what you want from an infrastructure check.

***

### 📥 Input

The HTTP status code checker takes one required field: the list of URLs to check.

```json
{
  "startUrls": [
    { "url": "https://apify.com" },
    { "url": "http://apify.com" },
    { "url": "https://www.apify.com" }
  ]
}
```

#### 🔧 HTTP Status Code Checker Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | array | ✅ Yes | `[{"url":"https://apify.com"},{"url":"http://apify.com"},{"url":"https://www.apify.com"}]` | URLs to check for redirects |

Each entry is an object with a `url` key. The field uses Apify's `requestListSources` editor, so in the Console you can type URLs directly, paste a block of them, upload a file or point at a remote URL list.

#### 💡 Input Examples

**Canonicalisation check** — confirm all four host and protocol variants funnel to one canonical URL:

```json
{
  "startUrls": [
    { "url": "http://example.com" },
    { "url": "http://www.example.com" },
    { "url": "https://example.com" },
    { "url": "https://www.example.com" }
  ]
}
```

**Post-migration URL audit** — verify old URLs redirect to their new homes:

```json
{
  "startUrls": [
    { "url": "https://example.com/old-blog/seo-guide" },
    { "url": "https://example.com/old-blog/link-building" },
    { "url": "https://example.com/products/legacy-sku-1024" }
  ]
}
```

**Outbound link health check** — test the external links on a key page:

```json
{
  "startUrls": [
    { "url": "https://partner-one.example/pricing" },
    { "url": "https://partner-two.example/docs" },
    { "url": "https://partner-three.example/" }
  ]
}
```

***

### 📤 Output

One dataset item per URL checked. This is a real record from an actual run of the HTTP status code checker:

```json
{
  "url": "https://apify.com",
  "statusCode": 200,
  "isRedirect": false,
  "redirectURL": "",
  "error": ""
}
```

#### 🧾 HTTP Status Code Checker Output Fields

| Field | Type | Description |
|---|---|---|
| `url` | string | null | Canonical URL of the checked item |
| `statusCode` | integer | null | HTTP status code returned |
| `isRedirect` | boolean | null | Whether the response is a redirect |
| `redirectURL` | string | null | URL the response redirects to |
| `error` | string | null | Error message, if the URL failed to process |

For a URL that resolves normally, `redirectURL` and `error` come back as empty strings rather than nulls, as in the sample above. For a redirecting URL, expect `isRedirect` to be `true`, `statusCode` to be in the 3xx range, and `redirectURL` to hold the destination. For a URL that never reached a server at all — bad DNS, refused connection, timeout — the `error` field carries the reason and `statusCode` will not be a meaningful response code.

***

### 💻 How to Use the HTTP Status Code Checker (Step by Step)

#### Step 1: Assemble the URL List You Need to Audit

Decide what you are actually testing before you build the list. A canonicalisation audit needs the four protocol and host permutations of a handful of pages. A migration QA pass needs every old URL from your pre-migration sitemap. A link-rot sweep needs the outbound links extracted from your content. Each of these is a different list, and mixing them makes the results harder to read.

#### Step 2: Enter the URLs into `startUrls`

Open the actor's input tab and add your URLs to the `startUrls` field. Because it uses the request-list editor, you are not limited to typing entries one at a time — you can paste a block of URLs, upload a text or CSV file, or point at a remotely hosted list. The field arrives prefilled with three example URLs; clear those before adding your own.

#### Step 3: Run the HTTP Status Code Checker

Press **Start**. The actor issues one asynchronous HTTP request per URL and records the response. There is no browser to launch and no proxy handshake, so results begin appearing almost immediately. The run log shows progress as URLs are processed.

#### Step 4: Filter the Dataset by Status Code

Open the **Dataset** tab and sort or filter on `statusCode`. Work through the classes in order of severity: 5xx first, because server errors mean something is actively broken; then 4xx, which are broken links; then 3xx, which are working but may be inefficient. Anything returning 200 needs no action.

#### Step 5: Trace Redirect Chains Using `redirectURL`

Filter to `isRedirect: true` and examine the `redirectURL` values. If a destination URL is itself in your list and also flagged as a redirect, you have a chain. If a destination points back to an earlier URL, you have a loop. If everything redirects to the homepage, your migration rules are matching too broadly. Chains and homepage-dumping both waste crawl budget and dilute link value, and both are only visible when you have the destination URL in hand.

#### Step 6: Investigate Every Populated `error` Field

Records with a non-empty `error` never reached a server. Read the message: DNS resolution failures usually mean a domain has expired or was mistyped; connection refused means the host is up but nothing is listening on that port; timeouts point at an overloaded or firewalled server. Each has a different fix, and the error text tells you which one you have.

#### Step 7: Export the Fix List and Re-run to Verify

Export as CSV, filter to the problem rows, and hand that list to whoever owns the fix. Once the changes are deployed, re-run the same `startUrls` input. A clean second run — all 200s, no errors, no unintended redirects — is the proof that the work landed.

***

### 🔌 API Access & Integrations

Run the HTTP status code checker from your own scripts or CI pipeline. The synchronous endpoint starts a run and returns the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~http-status-code-checker/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "startUrls": [
      { "url": "https://apify.com" },
      { "url": "http://apify.com" },
      { "url": "https://www.apify.com" }
    ]
  }'
```

Using the official Python client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "startUrls": [
        {"url": "https://example.com/old-page"},
        {"url": "https://example.com/another-old-page"},
    ]
}

run = client.actor("scrapers-hub/http-status-code-checker").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if item["statusCode"] != 200:
        print(item["url"], item["statusCode"], item["redirectURL"], item["error"])
```

The actor plugs into Apify's standard integrations for Zapier, Make, Google Sheets, Slack and generic webhooks — useful for firing a Slack alert the moment a scheduled check finds a 5xx.

***

### 💡 Best Use Cases for HTTP Status Code Data

#### 🧭 Site Migration QA

After a replatform or URL restructure, run every legacy URL through the checker. You want `isRedirect: true`, a `statusCode` of 301, and a `redirectURL` that points at the genuine equivalent page. Anything returning 404 has lost its link equity, and anything redirecting to the homepage has lost its relevance.

#### 🔒 HTTPS and Canonicalisation Auditing

Check `http://` and `https://` alongside `www` and apex variants of the same page. A correct configuration shows three of the four variants with `isRedirect: true` and a `redirectURL` pointing at a single canonical form, and that canonical form returning `statusCode` 200. Anything else is a duplicate-content risk.

#### 🔗 Broken Link and Link Rot Detection

Feed in the outbound links from your key content pages and filter on `statusCode` values of 404 and 410 plus any populated `error`. External sites disappear constantly, and broken outbound links quietly erode both user experience and the perceived quality of a page.

#### ⛓️ Redirect Chain Elimination

Use `redirectURL` to build a graph of where URLs point. Multi-hop chains slow page loads and waste crawl budget; every hop is an extra round trip before the user sees content. Once the chains are visible, flattening them to a single redirect is usually a small configuration change.

#### 📡 Uptime and Deployment Verification

Run a short list of critical URLs — homepage, checkout, login, key API endpoints — on a schedule and alert on any `statusCode` in the 5xx range or any non-empty `error`. This is a lightweight smoke test that runs independently of your own infrastructure, so it still fires when your own monitoring is the thing that is down.

#### 📈 SEO Crawl Budget Optimisation

Search engines allocate finite crawl resources per site. Every 3xx and 4xx a crawler encounters is budget spent on nothing. Auditing `statusCode` across your sitemap URLs and eliminating avoidable redirects and dead pages puts that budget back into pages you actually want indexed.

#### 🤝 Affiliate and Partner Link Monitoring

Affiliate links are especially prone to silent breakage as programmes change or terminate. Scheduling a check across your affiliate and partner URLs and watching for changes in `statusCode` and `redirectURL` catches a dead revenue link in days rather than at the end of a quarter.

***

### ⚙️ Tips for Better HTTP Status Code Checking

- **Include the protocol on every URL.** Entries need to be fully qualified — `https://example.com/page`, not `example.com/page`. Bare hostnames are a common cause of unexpected entries in the `error` field.
- **Test protocol and host variants deliberately.** To validate canonicalisation you need all four permutations of `http`/`https` and `www`/apex in the list. Checking only the one you expect to work tells you nothing about the other three.
- **Split large audits into themed batches.** Separate runs for sitemap URLs, outbound links and campaign URLs keep each dataset interpretable, and let you schedule them at different frequencies.
- **Re-run after every fix.** The checker is as useful for verification as for discovery. A clean re-run of the same input is the cleanest possible evidence that a redirect fix actually shipped.
- **Distinguish 301 from 302 explicitly.** Both set `isRedirect` to `true`, but only the numeric `statusCode` tells you whether the redirect is permanent. Temporary redirects left in place after a permanent move are a persistent and easily missed SEO problem.
- **Store dated results.** Keep each run's dataset with its date. Comparing this month's `statusCode` column against last month's surfaces newly broken links without any additional tooling.

***

### 🛠️ Troubleshooting

**A URL returned an `error` instead of a status code.**
The request never reached a server. Read the message: DNS errors mean the hostname does not resolve, connection refused means nothing is listening, and a timeout means the server took too long. Confirm the URL is correct and reachable, then re-run just that entry.

**`isRedirect` is false but I know the page redirects.**
Some redirects are performed client-side with JavaScript or a meta refresh rather than an HTTP 3xx response. Those are invisible at the HTTP layer, so the server correctly returns 200 and this checker reports 200. Only server-level redirects appear in `statusCode` and `redirectURL`.

**I get a 403 for a URL that works in my browser.**
The target server is filtering non-browser requests. This actor makes plain HTTP requests without a proxy layer, so sites with aggressive bot protection may respond differently to it than to your browser session.

**`redirectURL` shows only one hop, but there is a chain.**
Each record reports the immediate redirect destination for the URL you supplied. To follow a chain, add the returned `redirectURL` values as inputs to a follow-up run and repeat until everything resolves to a 200.

**The run finished with fewer records than URLs I submitted.**
Check for duplicates in your input list and confirm every entry is a properly formed object with a `url` key. Malformed entries are the usual cause of a count mismatch.

***

### ❓ Frequently Asked Questions About HTTP Status Code Checking

**What does the HTTP Status Code Checker do?**
It sends one HTTP request per URL you supply and records the response: the numeric status code, whether it is a redirect, the redirect destination, and any error that prevented the request from completing.

**How many URLs can I check in a single run?**
The `startUrls` field is a list with no fixed cap in the schema. Practical limits come down to run time rather than a hard-coded number, so very large audits are best scheduled rather than run interactively.

**Does the HTTP status code checker follow redirect chains automatically?**
Each record reports the immediate redirect target in `redirectURL`. To trace a full chain, feed the returned destinations into a subsequent run.

**Can it detect JavaScript or meta-refresh redirects?**
No. Those happen after the HTTP response is delivered, so the server legitimately returns 200. This tool reports server-level HTTP responses only.

**What is the difference between `isRedirect` and `statusCode`?**
`isRedirect` is a convenience boolean for filtering. `statusCode` gives you the precise code, which matters because 301 and 302 have very different SEO implications despite both being redirects.

**Do I need a proxy to run the HTTP status code checker?**
No. The actor makes direct requests without a proxy layer, which keeps behaviour predictable and results fast.

**Why is `redirectURL` an empty string rather than null?**
For URLs that do not redirect, the field is returned as an empty string, as shown in the real sample output. Treat empty string and null equivalently when filtering.

**Can I use this as an uptime monitor?**
Yes, within limits. Schedule a run against your critical URLs and alert on 5xx codes or populated `error` values through a Slack or webhook integration. It is a periodic check rather than continuous monitoring.

**Does it check whether the page content is correct?**
No. It reports the HTTP response only. A page can return 200 while displaying an error message; verifying content requires a different tool.

**What export formats does the dataset support?**
JSON, CSV, Excel, XML, RSS and HTML through the Console, plus programmatic access through the Apify API and official clients.

**Can I run the HTTP status code checker from CI?**
Yes. Call the `run-sync-get-dataset-items` endpoint from your pipeline and fail the build if any record has a `statusCode` outside your accepted range.

**Will it check URLs behind a login?**
No. There is no authentication input, so protected URLs will return whatever the server serves to an unauthenticated request — typically a 401, 403 or a redirect to a login page.

**How should I handle 429 responses?**
A 429 means the target server is rate limiting. Reduce the number of URLs you send to that host in a single run, or space checks out over time.

**Is it suitable for checking a whole sitemap?**
Yes. Extract the URLs from your XML sitemap and load them into `startUrls`. Filtering the results by `statusCode` gives you an immediate picture of sitemap health.

**Is checking HTTP status codes on third-party sites acceptable?**
Issuing a normal HTTP request to a public URL is ordinary web traffic. Keep volumes reasonable, respect each site's terms of service, and see the disclaimer below.

***

### 🆘 Support & Feedback

If something is not behaving as expected — a URL returning an error you cannot explain, or a redirect that is not being reported — open a ticket on the **Issues** tab of this actor. Including the URL and the run ID makes it possible to reproduce and fix quickly.

Need a custom variant — additional response headers, response timing, redirect-chain following built in, or content assertions? Email **scraperhubapi@gmail.com** and describe the check you want automated.

If the HTTP Status Code Checker saves you an afternoon of manual link testing, please leave a review on the actor page. Ratings help other SEO and engineering teams find the tool and steer what gets built next.

***

### ⚖️ Disclaimer

The HTTP Status Code Checker issues standard, publicly accessible HTTP requests to the URLs you supply and records the responses returned. It does not bypass authentication, does not attempt to access protected resources, and collects no page content beyond the HTTP response metadata described above.

You are responsible for the URLs you submit and for how you use the results. Check only URLs you own or have a legitimate reason to test, keep request volumes reasonable so you do not place unnecessary load on third-party servers, and comply with the terms of service of any site you check. Automated requests at high volume against a site you do not control may be treated as abusive traffic by that site's operators.

The output of this HTTP status code checker reflects the response returned at the moment of the request. Status codes change as sites are deployed, reconfigured or taken offline, so treat every result as a point-in-time observation rather than a permanent fact.

Although this actor collects URL and response metadata rather than personal data, URLs can occasionally embed personal identifiers such as usernames or tokens. Where that is the case, GDPR, UK GDPR, CCPA and equivalent privacy laws may apply to the resulting dataset, and you should handle it accordingly.

If you believe data collected by this actor relates to you and should be removed, contact **scraperhubapi@gmail.com** with the details and the request will be actioned.

# Actor input Schema

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

URLs to check for redirects

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "http://apify.com"
    },
    {
      "url": "https://www.apify.com"
    }
  ]
}
```

# Actor output Schema

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

Records scraped by HTTP Status Code Checker, stored in the run's default dataset.

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

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/http-status-code-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://apify.com" },
        { "url": "http://apify.com" },
        { "url": "https://www.apify.com" },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/http-status-code-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://apify.com"
    },
    {
      "url": "http://apify.com"
    },
    {
      "url": "https://www.apify.com"
    }
  ]
}' |
apify call scrapers-hub/http-status-code-checker --silent --output-dataset

```

## MCP server setup

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