# Favicon Extract

> Favicon Extract is a paid API for AI agents from grist.tools, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-11).

Fetches and returns all favicon/icon URLs declared on a web page, plus a base64-encoded copy of the best selected icon.

## Facts

- Endpoint: POST https://grist.tools/v1/favicon-extract?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/favicon-extract-80b5005f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__aADHc5_0N1fQCk-CZ7QX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability favicon-extract-80b5005f -d '<json body>'
```

Example prompt: Can you grab the favicon for https://stripe.com and give me the best one as a base64 image along with all the icon URLs declared on the page?

## When to prefer this

Choose this endpoint when you need to programmatically retrieve the best favicon or icon for any web page without maintaining a browser session, scraping infrastructure, or API keys. It is ideal for enriching link previews, bookmark managers, directory listings, or brand asset pipelines where you need both the icon URL list and a ready-to-use base64 image. Unlike generic scraping endpoints, it specifically understands icon link tag semantics (rel=icon, apple-touch-icon, mask-icon) and enforces same-domain fetching for security.

## Known failure modes

- URL is unreachable or returns non-2xx status — selected may be null, icons array may be empty
- Page has no icon link tags and /favicon.ico also returns 404 — selected is null
- Icon hosted on a different registrable domain than the page — excluded from fetching
- Malformed or non-http(s) URL input — validation error returned
- Icon file is corrupt or in an unsupported format — selected may be null
- URL exceeds 2048 character limit — request rejected

## How this service works

x402 API catalogue for AI agents: 50 deterministic HTTP endpoints, paid per call with no account and no API key. One endpoint does one thing, always the same way, for a fraction of a cent.

## Output

Returns a JSON object containing: page_url (the requested URL), icons (array of all detected icon link tags with rel, url, type, and sizes fields), and selected (the best icon with url, source_format, width, height, bytes, and image_base64 — or null if none could be fetched).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "url"
 ],
 "properties": {
  "url": {
   "type": "string",
   "description": "Absolute http(s) URL of the web page whose icon <link> tags (rel icon, shortcut, apple-touch-icon or mask-icon) are read, up to 2048 characters; /favicon.ico on its origin is added as a last candidate and icons are only fetched from the same registrable domain."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "page_url",
  "icons",
  "selected"
 ],
 "properties": {
  "icons": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "url",
     "rel",
     "type",
     "sizes"
    ],
    "properties": {
     "rel": {
      "type": "string"
     },
     "url": {
      "type": "string"
     },
     "type": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     },
     "sizes": {
      "anyOf": [
       {
        "type": "string"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "additionalProperties": false
   }
  },
  "page_url": {
   "type": "string"
  },
  "selected": {
   "anyOf": [
    {
     "type": "object",
     "required": [
      "url",
      "source_format",
      "width",
      "height",
      "bytes",
      "image_base64"
     ],
     "properties": {
      "url": {
       "type": "string"
      },
      "bytes": {
       "type": "integer",
       "maximum": 9007199254740991,
       "minimum": -9007199254740991
      },
      "width": {
       "anyOf": [
        {
         "type": "integer",
         "maximum": 9007199254740991,
         "minimum": -9007199254740991
        },
        {
         "type": "null"
        }
       ]
      },
      "height": {
       "anyOf": [
        {
         "type": "integer",
         "maximum": 9007199254740991,
         "minimum": -9007199254740991
        },
        {
         "type": "null"
        }
       ]
      },
      "image_base64": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "source_format": {
       "enum": [
        "jpeg",
        "png",
        "gif",
        "webp",
        "tiff",
        "avif",
        "heic",
        "svg",
        "bmp",
        "ico"
       ],
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    {
     "type": "null"
    }
   ]
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/favicon-extract-80b5005f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grist.tools](https://www.zero.xyz/host/grist.tools/llms.txt)
