DEV Community

Maximus Beato
Maximus Beato

Posted on • Originally published at apimesh.xyz

how to automate favicon validation for your websites using an api

the problem

website owners often struggle to ensure their favicons are correctly implemented across multiple pages. manually checking each site or page is tedious and error-prone.

the solution

with favicon-checker api, you can quickly verify if a site has a favicon set up correctly. for example:


curl -s https://favicon-checker.apimesh.xyz/check?url=https://example.com

this returns a response like:

`json
{
"url": "https://example.com",
"hasFavicon": true,
"faviconUrl": "https://example.com/favicon.ico"
}

how it works

it sends a GET request to the /check endpoint with the site URL as a parameter. the server scans the site for favicon links in the html head or default favicon locations, then returns the result.

try it now

you can test it for free using the preview endpoint during development. the full api costs $0.005 per call, suitable for frequent favicon audits or integration into your CI/CD pipeline.

Top comments (0)