# Favicon & Icon Extractor: verified sizes, manifest icons (`kvnloo/favicon-extractor`) Actor

Get every favicon, apple-touch-icon, manifest and mask icon of any website, verified with real pixel size and format, plus the best icon, theme color and og:image. $1 per 1,000 sites, failed sites free.

- **URL**: https://apify.com/kvnloo/favicon-extractor.md
- **Developed by:** [Kevin Rajan](https://apify.com/kvnloo) (community)
- **Categories:** SEO tools, 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 $1.00 / 1,000 website processeds

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

## Favicon & Icon Extractor: verified sizes, manifest icons, best icon

Give it a list of websites (bare domains or full URLs). For each website you get **every icon it declares**, each one **verified**: downloaded, confirmed to be a real image, and measured for true pixel size and format. You also get the single **best icon** to use in your app.

- **Every icon source:** `<link rel="icon">`, `shortcut icon`, `alternate icon`, `apple-touch-icon` (and `-precomposed`), Safari `mask-icon` with its color, `fluid-icon`, `msapplication-TileImage`, **web app manifest icons** (with `purpose`, e.g. `maskable`), and `/favicon.ico` when it exists but is not declared.
- **Verified, not guessed:** reads the first bytes of each icon to get its real format (PNG, ICO, SVG, GIF, JPEG, WebP, BMP) and real width × height (largest entry inside an `.ico`, `viewBox` for SVG). Broken icon links and soft 404s are flagged `ok: false`.
- **Best icon picked for you:** the largest verified raster icon, falling back to SVG. Monochrome mask icons are never picked. Also returns `primaryFavicon`, the icon a browser shows in the tab.
- **Brand context:** theme color, site name (manifest, `og:site_name` or `application-name`), `og:image`, page title and manifest URL.
- **Every website returned in full on every Apify plan**, including the free plan.
- **Unreachable websites are free.** You are charged only for websites whose page loaded.

Plain HTTP with no browser, so it is fast and cheap. Each website gets one page request, one manifest request and at most 10 small icon reads (configurable).

### Input

```json
{
  "urls": ["https://www.python.org", "apify.com", "github.com"],
  "verifyIcons": true,
  "maxIconsPerSite": 10,
  "concurrency": 10
}
```

| Field | Default | Description |
|---|---|---|
| `urls` | required | 1 to 5,000 websites. Bare domains get `https://`. |
| `verifyIcons` | `true` | Download the first 64 KB of each icon to verify it and read its real size. Set to `false` for declared data only. |
| `maxIconsPerSite` | `10` | Icons verified per website. Tab icons are checked first, then the largest declared sizes. Others are listed as `not_checked`. |
| `concurrency` | `10` | Websites processed in parallel. Requests to the same host are spaced 0.25 s apart. |

The input is compatible with other favicon Actors that take a `urls` string list. Output fields are camelCase. If you are switching from an Actor with snake_case output, map: `final_url` → `url`, `status_code` → `statusCode`, `favicon_count` → `iconCount`, `primary_favicon` → `primaryFavicon`, `favicons` → `icons` (`href` → `url`, `sizes` → `declaredSizes`, `type` → `declaredType`).

### Output

One dataset row per website (shortened):

```json
{
  "input": "https://www.python.org",
  "url": "https://www.python.org",
  "domain": "www.python.org",
  "statusCode": 200,
  "error": null,
  "title": "Welcome to Python.org",
  "siteName": "Python.org",
  "themeColor": null,
  "maskIconColor": null,
  "ogImage": "https://www.python.org/static/opengraph-icon-200x200.png",
  "manifestUrl": null,
  "primaryFavicon": "https://www.python.org/static/favicon.ico",
  "bestIcon": {"url": "https://www.python.org/static/apple-touch-icon-144x144-precomposed.png",
               "rel": "apple-touch-icon-precomposed", "format": "png", "width": 144, "height": 144},
  "iconCount": 7,
  "icons": [
    {"url": "https://www.python.org/static/favicon.ico", "rel": "icon", "source": "html",
     "declaredSizes": null, "declaredType": "image/x-icon", "color": null, "purpose": null,
     "statusCode": 200, "contentType": "image/x-icon", "ok": true, "format": "ico",
     "width": 48, "height": 48, "error": null}
  ]
}
```

`source` is `html`, `manifest` or `fallback`. A fallback is an undeclared `/favicon.ico`; it is always verified and listed only when it really exists. With `verifyIcons: false` it is omitted. Icon `error` is `not_checked`, `not_an_image`, `timeout`, `unreachable` or `null`. A website that cannot be loaded still gets a row with `statusCode`, an `error` (`http_error`, `not_html`, `timeout`, `unreachable`, `extract_failed`) and no icons, and it is **not charged**.

Download results as JSON, CSV, Excel or HTML, or read them through the Apify API. They work with Make, Zapier, n8n and scheduled runs.

### Pricing

Pay per event:

- **$0.001 per website** whose page loaded ($1.00 per 1,000 websites).
- $0.00005 per run start.
- Unreachable websites and HTTP errors cost nothing.

A single-website API call costs about **$0.00105**. Actors that charge a $0.005 start fee plus $0.002 per site cost about $0.007 for the same call.

### Why this Actor

- **About 6× cheaper per single-site call** than the most used favicon Actor on the Store. The per-site price is half of theirs on the free plan and lower on every plan.
- **No free-plan cap.** Some favicon Actors return only the first 3 websites in full on the free plan; this one returns every website in full.
- **Verified sizes, not just declared ones.** Many sites declare `sizes="any"` or nothing at all, and some declared icon URLs are broken. You get the real dimensions and an `ok` flag.
- **Manifest icons included.** The largest icons (192 px, 512 px, maskable) usually live only in `site.webmanifest`.
- **A best-icon field** so you do not have to rank icons yourself.

### Use cases

- Show site icons in dashboards, bookmark managers, link previews, directories and internal tools.
- Pick a high-resolution icon (180 px or larger) instead of a blurry 16 px favicon.
- Audit your own sites: missing apple-touch-icon, broken icon links, missing manifest icons or theme color.
- Monitor icon and brand-color changes across your portfolio on a schedule.

### FAQ

**Does it use a browser or proxies?** No. It makes plain HTTP requests from the Apify platform with a descriptive User-Agent, so it is fast and inexpensive. Icons that a site injects only with JavaScript are not seen.

**What does "verified" mean?** The Actor downloads at most the first 64 KB of each icon, checks the file signature, and reads the dimensions from the image header. A URL that returns HTML (a soft 404) is marked `ok: false, error: not_an_image`.

**Why is `bestIcon` sometimes an SVG with a size?** SVG icons are vector images. Their size comes from `width`/`height` or `viewBox`, and they are chosen only when no raster icon is available.

**Does it download or store the image files?** No. It returns URLs and metadata only. Use the icon URLs to fetch the images you need.

**Which sites can I use it on?** Public websites you are allowed to access. It reads only the homepage you supply plus the icon and manifest files that page links to. It does not log in or bypass anti-bot protection. It collects no personal data.

**Can I limit what a run costs?** Yes. Set a maximum charge per run in the run options. The Actor stops before processing websites it could not bill.

**Some sites return 403.** Sites behind bot protection block automated requests. This Actor does not try to bypass that; such sites come back with their status code and are not charged.

**Something is wrong or missing.** Open an issue on the Issues tab with the website and what you expected.

# Actor input Schema

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

1 to 5,000 websites: bare domains (example.com) or full URLs. Every website is returned in full on every Apify plan.

## `verifyIcons` (type: `boolean`):

Download the first bytes of each icon to confirm it is a real image and read its true pixel size and format. Turn off for declared data only (faster).

## `maxIconsPerSite` (type: `integer`):

Tab icons are verified first, then the largest declared sizes. Remaining icons are still listed, marked not_checked.

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

Requests to the same host are spaced 0.25 s apart.

## Actor input object example

```json
{
  "urls": [
    "https://www.python.org",
    "https://apify.com"
  ],
  "verifyIcons": true,
  "maxIconsPerSite": 10,
  "concurrency": 10
}
```

# 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://www.python.org",
        "https://apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kvnloo/favicon-extractor").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://www.python.org",
        "https://apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("kvnloo/favicon-extractor").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://www.python.org",
    "https://apify.com"
  ]
}' |
apify call kvnloo/favicon-extractor --silent --output-dataset

```

## MCP server setup

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

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/psPAEU2KxWjwoXUG2/builds/ec1R7yoIpFvJcXaOd/openapi.json
