> ## Documentation Index
> Fetch the complete documentation index at: https://docs.searchcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Favicon URLs

<Note>
  **Internal Service** — This is not an HTTP endpoint. It's called by the competitor research service.
</Note>

## Purpose

Adds favicon URLs to each competitor using Google's favicon service. Filters out generic globe icons.

## Function Signature

```python theme={null}
async def add_favicon_urls_to_competitors(competitors: list) -> None
```

## Parameters

| Parameter     | Type   | Description                                  |
| ------------- | ------ | -------------------------------------------- |
| `competitors` | `list` | List of competitor dicts (modified in place) |

## How It Works

1. For each competitor, construct Google favicon URL
2. Download the favicon and compute MD5 hash
3. Compare against known "generic globe" hash
4. If generic, set `favicon_url` to empty string
5. If real favicon, keep the URL

## Google Favicon Service

```
https://www.google.com/s2/favicons?domain={domain}&sz=64
```

## Generic Globe Detection

Google returns a generic globe icon for domains without favicons. We detect this by comparing MD5 hashes:

```python theme={null}
GOOGLE_GENERIC_GLOBE_HASH = "b8a0bf372c762e966cc99ede8682bc71"
```

## Code Location

```
src/website/competitor_research/service.py
# Lines 168-178: add_favicon_urls_to_competitors()
# Lines 31-48: is_generic_google_favicon()
```
