# 402utils Favicon Resolver

> 402utils Favicon Resolver is a paid API for AI agents from 402utils.com, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-10).

Fetches and ranks all icon candidates for a given website URL, returning the best icon URL plus all discovered favicon variants with metadata.

## Facts

- Endpoint: GET https://402utils.com/v1/favicon?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/402utils-favicon-resolver-ff968a9f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OGWy85N2XTa-Gz5IjQRRG

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 402utils-favicon-resolver-ff968a9f
```

Example prompt: Can you find the best favicon icon for https://stripe.com — I want the highest quality one available, including any apple-touch-icon or manifest icons?

## When to prefer this

Use this endpoint when you need to programmatically discover and rank all favicon/icon variants for any public website, especially when building directories, link previews, or UI dashboards that need the best available icon. It handles the full resolution chain (HTML link tags, web app manifests, and /favicon.ico fallback) in a single call with SSRF protection, making it safer and more complete than a naive fetch of /favicon.ico.

## Known failure modes

- URL fails SSRF check — returns error if the URL resolves to a private/internal IP
- Fetch cap exceeded — returns error if the target site takes too long or responses are too large
- Site has no discoverable icons — falls back to /favicon.ico which may also return 404
- Invalid URL format — returns validation error if the url query param is malformed
- Target site returns non-HTML content — manifest or link parsing may yield no candidates

## How this service works

Resolve a website's best icon: parses <head> for link rel=icon / apple-touch-icon / mask-icon, reads a linked web app manifest's icons, and adds the /favicon.ico fallback, then ranks them (scalable/large first). Returns the best iconUrl plus all ranked candidates with rel/sizes/type/source. The URL is SSRF-checked; fetches are capped. For agents building directories or UIs.

## Output

Returns a JSON object with the best icon URL (iconUrl), the final URL after redirects (finalUrl), and an array of all discovered icon candidates ranked best-first, each including url, rel, sizes, type, and source (link/manifest/fallback).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "url"
     ],
     "properties": {
      "url": {
       "type": "string",
       "format": "uri",
       "description": "Public http(s) page URL (required)."
      }
     },
     "description": "Query string only."
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "url",
      "finalUrl",
      "iconUrl",
      "candidates"
     ],
     "properties": {
      "url": {
       "type": "string",
       "description": "The URL as requested."
      },
      "iconUrl": {
       "type": "string",
       "description": "The best icon (absolute). Falls back to <origin>/favicon.ico."
      },
      "finalUrl": {
       "type": "string",
       "description": "URL after redirects; base for absolutization."
      },
      "candidates": {
       "type": "array",
       "items": {
        "type": "object",
        "required": [
         "url",
         "rel",
         "source"
        ],
        "properties": {
         "rel": {
          "type": "string",
          "description": "icon / apple-touch-icon / mask-icon / manifest / fallback."
         },
         "url": {
          "type": "string"
         },
         "type": {
          "type": "string",
          "description": "MIME type, when present."
         },
         "sizes": {
          "type": "string",
          "description": "Declared sizes, when present."
         },
         "source": {
          "enum": [
           "link",
           "manifest",
           "fallback"
          ],
          "type": "string"
         }
        }
       },
       "description": "All discovered icons, ranked best-first."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/402utils-favicon-resolver-ff968a9f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 402utils.com](https://www.zero.xyz/host/402utils.com/llms.txt)
