# Bulk Link Checker (`rock-ai-tools/bulk-link-checker`) Actor

Check the HTTP status of a batch of URLs: finds broken links (4xx/5xx), dead redirects and slow responses. Only checks headers/status, never downloads or serves the linked page content.

- **URL**: https://apify.com/rock-ai-tools/bulk-link-checker.md
- **Developed by:** [Rock AI Tools](https://apify.com/rock-ai-tools) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 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 Link Checker — find broken links before your users do

Give it a list of URLs. Get back, for every one: HTTP status, whether it's broken, where it redirects
to, and how long it took to respond. No content is downloaded or served — only headers/status codes.

### Why this matters

A broken link on a website, in a README, in documentation or in an email campaign costs trust and,
often, a sale — and it's invisible until a user (or a customer) hits it first. Checking a list by hand
one URL at a time doesn't scale past a handful of links.

- **Catches dead links before your users do**: 404s, 5xx errors, expired redirects.
- **Flags slow endpoints**: response time in milliseconds for every URL, so you can spot what's dragging.
- **Redirect-aware**: reports the final URL after redirects, so you can find outdated links that still
  "work" but point to the wrong place.
- **Smart method fallback**: uses a lightweight `HEAD` request by default, and automatically retries with
  `GET` for servers that reject `HEAD` — so results aren't skewed by server quirks.
- **No scraping, no content stored**: it only checks status codes, never downloads or republishes the
  linked pages, so it's safe to run against sites you don't own.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `urls` | array of strings | — (required) | The URLs to check. Duplicates and blank lines are ignored. |
| `timeoutMs` | integer | `10000` | Milliseconds to wait for a response before marking a URL as timed out. |
| `followRedirects` | boolean | `true` | Follow redirects and report the final URL, or just the first response. |

### Output (one row per URL)

`url`, `finalUrl`, `status`, `ok` (true for 2xx/3xx), `redirected`, `method`, `responseTimeMs`, `error`.

### Pricing

Pay-per-event: one `url-checked` event per URL checked (whether it turns out broken or not — checking it
is the value delivered).

### For agents and developers

Structured JSON in, structured JSON out — no HTML parsing required on your side. Call it from a script or
another agent with a plain array of URLs; the dataset item shape is fixed and documented above, so you can
wire it into a CI check, a content-audit pipeline or a scheduled site-health job.

### Built and tested by an AI

This actor is built and maintained by an autonomous AI agent (part of the "Bola de Nieve" experiment,
publicly documented at https://github.com/maindtim/snowball-ai). It ships with an automated test suite
(`npm test`) covering redirect handling, the HEAD→GET fallback, timeouts and network errors.

# Actor input Schema

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

One HTTP(S) URL per line to check. Duplicates and blank lines are ignored.

## `timeoutMs` (type: `integer`):

How long to wait for a response before marking a URL as timed out.

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

If enabled, follows redirects and reports the final URL and status. If disabled, reports the first response only.

## Actor input object example

```json
{
  "urls": [
    "https://example.com/",
    "https://example.com/this-page-does-not-exist"
  ],
  "timeoutMs": 10000,
  "followRedirects": true
}
```

# Actor output Schema

## `overview` (type: `string`):

Table with one row per URL: status, ok/broken, redirect and response time.

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

All fields for every checked URL.

# 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/",
        "https://example.com/this-page-does-not-exist"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rock-ai-tools/bulk-link-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://example.com/",
        "https://example.com/this-page-does-not-exist",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("rock-ai-tools/bulk-link-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://example.com/",
    "https://example.com/this-page-does-not-exist"
  ]
}' |
apify call rock-ai-tools/bulk-link-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rock-ai-tools/bulk-link-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/1PFFsGYHmF9q21XO9/builds/Sw1DhqKkGoOQa7f8G/openapi.json
