Currently undergoing maintenance - Some pages may not work as expected

Favicon URL Grabber API

Introduction

This is a simple API that returns the URL of the favicon for a given website.

Usage

To use this api, just send a GET request to the following endpoint:

https://api.jm26.net/favicon-grabber/

For example, if you want to get the facicon from the url https://api.jm26.net, you can send a GET request to the following url:

curl -X GET "https://api.jm26.net/favicon-grabber/?url=https://api.jm26.net"

The response will be:

{
  "status": "success",
  "message": "Favicon found",
  "url": "https://api.jm26.net",
  "favicon": "https://api.jm26.net/assets/fav/apple-touch-icon.png",
  "format": "png"
}

Parameters

The following parameters are available:

Parameter Description Default Required
url The url to get the favicon from - ✔️
details Whether to return the favicon details or not false
embed Whether to directly embed the favicon in the response or not* false

* The details parameter will be ignored if the embed parameter is set to true.

Details Parameter

If you want to get the favicon details, simply add the details parameter to the request and set it to true.

curl -X GET "https://api.jm26.net/favicon-grabber/?url=https://api.jm26.net&details=true"

The response will be:

{
  "status": "success",
  "message": "Favicon found",
  "url": "https://api.jm26.net",
  "favicon": "https://api.jm26.net/assets/fav/apple-touch-icon.png",
  "format": "png",
  "details": {
    "url": "https://api.jm26.net",
    "pageUrl": "https://api.jm26.net/",
    "siteUrl": "https://api.jm26.net/",
    "icoUrl": "https://api.jm26.net/assets/fav/apple-touch-icon.png",
    "icoType": "png",
    "findMethod": "head absolute_path without base href",
    "error": null,
    "icoExists": null,
    "icoMd5": null,
    "icoData": null,
    "debugInfo": {
      "link_tag": "<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/assets/fav/apple-touch-icon.png\">",
      "ico_href": "/assets/fav/apple-touch-icon.png"
    }
  }
}

Embed Parameter

If you want to directly embed the favicon in the response, simply add the embed parameter to the request and set it to true.

curl -X GET "https://api.jm26.net/favicon-grabber/?url=https://api.jm26.net&embed=true"

The response will be an image:

Favicon

Exploiting this API is forbidden. It is unethical and will result an IP ban and in some cases an entire shutdown of the API. Please don't ruin this for everyone. Thanks