35

Is it possible to get a larger version of the favicon from the Google's api or from somewhere else?

This is the url. http://www.google.com/s2/favicons?domain=google.com

I searched for an alternative api on ProgrammableWeb and Google but many of them don't exist anymore and the one I found that actually seems to work isn't free. (http://grabicon.com/)

I need the icon for a VB.NET project that has a list of websites with icons. But 16x16 icons are too small for that.

6 Answers 6

56

looks like there is size parameter in google now.

https://www.google.com/s2/favicons?sz=64&domain_url=yahoo.com

4
  • 7
    Great, it works. But can someone find information about the usage of this url and why or on which terms it's offered?
    – Moritz W
    Commented Nov 7, 2020 at 16:49
  • 5
    Where is the documentation about this size parameter? Because following the provided link gives a poor quality yahoo logo/icon 😢 Commented May 7, 2021 at 9:30
  • 1
    @BernoulliIT When I change the parameter to 256, i.e. https://www.google.com/s2/favicons?sz=256&domain_url=yahoo.com, it give me some what better quality. 512 just give me 16px.
    – bayuah
    Commented Nov 13, 2022 at 3:30
  • 1
    Nice one @bayuah 👍🏼 Commented Nov 14, 2022 at 9:04
11

Editted: The below answer is no longer valid, but the code is freely available on github:

Github -> Favicons for all!

Original answer

You can also try Statvoo's Favicon API, e.g.

https://api.statvoo.com/favicon/?url=google.com

https://api.statvoo.com/favicon/?url=stackoverflow.com

etc..

They also have quite a few other API's you can use if you look around. Most of which are free and have been around for years.

1
8

Looks like Google has an size attribute too.

https://www.google.com/s2/favicons?sz=64&domain_url=https://stackoverflow.com/

5

According to https://news.ycombinator.com/item?id=17190599:

Unless that endpoint can also return other resolutions, Favicon Kit offers more: https://api.faviconkit.com/twitter.com/144 https://api.faviconkit.com/twitter.com/16

(Though, I will say, the URIs returned for Twitter and the image sizes don't actually align in those cases. The first is actually 192ˣ192 pixels, and the second is 32ˣ32 pixels. That seems odd. Maybe they should have endpoints like domain/large, domain/medium, domain/small?)

3
  • 1
    However it does have a rate limit Commented Jan 5, 2019 at 1:20
  • Finally an answer that really results in good quality large(r) favicons 👍🏻 Commented May 7, 2021 at 9:33
  • Loads slower. At least its fallback icon is better than Google's. Commented Mar 25, 2022 at 23:35
5

Here's some Favicon Fetchers I have found

For Favicon Grabber it will return as JSON list of icon URLs.

Alternatively you can load the main page of the site and figure it out from there: https://stackoverflow.com/a/1990487/

2

Favicons are specified either as part of the HTML page, the HTTP response to a request for a page, or simply by being hosted at a default location.

That's true for all sites. There's plenty of browser extensions that can help you figure out the favicons a page send, if you don't manage by hand. For example, right clicking in firefox, "Page Info", "Media", "sort by type"->"Icon" should show all icons that a browser can find. It's not usual to have Icons larger than 32x32, and google might not be an exception.

Also be aware that the .ico format can contain multiple Icon sizes that not all tools show. So saving that .ico on your computer and inspecting it with a tool known to deal with all sizes contained in a single file might help.

Last word of advice: You're dealing with the logo, the very core of their brand, of a multi-billion dollar company. You might want to check with their policy of using that logo in your project. Probably it's OK (for example, browser don't seem to get in trouble for having a google logo for their google search box), but I'd still take care not to raise the impression that you're association a product of your own making with their logo.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.