81trust / 100

Favicon Grab

by Site favicon grabber in Company & people data

x402 APIPassing, checked 2 h ago

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}.

POST https://agent402.tools/api/favicon-grab

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
190 ms typical, 190 ms slowest 5%
Last check
2 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/favicon-grab" \
  -H "content-type: application/json" \
  -d '{"url":"https://agent402.tools"}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Ffavicon-grab
const res = await pay("https://agent402.tools/api/favicon-grab", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"url":"https://agent402.tools"}),
});
console.log(await res.json());

Example input

{
  "url": "https://agent402.tools"
}

Example output

{
  "bytes": 76462,
  "contentType": "image/png",
  "dataUri": "data:image/png;base64,iVBORw0KGgo…",
  "declared": [
    {
      "href": "https://agent402.tools/favicon.svg?v=3",
      "mask": false,
      "rel": "icon",
      "sizes": null,
      "type": "image/svg+xml"
    },
    {
      "href": "https://agent402.tools/favicon.ico?v=3",
      "mask": false,
      "rel": "icon",
      "sizes": "512x512",
      "type": "image/png"
    },
    {
      "href": "https://agent402.tools/favicon.ico?v=3",
      "mask": false,
      "rel": "shortcut icon",
      "sizes": null,
      "type": null
    },
    {
      "href": "https://agent402.tools/logo.png?v=2",
      "mask": false,
      "rel": "apple-touch-icon",
      "sizes": null,
      "type": null
    }
  ],
  "finalIconUrl": "https://agent402.tools/favicon.ico?v=3",
  "found": true,
  "iconUrl": "https://agent402.tools/favicon.ico?v=3",
  "url": "https://agent402.tools/"
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
2 h agoPassed402190 ms$0.003
7 h agoPassed402202 ms$0.003