# Favicon Extractor - Icons, Apple Touch, Manifest (`scrapewise/favicon-extractor`) Actor

Scrape the favicons and app icons a website declares: link icon, apple-touch-icon, mask-icon, manifest.json and /favicon.ico. Each icon comes with its declared size, type, HTTP status and the largest one picked. Optional: save the largest icon to the run's key-value store.

- **URL**: https://apify.com/scrapewise/favicon-extractor.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** Developer tools, SEO 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.76 / 1,000 domain processeds

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?

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 Extractor: every icon a site declares, with size, type and status

Favicon Extractor reads the home page of each domain or URL you give it and lists **every icon the site declares
for itself**: the browser tab icon (`<link rel="icon">`, `shortcut icon`), the Apple touch icons, the Safari mask icon,
the Windows tile image, the icons listed in the web app manifest (`manifest.json`), and the default `/favicon.ico`.
For each one you get the full URL, the declared size, the content type, the HTTP status, and whether it answers 200.
The Actor also picks the **largest icon** that answers 200, so you do not have to sort the list yourself.

It is built for:

- brand kits and link previews: the icon of a company or product, in the biggest size the site offers;
- directories, bookmark tools and dashboards that show a logo next to each domain;
- site audits: missing icons, broken icon links, icons that answer 404, wrong content types;
- research on how sites brand their apps (Apple touch sizes, manifest coverage, mask icons).

No account, login, cookies or browser needed. Only public pages are read.

### At a glance

| What | Price |
|---|---|
| Domain processed | **US$ 0.001 per domain** (US$ 1.00 per 1,000) on the Free plan, lower on paid plans |
| Run start | US$ 0.005 per run |

- 1,000 domains with icons = **about US$ 2.01** on the Free plan.
- Invalid domains, unreachable sites and sites with no icon that answers 200 are **free**. They come back as a row
  with an `errorCode`.
- Paid Apify plans get a lower price per domain automatically.
- `maxDomains` is a hard cap, and a spending limit set on the run stops it cleanly with everything delivered so far.

### Quick start

```json
{
  "domains": ["python.org"]
}
```

Many domains at once, with the largest icon saved to the run's key-value store:

```json
{
  "domains": ["python.org", "rust-lang.org", "postgresql.org", "github.com", "nodejs.org"],
  "saveLargestIconToKvs": true
}
```

Full page URLs work too. A URL is read as the home page of that address, and the icons are resolved against it:

```json
{
  "domains": ["https://www.python.org/downloads/", "https://github.com/"]
}
```

### Input

| Field | Type | Default | What it does |
|---|---|---|---|
| `domains` | list of text | `["python.org"]` | Domains (`python.org`) or full page URLs, one per line. The same host is read once per run. |
| `maxDomains` | integer | `50` | Hard cap for the whole run, counting every domain attempted. `0` = no cap. |
| `saveLargestIconToKvs` | boolean | `false` | Downloads the largest icon that answers 200 (up to 1 MB) and saves it in the run's key-value store. |
| `proxyConfiguration` | object | Apify Proxy on | Apify Proxy by default. Change it only if you know you need to. |

Without `http://` or `https://`, a domain is read over `https` first and then over `http`.

### Output

One row per domain. The `icons` list holds every candidate in the order the site declares it, and the summary fields
sit at the top of the row.

| Field | What it is |
|---|---|
| `domain` | The host read, in lower case (`python.org`) |
| `inputUrl` | What you typed |
| `finalUrl` | The page address after redirects |
| `pageStatus` | HTTP status of the home page |
| `iconCount` | Number of icon candidates found |
| `okCount` | How many of them answer 200 |
| `icons` | List of candidates, each with `url`, `rel`, `sizes`, `source`, `type`, `status`, `ok` |
| `largestIconUrl` | The largest icon that answers 200 (by declared size; SVG with `any` counts as largest) |
| `largestIconSizes` | Its declared size, for example `144x144`, or `null` when the site declares none |
| `largestIconType` | Its content type, for example `image/png` |
| `savedKvsKey` | Key of the saved file in the key-value store, when `saveLargestIconToKvs` is on |
| `errorCode`, `error` | Filled only in error rows |
| `scrapedAt` | When the row was read (UTC) |

The `icons` items:

| Field | What it is |
|---|---|
| `url` | Absolute URL of the icon, resolved against the page (or the manifest, for manifest icons) |
| `rel` | Where it was declared: `icon`, `apple-touch-icon-precomposed`, `mask-icon`, `msapplication-tile`, `manifest` |
| `sizes` | Declared size from the `sizes` attribute or the manifest, or `null` |
| `source` | `page` (in the HTML), `manifest` (in `manifest.json`) or `default` (the `/favicon.ico` path) |
| `type` | Content type the server sends for it |
| `status` | HTTP status of the icon URL |
| `ok` | `true` when the status is 200 |

Example row, from a real run on 9 November 2026 (python.org, with `saveLargestIconToKvs` on):

```json
{
  "domain": "python.org",
  "inputUrl": "python.org",
  "finalUrl": "https://www.python.org/",
  "pageStatus": 200,
  "iconCount": 7,
  "okCount": 7,
  "icons": [
    {
      "url": "https://www.python.org/static/favicon.ico",
      "rel": "icon",
      "sizes": null,
      "source": "page",
      "type": "image/x-icon",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/static/apple-touch-icon-144x144-precomposed.png",
      "rel": "apple-touch-icon-precomposed",
      "sizes": "144x144",
      "source": "page",
      "type": "image/png",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/static/apple-touch-icon-114x114-precomposed.png",
      "rel": "apple-touch-icon-precomposed",
      "sizes": "114x114",
      "source": "page",
      "type": "image/png",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/static/apple-touch-icon-72x72-precomposed.png",
      "rel": "apple-touch-icon-precomposed",
      "sizes": "72x72",
      "source": "page",
      "type": "image/png",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/static/apple-touch-icon-precomposed.png",
      "rel": "apple-touch-icon-precomposed",
      "sizes": null,
      "source": "page",
      "type": "image/png",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/static/metro-icon-144x144.png",
      "rel": "msapplication-tile",
      "sizes": null,
      "source": "page",
      "type": "image/png",
      "status": 200,
      "ok": true
    },
    {
      "url": "https://www.python.org/favicon.ico",
      "rel": "icon",
      "sizes": null,
      "source": "default",
      "type": "image/x-icon",
      "status": 200,
      "ok": true
    }
  ],
  "largestIconUrl": "https://www.python.org/static/apple-touch-icon-144x144-precomposed.png",
  "largestIconSizes": "144x144",
  "largestIconType": "image/png",
  "savedKvsKey": "favicon-python.org-largest.png",
  "errorCode": null,
  "error": null,
  "scrapedAt": "2026-11-09T20:58:57Z"
}
```

The table view of the dataset shows the domain, the counts, the largest icon, its size and type, the page status and
the error code, so the run can be read at a glance.

### Errors you may see

| `errorCode` | Meaning | Charged |
|---|---|---|
| `INVALID_DOMAIN` | The entry is not a domain or an `http(s)` URL | No |
| `UNREACHABLE` | The site did not answer after 3 tries | No |
| `NO_ICONS` | The page answered, but no declared icon (and no `/favicon.ico`) answers 200 | No |
| `INVALID_INPUT` | A setting has a wrong value (for example a negative `maxDomains`) | No |
| `NO_INPUT` | The input has no domain | No |
| `UNEXPECTED` | Something went wrong for one domain; the rest of the run goes on | No |

A domain that answers with an error page (for example 403 from a firewall) still counts when its icons answer 200,
because the icon links are what the Actor reads. The `pageStatus` field shows the home page answer either way.

### Integrations, scheduling and AI agents

- **Schedules:** run it weekly to check that the icons of your sites still answer 200. Export the dataset to JSON or
  CSV from the run page.
- **Make, n8n, Zapier:** use the dataset items endpoint of the run as a source, or the Apify app for each platform.
- **Apify MCP server:** an AI agent can call the Actor with a list of domains and read back the largest icon of each.
- **Key-value store:** with `saveLargestIconToKvs` on, the largest icon of each domain is one file in the run's store, named
  `favicon-<domain>-largest.<extension>`, ready to download.

### FAQ

**Which icons does it find?** Everything the home page declares in its `<head>`: `icon`, `shortcut icon`,
`apple-touch-icon`, `apple-touch-icon-precomposed`, `mask-icon` and the Windows tile image, plus the icons listed in
the web app manifest, plus `/favicon.ico`. Up to 20 candidates per domain.

**Why is the largest icon not always the one I expected?** The Actor compares the declared `sizes`. An icon without a
declared size counts as 0, so a site that declares only `/favicon.ico` gets that one as the largest. An SVG declared as
`any` counts as the largest of all, because it scales.

**Does it download the icons?** It checks each icon URL and reads its status and content type, without keeping the
file. The file is downloaded only for the largest icon, and only when `saveLargestIconToKvs` is on.

**Can it read a page that needs a login?** No. Only public pages are read, and nothing is sent as a cookie or a token.

**Why are some sites free?** Only domains that give you at least one icon that answers 200 are charged. A typo, a site
that is down, or a site with no icon costs nothing.

**What is the most common reason for NO_ICONS?** Sites that have no icon at all, or that point to icons that return
404\. The row keeps `pageStatus` and `iconCount`, so you can see what the site declared.

### Limitations

- Only the home page (or the URL you gave) is read. Icons that appear only after a script runs in the browser are not
  seen.
- A declared size is read as written. The Actor does not open the image to measure it, so a wrong `sizes` attribute
  gives a wrong largest icon.
- Each run reads up to 20 icon candidates per domain. Pages that declare more keep the first 20 in page order.
- `saveLargestIconToKvs` saves a file of up to 1 MB. Larger icons are skipped and the row says `savedKvsKey: null`.
- Sites that block automated visits can answer with an error page; their icons are then read only if they still answer
  200\.

### Changelog

- **09 Nov 2026:** first version: declared icons from the page, web app manifest and `/favicon.ico`, declared size,
  type, HTTP status, largest icon, optional save of the largest icon to the key-value store, free error rows.

# Actor input Schema

## `domains` (type: `array`):

Domains (python.org) or full page URLs (https://www.python.org/downloads/), one per line. A full URL is read as the home page. Each domain is read once per run.

## `maxDomains` (type: `integer`):

Hard cap for the whole run. 0 = no cap.

## `saveLargestIconToKvs` (type: `boolean`):

On: downloads the largest icon that answers 200 (up to 1 MB) and saves it in the run's key-value store, with the file extension of its type.

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

Apify Proxy by default. Change it only if you know you need to.

## Actor input object example

```json
{
  "domains": [
    "python.org"
  ],
  "maxDomains": 50,
  "saveLargestIconToKvs": false,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `resultsCsv` (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 = {
    "domains": [
        "python.org"
    ],
    "maxDomains": 50,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/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 = {
    "domains": ["python.org"],
    "maxDomains": 50,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/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 '{
  "domains": [
    "python.org"
  ],
  "maxDomains": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapewise/favicon-extractor --silent --output-dataset

```

## MCP server setup

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