# URL Redirect Auditor | Broken Links & HTTP Status (`sbio-apps/url-redirect-auditor`) Actor

Audit supplied URLs for HTTP status, full redirect chains, loops, missing Location headers and HTTPS downgrades. Distinguish broken responses from access denials and rate limits. Export structured URL checks for SEO migrations and link maintenance.

- **URL**: https://apify.com/sbio-apps/url-redirect-auditor.md
- **Developed by:** [Austin Aryain](https://apify.com/sbio-apps) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 completed url audits

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

### What does URL Redirect Auditor do?

Check supplied public URLs and export HTTP status plus every observed redirect hop. Useful for validating a site migration, checking a URL list before a crawl, or maintaining links on a schedule.

### Quick start

Paste 1-200 URLs into the input and start a run. Download the dataset as JSON or CSV, or retrieve it through Apify's API. Save the input as a task to run the same audit on a schedule.

The Actor sends HEAD requests and falls back to GET when a server explicitly returns 405 or 501. GET response bodies are discarded. It follows HTTP 301, 302, 303, 307 and 308 redirects, resolves relative targets and records each destination. A check is bounded to 15 seconds and at most nine HTTP destinations (eight followed redirects).

### Price

**$0.002 per completed URL audit ($2 per 1,000).** Platform usage is included. An observed 404, 500, 403, 429 or redirect problem is a useful audit result and is charged. Network, DNS, TLS, timeout and prohibited-destination failures are recorded as free errors in OUTPUT. No separate Actor-start or dataset-item fees. The spending limit is checked before the next URL is requested.

Checking 100 URLs once costs $0.20 when every check completes. Repeating it daily for 30 days costs $6.00. All-network-error runs fail with no successful event charges.

### Output

Each dataset record contains inputUrl, checkedAt, outcome, finalUrl, finalStatus, redirectCount, durationMs and chain. Chain entries contain url, statusCode, method and the resolved Location target when valid. finalUrl is the last URL to return an HTTP response, including when a redirect cannot be followed.

Outcomes distinguish ok, http\_error, access\_denied (401/403), rate\_limited (429), unexpected\_status, redirect\_loop, missing\_location, invalid\_redirect, https\_downgrade and redirect\_limit. A 403 or 429 does not establish that a link is broken for ordinary visitors. HTTPS-to-HTTP redirects are reported without following them. Private-network targets and credential-bearing URLs are never requested.

OUTPUT lists successfulChecks, errors, stopped and uncheckedUrls. Runs stop before the platform timeout and leave remaining addresses explicit. Input duplicates are checked once per run. There is no retained cross-run history; save outputs in your own pipeline if comparing audits over time.

### Limits and interpretation

Only supplied URLs and their HTTP redirects are requested. This is not a site crawler, browser renderer or security scanner. JavaScript redirects, meta refresh, page content and soft 404s are not analyzed. Some servers handle HEAD differently from GET even when they do not return 405/501. Results reflect Apify's network and check time; authentication, geolocation and anti-bot responses may differ from a visitor's browser. The Actor does not bypass access restrictions or automatically retry rate-limited responses.

Use public HTTP(S) URLs on standard ports, without usernames or passwords in the URL. Do not submit secret-bearing links. Use a run timeout of 240 seconds. Large or slow batches may stop early; run the listed uncheckedUrls separately. Report reproducible problems through the Actor's Issues tab without including secrets.

### Input example

```json
{
  "urls": [
    "https://example.com/"
  ]
}
```

See the Input tab for all supported fields. Results are available through the dataset API and can be downloaded as JSON, CSV or Excel.

### Output fields

| Field | Meaning |
|---|---|
| inputUrl | Supplied URL after normalization. |
| checkedAt | string |
| outcome | string |
| finalUrl | Last URL that returned an HTTP response. |
| finalStatus | integer or null |
| redirectCount | Redirect responses observed, including a final unresolved redirect. |
| durationMs | Elapsed request time. |
| chain | Ordered HTTP destinations and observed redirect targets. |

### Output example

Illustrative completed check; exact source values vary.

```json
{
  "inputUrl": "https://example.com/",
  "checkedAt": "2026-09-07T12:00:00.000Z",
  "outcome": "ok",
  "finalUrl": "https://example.com/",
  "finalStatus": 200,
  "redirectCount": 0,
  "durationMs": 150,
  "chain": [
    {
      "url": "https://example.com/",
      "statusCode": 200,
      "method": "HEAD",
      "location": null
    }
  ]
}
```

# Actor input Schema

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

1-200 public HTTP(S) URLs on standard ports. Checks only these addresses and their redirects; does not crawl links on pages.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/"
  ]
}
```

# Actor output Schema

## `checks` (type: `string`):

Priced dataset records, including observed unchanged checks or HTTP audit errors as documented.

## `summary` (type: `string`):

Free errors, spending/time stops and unprocessed inputs.

# 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://example.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sbio-apps/url-redirect-auditor").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://example.com/"] }

# Run the Actor and wait for it to finish
run = client.actor("sbio-apps/url-redirect-auditor").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://example.com/"
  ]
}' |
apify call sbio-apps/url-redirect-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sbio-apps/url-redirect-auditor"
        }
    }
}

```

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/G5oH04INrp5ugpxmM/builds/Ap0kSLMCqPcxeksVF/openapi.json
