# Bulk URL Status and Redirect Checker (`greenrun/url-status-checker`) Actor

Check HTTP status, final URL and the full redirect chain for a list of URLs, with response time, content type and error type (DNS, TLS, timeout). One request per URL. URLs disallowed by robots.txt are reported free.

- **URL**: https://apify.com/greenrun/url-status-checker.md
- **Developed by:** [Greenrun](https://apify.com/greenrun) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 url checkeds

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 and Redirect Checker

Check HTTP status, final URL and the full redirect chain for a list of URLs, with response time, content type and error type (DNS, TLS, timeout). One request per URL. URLs disallowed by robots.txt are reported free.

Give it a list of links and get, for each one, **the first HTTP status, every redirect hop, the final URL and its status**, the response time and, when a link fails, **why: DNS, TLS certificate, timeout or connection**. Use it for broken link checks, redirect audits after a site migration, monitoring of landing pages, or as a quick "is this URL alive?" tool for AI agents. **You pay $0.0003 per URL checked plus a start fee of $0.0045 per run; URLs that robots.txt disallows are reported for free.**

### What it does

- **Checks** each URL with one request per hop: GET reading only the headers (the page body is not downloaded), or HEAD if you prefer.
- **Follows redirects** (301, 302, 303, 307, 308) and lists every hop with its status, `Location` and time; reports redirect loops and chains longer than your limit.
- **Classifies failures**: `dns_error`, `tls_error` (with the certificate problem, for example an expired certificate), `timeout`, `connection_error`, and HTTP `client_error` / `server_error`.
- **Returns headers you usually need**: `Content-Type`, `Content-Length`, `Last-Modified`, `Server` and `X-Robots-Tag` of the final answer.
- **Never retries**: what you see is what the server answered to one request.

### Why use it

- **Cheap for large batches.** $0.0003 per URL plus one start fee of $0.0045 per run at the default 256 MB: 1,000 links cost $0.3045.
- **The whole chain, not just the end.** First status, final status and every hop in between, so you can find `http → https → www → final` chains and fix them.
- **Errors you can act on.** A DNS failure, an expired certificate and a timeout are different problems; each gets its own status.
- **Respectful.** robots.txt is checked before every hop and its Crawl-delay is kept; private network addresses are refused. No proxies, no CAPTCHA solving, no login.
- **Built for AI agents.** Clear status messages, a predictable price per URL, and limited permissions, so it works as a tool in the Apify MCP server.

### How to use

#### In Apify Console

1. Paste the links into **URLs**, one per line.
2. Optional: switch **Request method** to HEAD, turn off **Follow redirects**, or change **Timeout per request**.
3. Press **Start**. The **Overview** shows the first and final status, the final URL, the number of redirects and the response time.

#### From an AI agent (MCP)

Connect any MCP client to the Apify MCP server with only this Actor as a tool:

```
https://mcp.apify.com?tools=greenrun/url-status-checker
```

#### Through the API

```bash
curl -X POST "https://api.apify.com/v2/acts/greenrun~url-status-checker/run-sync-get-dataset-items" \
  -H "Authorization: Bearer <APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["https://docs.apify.com", "http://python.org"]}'
```

### Input

| Field | Default | Description |
|---|---|---|
| `urls` | | Links to check, one per line. `index` keeps the input order. |
| `method` | `GET` | `GET` (headers only, the body is not downloaded) or `HEAD`. |
| `followRedirects` | `true` | Follow redirects and report every hop. |
| `maxRedirects` | `10` | Stop after this many redirects (1-30). |
| `timeoutSecs` | `15` | Time limit per request (2-120). robots.txt is waited for at most 15 s: a site whose robots.txt does not answer gets `timeout`. |
| `maxConcurrency` | `10` | URLs checked at the same time (1-50). |

### Output

Two rows from a run on the Apify platform on 19 November 2026 (10 URLs):

```json
{
  "index": 2,
  "input": "http://python.org",
  "url": "http://python.org",
  "status": "ok",
  "httpStatus": 301,
  "finalStatus": 200,
  "finalUrl": "https://www.python.org/",
  "redirectCount": 1,
  "redirectChain": [
    {"url": "http://python.org", "status": 301, "location": "https://www.python.org/", "timeMs": 41},
    {"url": "https://www.python.org/", "status": 200, "location": null, "timeMs": 18}
  ],
  "responseTimeMs": 41,
  "totalTimeMs": 233,
  "contentType": "text/html; charset=utf-8",
  "contentLength": 11389,
  "lastModified": null,
  "server": "nginx",
  "xRobotsTag": null,
  "error": null,
  "checkedAt": "2026-11-19T19:51:44Z",
  "billableEvents": {"url-checked": 1}
}
```

```json
{
  "index": 4,
  "input": "https://expired.badssl.com/",
  "status": "tls_error",
  "httpStatus": null,
  "finalStatus": null,
  "finalUrl": "https://expired.badssl.com/",
  "redirectChain": [],
  "error": "TLS certificate problem: certificate has expired",
  "billableEvents": {"url-checked": 1}
}
```

The same run gave `client_error` (404), `server_error` (500), `dns_error` for a domain that does not exist and `robots` (free) for a Wikipedia page that robots.txt disallows. Final status message: `Done: 9 of 10 URLs checked (5 ok, 1 client error, 1 server error, 1 dns error, 1 tls error); 1 disallowed by robots.txt (not charged, see RUN-REPORT)`.

Rows also have `workGbSecs`: the GB-seconds of run time the URL's check used (its share when URLs are checked at the same time), which sets its number of events.

`status` is one of `ok`, `redirect` (the chain ends on a 3xx), `client_error`, `server_error`, `dns_error`, `tls_error`, `timeout`, `connection_error`, `too_many_redirects`, `redirect_loop` (each one `url-checked` event), or the free `robots`, `blocked` (private address) and `invalid`.

### Pricing

Pay per event, no subscription:

| Event | Price | When |
|---|---|---|
| Actor start | $0.0045 per started GB of memory | Once per run: $0.0045 at the default 256 MB, $0.009 at 2 GB. |
| URL checked | $0.0003 | One URL checked: HTTP status or a definite error (DNS, TLS, timeout). One more for each started 2 GB-seconds of the URL's check (see below). URLs disallowed by robots.txt are free. |

| URLs in one run (256 MB) | Price |
|---|---|
| 1 | $0.0048 |
| 5 | $0.006 |
| 20 | $0.0105 |
| 1,000 | $0.3045 |

Free: URLs disallowed by robots.txt, private network addresses and invalid URLs.

**Slow URLs.** A URL whose check takes long (a dead or slow server, a long timeout, a robots.txt Crawl-delay) is charged one more `url-checked` for each started 2 GB-seconds of its check: 8 seconds at the default 256 MB when one URL is checked at a time. URLs checked at the same time share the run time, so with the default 10 parallel checks a URL can take about 80 seconds before its second event. A normal URL is answered within a second and costs one event; each row shows its `billableEvents` and `workGbSecs`.

**Runs that end early.** The start fee pays for starting the Actor and for the work on URLs before their answer is known (DNS, and robots.txt for at most 15 s per site). A run whose URLs are mostly free or dead stops when its charges no longer pay for the run time, instead of running on at a loss; the URLs it did not check are listed in the `RUN-REPORT` record under `notProcessedInputs`, so you can start them in a new run.

You can cap the cost of a run with the maximum charge in the run options; the run stops cleanly at that limit and the status message says so. The smallest maximum that starts a run is $0.015 (the start at 2 GB and a few URLs).

### Limits

- No JavaScript: client-side redirects (meta refresh, `location.href`) are not followed, only HTTP redirects.
- One request per hop and no retries: a server that is briefly down shows as down.
- Sites that refuse automated access answer `403` or block in robots.txt; such answers are reported as they are.
- Up to 100,000 URLs per run.
- A run stops early when its charges no longer pay for its run time (mostly free or dead URLs); see Pricing.

### FAQ

**Do you keep the data?** No. Results stay in your run's dataset in your own Apify account, under your data retention settings.

**Why GET and not HEAD by default?** Many servers answer HEAD with 405 or 403 although the page works in a browser. GET with only the headers read gives the browser's answer at almost the cost of HEAD.

**Why was a URL not charged?** Each free row has its reason in the `error` field, and the `RUN-REPORT` record in the key-value store counts them.

**Why was a URL charged more than once?** Its check took longer than one event covers (a slow server, a long timeout, a Crawl-delay); see Pricing. `workGbSecs` in the row shows how long.

**Something is wrong with a result?** Open an issue on the Actor's **Issues** tab with the URL.

# Actor input Schema

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

Links to check (http or https), one per line. Each URL becomes one row; the index field keeps the input order.

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

GET reads only the response headers and closes the connection, so the page body is not downloaded; servers answer GET the way browsers see it. HEAD sends no body request at all, but some servers answer HEAD differently (405, 403).

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

Follow 301, 302, 303, 307 and 308 to the final URL and report every hop. Off: report only the first answer.

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

Stop after this many redirects (status too_many_redirects).

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

A server that does not answer within this time gives status timeout; robots.txt is waited for at most 15 s. A URL whose check takes long costs more: one more url-checked for each started 2 GB-seconds of its check (8 s at 256 MB, one URL at a time).

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

How many URLs are checked at the same time. Requests to one site are still spaced by its robots.txt Crawl-delay.

## Actor input object example

```json
{
  "urls": [
    "https://docs.apify.com",
    "http://python.org"
  ],
  "method": "GET",
  "followRedirects": true,
  "maxRedirects": 10,
  "timeoutSecs": 15,
  "maxConcurrency": 10
}
```

# Actor output Schema

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

No description

## `report` (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://docs.apify.com",
        "http://python.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("greenrun/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://docs.apify.com",
        "http://python.org",
    ] }

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

```

## MCP server setup

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