# URL Inspector — Status, Redirects, Link Preview and Icons (`xtracto/url-inspector`) Actor

Check any list of URLs in one pass: live or broken, the full redirect chain, the link preview a share would show (OpenGraph and Twitter card), plus favicons and brand colour. Keyless, HTTP-only.

- **URL**: https://apify.com/xtracto/url-inspector.md
- **Developed by:** [Farhan Febrian Nauval](https://apify.com/xtracto) (community)
- **Categories:** Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.67 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## URL Inspector: Status, Redirects, Link Preview and Icons

Check a list of URLs in one pass: whether each one is live, its full redirect chain, the preview card a social share would show, and the site's icons and brand colour, all from a single page fetch.

### Why use this actor

- **No account, no login, no API key.**
- **Three tools in one:** a broken-link audit, a link-preview generator and a favicon / brand-asset grabber, for the price of one page fetch per URL.
- **Full redirect chain** with every hop's status code, plus whether an `http://` link was upgraded to HTTPS.
- **Clear diagnosis of failures:** a dead domain, a timeout, a certificate problem and a missing page are reported as different things, not one generic error.
- **Fast status-only mode** for pure link audits that skips the page body entirely.
- **Stable JSON output** for SEO audits, link checkers and spreadsheets; export to JSON, CSV or Excel.

### How it works

1. You list URLs (a bare domain works too).
2. The actor follows each URL through every redirect to its final page.
3. It reads the page's title, description, social preview tags, icons and theme colour.
4. Each URL becomes one row in your dataset, including pages that answer 404 or 500.

No scrapers, browsers or blocks to manage.

### Input

```json
{
  "urls": ["http://github.com", "https://example.com/does-not-exist"],
  "statusOnly": false,
  "includeIcons": true,
  "verifyFavicon": false,
  "concurrency": 5
}
```

| Field | Type | Description |
|---|---|---|
| `urls` | array of strings | URLs to inspect, one per line. A bare domain works. |
| `statusOnly` | boolean | Status and redirects only, no page body. Much faster and cheaper; no preview or icon data. Default `false`. |
| `includeIcons` | boolean | Return every declared icon with its `rel` and `sizes`. Off still gives `bestIconUrl`. Default `true`. |
| `verifyFavicon` | boolean | Download the icon to confirm it really exists, falling back to `/favicon.ico`. One extra request per URL. Default `false`. |
| `concurrency` | integer | How many URLs to inspect at once, 1 to 15. Default `5`. |
| `proxyConfiguration` | object | Optional. Some sites refuse datacentre addresses. |

### Output

Real output from the input above. A live page that redirects:

```json
{
  "_input": "http://github.com",
  "_source": "S1-http",
  "_scrapedAt": "2026-11-11T13:13:47Z",
  "url": "http://github.com",
  "finalUrl": "https://github.com/",
  "statusCode": 200,
  "ok": true,
  "redirected": true,
  "redirectHops": 1,
  "redirectChain": [
    { "from": "http://github.com", "status": 301, "to": "https://github.com/" }
  ],
  "upgradedToHttps": true,
  "contentType": "text/html",
  "contentLength": 525438,
  "responseTimeMs": 1875,
  "server": "github.com",
  "title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub · GitHub",
  "description": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
  "canonicalUrl": "https://github.com",
  "language": "en",
  "robotsMeta": null,
  "themeColor": "#1e2327",
  "previewTitle": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
  "previewDescription": "Join the world's most widely adopted, AI-powered developer platform where millions of developers, businesses, and the largest open source community build software that advances humanity.",
  "previewImage": "https://images.ctfassets.net/8aevphvgewt8/76epZKB2wF998m4e4bLLXn/c505f20b00ec70b88b1be5aec42c4be4/OG_image.jpg",
  "siteName": "GitHub",
  "ogType": "object",
  "twitterCard": "summary_large_image",
  "openGraph": {
    "og:title": "GitHub · Change is constant. GitHub keeps you ahead. · GitHub",
    "og:url": "https://github.com/",
    "og:site_name": "GitHub",
    "og:type": "object",
    "…": "3 more tags"
  },
  "twitter": {
    "twitter:card": "summary_large_image",
    "twitter:site": "@github",
    "…": "3 more tags"
  },
  "icons": [
    { "url": "https://github.com/fluidicon.png", "rel": "fluid-icon", "sizes": null, "type": null },
    { "url": "https://github.githubassets.com/favicons/favicon.svg", "rel": "icon", "sizes": null, "type": "image/svg+xml" },
    "… 2 more"
  ],
  "iconCount": 4,
  "bestIconUrl": "https://github.com/fluidicon.png"
}
```

A broken link (selected fields):

```json
{
  "_input": "https://example.com/does-not-exist",
  "url": "https://example.com/does-not-exist",
  "finalUrl": "https://example.com/does-not-exist",
  "statusCode": 404,
  "ok": false,
  "redirected": false,
  "redirectHops": 0,
  "redirectChain": [],
  "contentType": "text/html",
  "contentLength": 577,
  "responseTimeMs": 250,
  "title": "Example Domain",
  "previewTitle": null,
  "iconCount": 1
}
```

| Field | Type | Description |
|---|---|---|
| `_input`, `url` | string | The URL you entered |
| `_source`, `_scrapedAt` | string | Data source tag and time of the check (UTC) |
| `finalUrl` | string | Where the URL finally landed |
| `statusCode`, `ok` | integer, boolean | Final status code, and whether it is a 2xx success |
| `redirected`, `redirectHops`, `redirectChain` | boolean, integer, array | Every redirect hop with its status code |
| `upgradedToHttps` | boolean | Whether an `http://` link was redirected to HTTPS |
| `contentType`, `contentLength`, `responseTimeMs`, `server` | string, integer, integer, string | Response facts |
| `title`, `description`, `canonicalUrl`, `language`, `robotsMeta` | string | Standard page metadata |
| `themeColor` | string | The site's declared brand colour |
| `previewTitle`, `previewDescription`, `previewImage` | string | What a social share card would show (Open Graph first, Twitter card as fallback) |
| `siteName`, `ogType`, `twitterCard` | string | Preview metadata |
| `openGraph`, `twitter` | object | Every Open Graph and Twitter tag found |
| `icons`, `iconCount`, `bestIconUrl` | array, integer, string | Declared icons; the largest is picked as best |
| `manifestUrl` | string | Web app manifest, when declared |
| `faviconUrl`, `faviconVerified`, `faviconSource` | string, boolean, string | Only with **Verify the favicon exists** on |

### Notes and limits

- **A 404 or 500 is a result, not a failure.** It is reported with `ok: false`, which is exactly what a link audit needs.
- **URLs that never answer** come back with an `_error`: `dns_error` (domain gone or misspelled), `tls_error` (certificate problem), `timeout`, `connection_error`, or `request_failed`.
- **With a proxy, a dead domain shows as `connection_error`** rather than `dns_error`. Run without a proxy if you need to tell those apart.
- **A favicon's status code proves nothing on its own.** Some sites answer `/favicon.ico` with a 404 HTML page; **Verify the favicon exists** checks the content type too.
- **Combine with other actors:** feed it from **Sitemap Crawler** to audit every URL a site publishes.

# Actor input Schema

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

One per line. A bare domain works. Feed this from Sitemap Crawler to audit a whole site.

## `statusOnly` (type: `boolean`):

Uses HEAD and skips the body — much faster and cheaper for a pure link audit. HEAD agreed with GET on every site tested. No preview or icon data in this mode.

## `includeIcons` (type: `boolean`):

Every declared icon with its rel and sizes. Off still gives bestIconUrl.

## `verifyFavicon` (type: `boolean`):

Fetches the icon to confirm it is really there, falling back to /favicon.ico. Costs one extra request per URL — worth it because a declared icon can 404, and /favicon.ico can answer 404 with an HTML body.

## `concurrency` (type: `integer`):

How many URLs to inspect at once.

## `proxyConfiguration` (type: `object`):

Optional. Some sites refuse datacentre addresses.

## Actor input object example

```json
{
  "urls": [
    "http://github.com",
    "https://example.com/does-not-exist"
  ],
  "statusOnly": false,
  "includeIcons": true,
  "verifyFavicon": false,
  "concurrency": 5,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

One row per scraped record, 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 = {
    "urls": [
        "http://github.com",
        "https://example.com/does-not-exist"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xtracto/url-inspector").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": [
        "http://github.com",
        "https://example.com/does-not-exist",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("xtracto/url-inspector").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": [
    "http://github.com",
    "https://example.com/does-not-exist"
  ]
}' |
apify call xtracto/url-inspector --silent --output-dataset

```

## MCP server setup

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

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/V4SeSI7xsuVm79Z5L/builds/3pWZf6xpJqZ6G2U0Y/openapi.json
