# URL Health Checker – Status, Redirects & SSL Expiry (bulk) (`vemka/url-health-checker`) Actor

Check thousands of URLs: HTTP status, full redirect chain, response time, SSL certificate expiry, HTTP→HTTPS redirect and HSTS. Every URL gets a clear problem list. Fast, no browser, no proxies.

- **URL**: https://apify.com/vemka/url-health-checker.md
- **Developed by:** [VEmKa](https://apify.com/vemka) (community)
- **Categories:** SEO tools, Developer tools, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## URL Health Checker – Status, Redirects & SSL Expiry (bulk)

Check **thousands of URLs in one run** and get, for every URL, the **HTTP status, the full redirect chain, response time, SSL certificate expiry, HTTP→HTTPS redirect and HSTS** – plus a clear list of **problems** so you can fix what matters first.

Paste full URLs or bare domains (`example.com` is checked over https). Duplicates are removed and invalid lines are skipped for free.

### What you get for each URL

| Field | Meaning |
|---|---|
| `statusCode`, `category` | Final status and a simple result: `ok`, `client_error`, `server_error`, `redirect_error`, `timeout`, `dns_error`, `ssl_error`, `connection_error` |
| `redirectChain`, `redirectCount`, `finalUrl` | Every hop with its status code (301/302/307/308) and where it leads; loops and too-long chains are detected |
| `responseTimeMs` | Time to the first response |
| `ssl` | Certificate validity, issuer, expiry date and **days remaining** |
| `httpToHttps`, `hsts` | Does http redirect to https? Is HSTS set? |
| `problems` | `client_error_404`, `server_error_503`, `ssl_invalid`, `ssl_expiring_soon`, `no_https_redirect`, `long_redirect_chain`, `slow_response`, `missing_hsts`, … |

### Typical uses

- **SEO and site migrations:** verify that old URLs redirect correctly (and in one hop), find 404s and redirect chains.
- **Link and backlink audits:** check lists of outgoing or incoming links for broken targets.
- **Monitoring:** schedule a daily run with *Output only URLs with problems* and get only what broke – including **SSL certificates expiring soon**.
- **Agencies and IT teams:** check all client websites at once.

### Input example

```json
{
  "urls": ["https://apify.com", "http://example.com", "example.org/old-page"],
  "onlyProblems": false,
  "sslWarningDays": 30
}
```

### Output example (shortened)

```json
{
  "url": "http://example.com/",
  "finalUrl": "https://www.example.com/",
  "statusCode": 200,
  "category": "ok",
  "redirectCount": 2,
  "redirectChain": [
    { "url": "http://example.com/", "statusCode": 301, "location": "https://example.com/" },
    { "url": "https://example.com/", "statusCode": 301, "location": "https://www.example.com/" }
  ],
  "responseTimeMs": 182,
  "ssl": { "valid": true, "daysRemaining": 64, "issuer": "Let's Encrypt" },
  "httpToHttps": true,
  "hsts": true,
  "problems": []
}
```

A run summary (counts per result category, problems, invalid inputs) is saved to the key-value store as `OUTPUT`.

### How it works

- Lightweight HTTP requests – no browser, no proxies, so runs are fast and cheap.
- `HEAD` first; servers that reject `HEAD` are retried with `GET`. Response bodies are never downloaded.
- Redirects are followed manually so every hop is recorded.
- Polite by design: at most 2 parallel requests to the same host, honest User-Agent.

### Pricing

**Free during the launch period** – you only pay Apify platform usage, which is tiny for this Actor. A small pay-per-URL price is planned for 2027; any change is announced in Apify Console in advance. Invalid inputs are always free.

### Limitations

- The Actor checks only the URLs you provide; it does not crawl websites.
- Some sites block automated requests or answer differently to non-browser clients (e.g. 403). Such results are reported as they are.
- Results reflect the moment of the check from Apify's servers.

### FAQ

**Can I check only domains?** Yes – `example.com` becomes `https://example.com/`.

**Does it follow JavaScript or meta-refresh redirects?** No, only HTTP redirects (3xx with a `Location` header).

**Is this legal?** The Actor makes the same kind of request a browser makes to URLs you supply, without logging in, bypassing protections or downloading content.

### Support

Built and maintained by VEmKa (Czech Republic, EU). Questions or ideas? Open an issue on the Issues tab – support in English and Czech.

# Actor input Schema

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

URLs or bare domains to check (one per line). Domains without a scheme are checked over https. Duplicates are removed and invalid entries are skipped for free.

## `onlyProblems` (type: `boolean`):

Keep the dataset short: push only URLs that have at least one problem (broken, slow, SSL expiring, no https redirect …).

## `checkSsl` (type: `boolean`):

Read the certificate of the final https host: validity, issuer and days until expiry.

## `sslWarningDays` (type: `integer`):

Flag certificates that expire within this many days.

## `slowThresholdMs` (type: `integer`):

Flag URLs whose first response takes longer than this.

## `useHead` (type: `boolean`):

Faster and lighter. URLs that reject HEAD are automatically retried with GET (bodies are never downloaded).

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

How long to wait for each request before marking the URL as timed out.

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

Stop following redirects after this many hops and report a redirect error.

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

Parallel checks overall. Requests to the same host are always limited to 2 at a time.

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

Safety limit for one run.

## Actor input object example

```json
{
  "urls": [
    "https://apify.com",
    "http://example.com",
    "https://httpbin.org/status/404"
  ],
  "onlyProblems": false,
  "checkSsl": true,
  "sslWarningDays": 30,
  "slowThresholdMs": 3000,
  "useHead": true,
  "timeoutSecs": 15,
  "maxRedirects": 10,
  "maxConcurrency": 20,
  "maxUrls": 10000
}
```

# Actor output Schema

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

No description

## `summary` (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://apify.com",
        "http://example.com",
        "https://httpbin.org/status/404"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("vemka/url-health-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://apify.com",
        "http://example.com",
        "https://httpbin.org/status/404",
    ] }

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

```

## MCP server setup

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