{"uid":"cap_9ReHW9eka0FCOr_Z8-BK7","slug":"agent402-tools-favicon-grab-a19f09a2","name":"agent402.tools Favicon Grab","description":"Fetch a site's favicon/logo: reads the page's declared <link rel=icon…> tags (all variants with their sizes and types), deterministically picks the largest declared icon (falling back to /favicon.ico), fetches it, and returns the bytes as a base64 data URI plus the resolved icon URL and content type. Icons over 256KB return the URL and metadata without the inline data URI. SSRF-guarded - private-network hosts are rejected. Sites with no reachable icon return {found:false}.","url":"https://agent402.tools/api/favicon-grab","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"url":{"type":"string","description":"Site URL or bare domain (https:// is assumed when omitted)."}}},"responseSchema":{"type":"json","example":{"url":"https://github.com/","bytes":958,"found":true,"dataUri":"data:image/png;base64,iVBORw0KGgo…","iconUrl":"https://github.githubassets.com/favicons/favicon.png","declared":[{"rel":"alternate icon","href":"https://github.githubassets.com/favicons/favicon.png","mask":false,"type":"image/png","sizes":null}],"contentType":"image/png","finalIconUrl":"https://github.githubassets.com/favicons/favicon.png"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0atRkV4Wtqeim8JV5gWpI","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a website's favicon/logo by parsing its HTML link tags, selecting the largest declared icon, and returning the image bytes as base64","exampleAgentPrompt":"Can you grab the favicon for github.com and give me the image bytes as base64 so I can display it in my app?","exampleUseCases":null,"resultDescription":"Returns the favicon image as base64-encoded bytes, selected deterministically as the largest declared icon from the page's <link rel=icon> tags, falling back to /favicon.ico if no tags are found. Includes icon size and MIME type metadata.","failureModes":["URL is unreachable or returns non-2xx status — endpoint may return an error or fall back to /favicon.ico","Site has no declared icon tags and /favicon.ico does not exist — returns error or empty response","Malformed URL input — validation error returned","Icon file itself returns a non-image content type — may return error or unexpected bytes","Network timeout fetching the remote site or icon resource"],"whenToPreferThis":"Use this endpoint when you need to programmatically retrieve a website's favicon or brand icon as raw image bytes (base64), especially when you want the largest available declared icon rather than a guess at /favicon.ico. Prefer this over manual HTML parsing when you need a reliable, deterministic icon selection across many sites.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:00:26.917Z","isFirstParty":false}