# Favicon Validator (`zerobreak/favicon-validator`) Actor

Favicon validator that audits any website's icon setup — discovers all favicon types, checks accessibility and file size, and flags missing or broken icons for developers and SEO teams.

- **URL**: https://apify.com/zerobreak/favicon-validator.md
- **Developed by:** [ZeroBreak](https://apify.com/zerobreak) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 3 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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?

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

## Favicon Validator — Audit & Fix Website Favicon Issues Automatically

Favicon Validator is an Apify actor that audits any website's favicon setup by discovering every icon declaration, validating accessibility, checking file sizes, and reporting missing formats. Whether you're building a site audit pipeline, preparing a client deliverable, or enforcing brand consistency at scale, this favicon checker handles the tedious validation work automatically.

### Use Cases

- **SEO auditing** — Identify sites missing favicons that affect click-through rates and brand recognition in browser tabs and search results
- **Client reporting** — Bulk-validate favicon compliance across entire client portfolios in a single run
- **QA testing** — Confirm all favicon types (ICO, PNG, Apple touch icon) are present and accessible before deployment
- **Site monitoring** — Detect favicon regressions after deployments or CDN changes
- **Accessibility compliance** — Ensure icons meet recommended sizes for all device types including iOS home screen bookmarks

### What Data Does This Actor Extract?

For each URL, the actor returns a complete favicon audit report:

```json
{
    "url": "https://example.com/",
    "pageTitle": "Example Domain",
    "hasFavicon": true,
    "faviconCount": 3,
    "favicons": [
        {
            "faviconUrl": "https://example.com/favicon.ico",
            "rel": "default",
            "sizes": "",
            "declaredType": "",
            "source": "default",
            "httpStatus": 200,
            "contentType": "image/x-icon",
            "fileSizeBytes": 1150,
            "accessible": true,
            "error": null
        },
        {
            "faviconUrl": "https://example.com/apple-touch-icon.png",
            "rel": "apple-touch-icon",
            "sizes": "180x180",
            "declaredType": "image/png",
            "source": "link-tag",
            "httpStatus": 200,
            "contentType": "image/png",
            "fileSizeBytes": 8432,
            "accessible": true,
            "error": null
        }
    ],
    "issues": ["No PNG favicon — recommended for modern browsers"],
    "scrapedAt": "2025-06-15T10:30:00+00:00"
}
```

#### Output Fields

| Field | Type | Description |
|-------|------|-------------|
| `url` | string | The validated website URL (after redirects) |
| `pageTitle` | string | HTML page title of the validated URL |
| `hasFavicon` | boolean | Whether at least one accessible favicon was found |
| `faviconCount` | integer | Number of accessible favicons discovered |
| `favicons` | array | Full validation details for every favicon candidate |
| `favicons[].faviconUrl` | string | Absolute URL of the favicon file |
| `favicons[].rel` | string | The `rel` attribute value (e.g. `icon`, `apple-touch-icon`) |
| `favicons[].sizes` | string | Declared sizes attribute (e.g. `32x32`, `180x180`) |
| `favicons[].declaredType` | string | MIME type declared in the HTML link tag |
| `favicons[].source` | string | How it was discovered: `link-tag` or `default` |
| `favicons[].httpStatus` | integer | HTTP status code when fetching the favicon |
| `favicons[].contentType` | string | Actual Content-Type from the HTTP response |
| `favicons[].fileSizeBytes` | integer | File size in bytes (null if unavailable) |
| `favicons[].accessible` | boolean | Whether the favicon returned HTTP 200 |
| `favicons[].error` | string | Error message if validation failed, otherwise null |
| `issues` | array | Human-readable list of detected favicon problems |
| `scrapedAt` | string | ISO 8601 timestamp of when the validation ran |

### Input

| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| `url` | string | — | Single website URL to validate |
| `urls` | array | — | List of website URLs to validate in bulk |

At least one of `url` or `urls` must be provided. Both can be used together — duplicates are automatically removed.

#### Example Input

Single URL:

```json
{
    "url": "https://example.com/"
}
```

Bulk validation:

```json
{
    "urls": [
        "https://example.com/",
        "https://another-site.com/",
        "https://client-website.org/"
    ]
}
```

### How It Works

1. **Fetch the page** — The actor requests each URL with a realistic browser User-Agent and follows redirects
2. **Discover favicon candidates** — Parses all `<link>` tags with `rel` values of `icon`, `shortcut icon`, `apple-touch-icon`, `apple-touch-icon-precomposed`, and `mask-icon`
3. **Check `/favicon.ico`** — Always tests the default favicon path as a fallback, even if no link tag declares it
4. **Validate each favicon** — Sends an HTTP HEAD request (or GET if needed) to check status code, Content-Type, and file size
5. **Report issues** — Compares the results against best practices and generates a plain-language issue list
6. **Store results** — Pushes one dataset entry per input URL

### Use Cases

- **Find broken favicons** — Detect favicon files returning 404, 403, or server errors
- **Check dead link checker pipelines** — Combine with link validation workflows for full site health audits
- **Validate favicon formats** — Confirm ICO, PNG, and Apple touch icon variants all exist and are accessible
- **Monitor file sizes** — Flag oversized favicon files (over 100 KB) that unnecessarily slow page loads

### FAQ

**Can this actor validate favicons on JavaScript-rendered pages?**
The actor uses HTTP requests to fetch HTML — it works on any server-rendered page. JavaScript-heavy SPAs that inject favicon tags client-side may not have their dynamically-added icons detected, but the `/favicon.ico` default path is always checked.

**What favicon issues does the actor detect?**
It flags: no accessible favicon at all, missing ICO format (affects older browsers), missing PNG format (recommended for modern browsers), missing apple-touch-icon (required for iOS home screen bookmarks), and oversized favicon files over 100 KB.

**How many URLs can I validate per run?**
There is no built-in limit. The actor processes URLs sequentially and stores one result per URL. For very large lists, consider splitting into smaller batches to stay within Apify's memory limits.

**Does it follow redirects?**
Yes — the actor follows HTTP redirects for both the main page URL and individual favicon URLs, and records the final URL after any redirect chain.

**What counts as an "accessible" favicon?**
A favicon is considered accessible when its URL returns HTTP status 200. Any other status code (301, 302, 403, 404, 500, etc.) is treated as inaccessible.

### Integrations

Connect Favicon Validator with other apps and services using [Apify integrations](https://apify.com/integrations). You can integrate with Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive, and many more. You can also use [webhooks](https://docs.apify.com/integrations/webhooks) to trigger actions whenever results are available.

Automate your favicon validation workflow — run this actor on a schedule to catch favicon regressions before they impact your brand, or chain it with other Apify actors to build a complete website health monitoring pipeline.

# Actor input Schema

## `url` (type: `string`):

Single website URL to validate favicons for. Use 'urls' for multiple sites.

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

List of website URLs to validate favicons for. Each URL is validated independently.

## Actor input object example

```json
{
  "url": "https://example.com/",
  "urls": [
    "https://example.com/",
    "https://another-site.com/"
  ]
}
```

# 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 = {
    "url": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("zerobreak/favicon-validator").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 = { "url": "https://example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("zerobreak/favicon-validator").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 '{
  "url": "https://example.com/"
}' |
apify call zerobreak/favicon-validator --silent --output-dataset

```

## MCP server setup

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

```

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/dBfWXTwPoar7PqoHn/builds/34D5FFcejx3lpkFmA/openapi.json
