# Google Favicons

> Get the icon of almost any website, the one browsers show in tabs and bookmarks (its favicon), from Google's public favicon service. Give a domain, a link or an email address and get a link to the icon at a size from 12 to 256 pixels, ready for an email, a chat message or a web page, whether the site has an icon of its own, and the icon as a file to attach. Look up to 50 websites at once. Google does not document the service or promise to keep it running. No account or API key required.

App · Images & Design · 2 actions. Web page: https://docs.lodol.com/docs/integrations/google-favicons

## Actions

### Get a website's favicon

Get a website's icon, the one browsers show in tabs and bookmarks, by its domain, a link to any page on it, or an email address at it: a link to the icon at the size you pick, an <img> tag, its real size and whether the site has an icon of its own. Save it as a file to attach if you need to. No API key required.

**Inputs**

- Website (`website`, text, required): The website whose icon you want: its domain, such as 'github.com', a link to any page on it, or an email address at it, whose domain is used.
- Size (`size`, text): Optional. The icon's width and height in pixels: one of the sizes Google serves. 64 by default. Google never enlarges an icon, so a site whose own is smaller comes back at its own size. One of: `12` (12 x 12), `16` (16 x 16), `24` (24 x 24), `32` (32 x 32), `40` (40 x 40), `48` (48 x 48), `64` (64 x 64), `96` (96 x 96), `128` (128 x 128), `180` (180 x 180), `256` (256 x 256). Default: `64`.
- Also save the icon as a file (`save_as_file`, true/false): Off by default, because the link is all an email, a chat message or a web page needs. Turn it on when a later step needs the file itself: attaching it to an email, uploading it to storage, or posting it as a file. Default: `false`.

**Outputs**

- `content_type` (text): The saved file's type, e.g. image/png, or '' when not saved.
- `document_ref` (text): The saved file's document reference, or '' when not saved.
- `documents` (list): The saved icon as a document, ready to attach to a later step. Empty when it was not saved.
- `domain` (text): The site's domain name as Google was asked for it, e.g. 'www.bbc.co.uk': a link or an email address comes down to its domain, in lower case, and a name in another script to its xn-- form.
- `file_size_bytes` (number): The saved file's size in bytes, or 0 when not saved.
- `file_url` (text): A URL that serves the saved file, or '' when not saved.
- `has_icon` (true/false): True when Google has the site's own icon. False when it has none for the site, or the site does not exist, and sent its default icon, a small blue globe, which the link then shows.
- `height` (number): The icon's real height in pixels.
- `image_tag` (text): The same link as an HTML <img> tag, with alt text, for a step that writes an email or a page. It shows the icon at the size asked for, so icons line up in a list whatever size each site's own is.
- `mimetype` (text): The icon's file type as Google sent it: 'image/png' for most sites, 'image/jpeg' for a few.
- `saved_as_file` (true/false): True when the icon was also saved as a file (Also save the icon as a file). The file fields below are empty otherwise.
- `size` (number): The size asked for, in pixels, e.g. 64.
- `url` (text): A link to the icon at that size on Google's servers, e.g. 'https://www.google.com/s2/favicons?domain=github.com&sz=64'. It can go straight into an email, a chat message or a web page.
- `website` (text): The website as it was given, e.g. 'https://www.bbc.co.uk/news' or 'support@stripe.com'.
- `width` (number): The icon's real width in pixels. Smaller than the size asked for when the site has no bigger icon, as Google never enlarges one: 16 for the default globe.

**Example output**

```json
{
  "content_type": "",
  "document_ref": "",
  "documents": [],
  "domain": "github.com",
  "file_size_bytes": 0,
  "file_url": "",
  "has_icon": true,
  "height": 32,
  "image_tag": "<img src=\"https://www.google.com/s2/favicons?domain=github.com&amp;sz=64\" alt=\"github.com icon\" width=\"64\" height=\"64\">",
  "mimetype": "image/png",
  "saved_as_file": false,
  "size": 64,
  "url": "https://www.google.com/s2/favicons?domain=github.com&sz=64",
  "website": "github.com",
  "width": 32
}
```

### Get favicons for several websites

Get the icons of up to 50 websites at once, in the order given: for each, a link and an <img> tag at the size you pick and whether the site has an icon of its own, with counts of those that do and do not. An entry that is not a website is reported rather than stopping the step. No API key required.

**Inputs**

- Websites (`websites`, text, required): Up to 50 websites: domains, links or email addresses, separated by commas or on lines of their own, or a list from an earlier step. There is one result for each, in the order given, so the results line up with the list they came from.
- Size (`size`, text): Optional. The icon's width and height in pixels: one of the sizes Google serves. 64 by default. Google never enlarges an icon, so a site whose own is smaller comes back at its own size. One of: `12` (12 x 12), `16` (16 x 16), `24` (24 x 24), `32` (32 x 32), `40` (40 x 40), `48` (48 x 48), `64` (64 x 64), `96` (96 x 96), `128` (128 x 128), `180` (180 x 180), `256` (256 x 256). Default: `64`.

**Outputs**

- `count` (number): How many websites were given.
- `icons` (list): One result for each website, in the order given.
- `not_websites` (number): How many entries could not be looked up: blank, or not a website. Their error says why.
- `with_icon` (number): How many of them have an icon of their own.
- `without_icon` (number): How many are websites Google has no icon for, shown with its default globe.

**Example output**

```json
{
  "count": 3,
  "icons": [
    {
      "domain": "github.com",
      "error": "",
      "has_icon": true,
      "height": 32,
      "image_tag": "<img src=\"https://www.google.com/s2/favicons?domain=github.com&amp;sz=64\" alt=\"github.com icon\" width=\"64\" height=\"64\">",
      "mimetype": "image/png",
      "size": 64,
      "url": "https://www.google.com/s2/favicons?domain=github.com&sz=64",
      "website": "github.com",
      "width": 32
    },
    {
      "domain": "www.bbc.co.uk",
      "error": "",
      "has_icon": true,
      "height": 64,
      "image_tag": "<img src=\"https://www.google.com/s2/favicons?domain=www.bbc.co.uk&amp;sz=64\" alt=\"www.bbc.co.uk icon\" width=\"64\" height=\"64\">",
      "mimetype": "image/png",
      "size": 64,
      "url": "https://www.google.com/s2/favicons?domain=www.bbc.co.uk&sz=64",
      "website": "https://www.bbc.co.uk/news",
      "width": 64
    },
    {
      "domain": "example.com",
      "error": "",
      "has_icon": false,
      "height": 16,
      "image_tag": "<img src=\"https://www.google.com/s2/favicons?domain=example.com&amp;sz=64\" alt=\"example.com icon\" width=\"64\" height=\"64\">",
      "mimetype": "image/png",
      "size": 64,
      "url": "https://www.google.com/s2/favicons?domain=example.com&sz=64",
      "website": "example.com",
      "width": 16
    }
  ],
  "not_websites": 0,
  "with_icon": 2,
  "without_icon": 1
}
```
