# Favicon Extractor (`automation-lab/favicon-extractor`) Actor

This actor extracts all favicon references from web pages. It finds standard favicon links, Apple touch icons, SVG icons, mask icons, and checks for the default `/favicon.ico` fallback. It also detects web app manifest references. Each favicon entry includes the URL, format, sizes, and rel...

- **URL**: https://apify.com/automation-lab/favicon-extractor.md
- **Developed by:** [Stas Persiianenko](https://apify.com/automation-lab) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 31 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 url extracteds

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 Extractor

Extract favicon URLs from web pages including ICO, PNG, SVG, Apple touch icons, and web app manifest icons, with a ready-to-use `bestIcon` pick.

### What does Favicon Extractor do?

This actor extracts all **favicon references** from web pages. It finds standard favicon links, Apple touch icons, SVG icons, mask icons, checks for the default `/favicon.ico` fallback, and parses up to 20 icon declarations from a valid same-origin manifest. Each favicon entry includes the URL, format, sizes, and rel attribute.

Process up to 100 URLs in a single run to audit favicon coverage across websites. The output includes convenient top-level fields for the most common favicon types (default, Apple touch icon, SVG), the complete list of detected favicons, and a deterministic `bestIcon`. The best pick favors the largest declared square size, then SVG, Apple touch, other declared icons, and the default favicon.

### Who is it for?

- 💻 **Web developers** — extracting favicons for link previews and bookmarking applications
- 🎨 **UI/UX designers** — collecting website icons for design research and competitive analysis
- 📊 **Data enrichment teams** — adding visual brand identifiers to company and domain datasets
- 🔍 **SEO specialists** — verifying favicon presence and quality across client websites
- 🏢 **Business intelligence analysts** — enhancing company profiles with brand imagery

### Use cases

- **Brand directory builders** -- collect favicons for company listings, bookmark managers, or link aggregation tools
- **SEO auditors** -- verify favicon presence and correctness across all pages of a website
- **Design researchers** -- gather favicons from competitor websites for competitive analysis and inspiration
- **Monitoring teams** -- detect favicon changes across websites that may indicate rebranding or unauthorized modifications
- **PWA developers** -- discover same-origin manifest URLs and verify web app manifest icons for progressive web apps
- **Link preview builders** -- collect favicons to display alongside URLs in messaging apps, dashboards, or documentation tools
- **Quality assurance teams** -- verify that all pages on a website reference the correct favicon after a site redesign or migration

### Why use Favicon Extractor?

- **Comprehensive detection** -- finds ICO, PNG, SVG, Apple touch icons, mask icons, and web app manifest icons
- **Ready-to-use choice** -- returns one deterministic `bestIcon` alongside all discovered candidates
- **Batch processing** -- extract favicons from up to 100 URLs in a single run
- **Structured output** -- clean JSON with URL, format, sizes, and rel attribute for each favicon
- **Default fallback check** -- automatically tests for the `/favicon.ico` fallback path
- **Fast and lightweight** -- HTTP-only requests, no browser overhead
- **Pay-per-event pricing** -- just $0.0005 per URL, making bulk extraction very affordable

### Input parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `urls` | string\[] | Yes | -- | List of web page URLs to extract favicons from |

#### Example input

```json
{
    "urls": [
        "https://www.google.com/",
        "https://www.github.com/"
    ]
}
```

### Output example

```json
{
    "url": "https://www.google.com/",
    "title": "Google",
    "faviconCount": 3,
    "defaultFavicon": "https://www.google.com/favicon.ico",
    "bestIcon": "https://www.google.com/icon-512.png",
    "appleTouchIcon": "https://www.google.com/apple-touch-icon.png",
    "svgIcon": null,
    "manifestUrl": null,
    "favicons": [
        {
            "href": "https://www.google.com/icon-512.png",
            "type": "image/png",
            "sizes": "512x512",
            "rel": "manifest icon",
            "format": "png"
        }
    ],
    "hasFavicon": true,
    "error": null,
    "extractedAt": "2026-03-01T12:00:00.000Z"
}
```

### How to extract favicons from websites

1. Go to the [Favicon Extractor](https://apify.com/automation-lab/favicon-extractor) page on Apify Store.
2. Enter one or more website URLs into the **URLs** field.
3. Click **Start** and wait for the run to finish.
4. Download your results in JSON, CSV, or Excel format.
5. Use `bestIcon` for the preferred ready-to-use URL, or inspect `favicons` and the type-specific fields.

### How much does it cost to extract favicons?

| Event | Price | Description |
|-------|-------|-------------|
| Start | $0.035 | One-time per run |
| URL extracted | $0.0005 | Per page processed |

**Example costs:**

- 10 URLs: $0.035 + 10 x $0.0005 = **$0.040**
- 50 URLs: $0.035 + 50 x $0.0005 = **$0.060**
- 100 URLs (the per-run maximum): $0.035 + 100 x $0.0005 = **$0.085**

### API usage

#### Node.js

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('automation-lab/favicon-extractor').call({
    urls: ['https://www.google.com/'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

#### Python

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_TOKEN')
run = client.actor('automation-lab/favicon-extractor').call(run_input={
    'urls': ['https://www.google.com/'],
})
items = client.dataset(run['defaultDatasetId']).list_items().items
for item in items:
    print(f'{item["url"]}: {item["faviconCount"]} favicons found')
```

#### cURL

```bash
curl "https://api.apify.com/v2/acts/automation-lab~favicon-extractor/runs" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"urls": ["https://www.google.com/"]}'
```

### Use with AI agents via MCP

[Favicon Extractor](https://apify.com/automation-lab/favicon-extractor) is available as a tool for AI assistants via the [Model Context Protocol (MCP)](https://docs.apify.com/platform/integrations/mcp).

#### Setup for Claude Code

```bash
claude mcp add --transport http apify "https://mcp.apify.com/?tools=automation-lab/favicon-extractor"
```

#### Setup for Claude Desktop, Cursor, or VS Code

```json
{
    "mcpServers": {
        "apify": {
            "url": "https://mcp.apify.com/?tools=automation-lab/favicon-extractor"
        }
    }
}
```

#### Example prompts

- "Get the favicon from these websites"
- "Extract favicons for this list of competitor sites"

Learn more in the [Apify MCP documentation](https://docs.apify.com/platform/integrations/mcp).

### Integrations

Favicon Extractor integrates with your existing workflow through the Apify platform. Connect it to **Make** (formerly Integromat), **Zapier**, or **n8n** to automate favicon collection as part of brand monitoring or directory building pipelines. Export results to **Google Sheets** for team review, send notifications to **Slack** when favicons change, or use **webhooks** to trigger icon downloads and processing in your own systems.

Common integration patterns include:

- **Brand directory** -- schedule regular runs on a list of company URLs and update your directory with the latest favicon URLs
- **Rebranding alerts** -- compare favicon URLs across runs and send a Slack notification when a company changes its icon
- **Bookmark enrichment** -- feed bookmark URLs through the actor and use the extracted favicon URLs to display icons in your application

### Tips and best practices

- **Check the `hasFavicon` field first** -- quickly filter pages that are missing favicons entirely for your audit reports.
- **Start with `bestIcon`** -- it deterministically selects the largest square icon before considering SVG, Apple touch, other declarations, and the default fallback.
- **Inspect `manifestUrl` and `favicons`** -- a valid same-origin manifest contributes up to 20 entries with `rel` set to `manifest icon`.
- **Run on homepage URLs** -- favicons are almost always defined on the homepage, so you usually only need to check one URL per domain.
- **Combine with OG Meta Extractor** -- pair favicon extraction with OG image extraction for a complete visual brand audit.

### Legality

This tool analyzes publicly accessible web content. Automated analysis of public web resources is standard practice in SEO and web development. Always respect robots.txt directives and rate limits when analyzing third-party websites. For personal data processing, ensure compliance with applicable privacy regulations.

### FAQ

**What favicon formats does it detect?**
It detects ICO, PNG, SVG, Apple touch icons, mask icons, and web app manifest icons from a same-origin manifest. It also checks for the standard `/favicon.ico` fallback path.

**Does it download the actual favicon files?**
No. The actor extracts favicon URLs and metadata (format, sizes, rel) from page HTML and optional manifest JSON. It does not download or store image files. You can use the returned URLs to download icons separately.

**Can it extract favicons from pages behind a login?**
No. The actor makes standard HTTP requests without authentication and can only process publicly accessible pages.

**What is the difference between `bestIcon`, `defaultFavicon`, and the `favicons` array?**
`bestIcon` is the deterministic preferred candidate. `defaultFavicon` is the standard `/favicon.ico` fallback or first declared icon when that fallback is unavailable. The `favicons` array contains all HTML and same-origin manifest candidates, including their sizes, formats, and types.

**How many URLs can I process in one run?**
You can process up to 100 unique URLs per run. If the input contains more than 100 URLs, the actor logs a warning and processes the first 100. Split larger lists across multiple runs.

**What if a page has no favicon?**
The actor will still return a result for that URL with `hasFavicon` set to `false` and an empty `favicons` array. The `defaultFavicon` field will be null if the `/favicon.ico` fallback also does not exist.

**Does it resolve relative favicon URLs?**
Yes. Relative favicon paths found in the HTML are resolved to absolute URLs based on the page's base URL, so all returned URLs are directly usable.

**The actor shows hasFavicon as false but the site has a favicon in my browser. Why?**
Some sites inject favicon or manifest references only through JavaScript. The actor uses HTTP requests without JavaScript execution, so dynamically injected references are not detected. Static same-origin manifest references are parsed automatically; cross-origin, invalid, redirected, or slow manifests are skipped without failing the page result.

**The favicon URLs returned are broken or return 404 errors. What should I do?**
The actor extracts favicon URLs as declared in the HTML source. If the site has broken favicon references (pointing to URLs that no longer exist), the actor will still report them. Use the returned URLs to verify accessibility separately and flag broken references to the site owner.

### Related SEO and website analysis tools

- [Font Detector](https://apify.com/automation-lab/font-detector) — detect web fonts loaded on any website including Google Fonts, Adobe Fonts, and custom @font-face
- [Form Finder](https://apify.com/automation-lab/form-finder) — extract and analyze HTML forms from web pages with field details
- [Website Health Report](https://apify.com/automation-lab/website-health-report) — check website health including SSL, performance, and SEO basics
- [Tech Stack Detector](https://apify.com/automation-lab/tech-stack-detector) — identify technologies, frameworks, and tools used on any website

# Actor input Schema

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

List of web page URLs to extract favicons from.

## Actor input object example

```json
{
  "urls": [
    "https://www.google.com/",
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://www.github.com/"
  ]
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing discovered favicon candidates and the preferred icon URL.

# 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.google.com/",
        "https://en.wikipedia.org/wiki/Web_scraping",
        "https://www.github.com/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("automation-lab/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.google.com/",
        "https://en.wikipedia.org/wiki/Web_scraping",
        "https://www.github.com/",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("automation-lab/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.google.com/",
    "https://en.wikipedia.org/wiki/Web_scraping",
    "https://www.github.com/"
  ]
}' |
apify call automation-lab/favicon-extractor --silent --output-dataset

```

## MCP server setup

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