Logo API
Get the logo of any company by providing its domain name. Returns the logo image directly.
No authentication is required for GET requests.
Get Logo
Code
Parameters:
| Name | Type | Required | Description |
|---|---|---|---|
| domain | string | Yes | The domain name (e.g., tomba.io) |
Subdomains are automatically resolved to the root domain (e.g., www.google.com and mail.google.com both resolve to google.com).
Query Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
s | int | 80 | Image size in pixels (1-512). Square output. |
size | int | 80 | Alias for s. |
greyscale | boolean | false | Returns a greyscale version of the logo when set to true. |
d | string | URL-encoded URL of a custom default image. | |
default | string | Alias for d. |
By default, images are presented at 80px by 80px if no size parameter is supplied. You may request a specific image size, which will be dynamically delivered from Tomba by using the s= or size= parameter and passing a single pixel dimension (since the images are square).
Using an <img> tag:
Since the endpoint returns the image directly, you can drop the URL straight into the src attribute of an <img> tag — no API key and no preprocessing required.
Code
Rendered results for tomba.io:
?s=48 | ?s=80 (default) | ?s=128 | ?s=128&greyscale=true |
|---|---|---|---|
Response Headers:
| Header | Description |
|---|---|
Content-Type | Image MIME type (image/png, image/webp, etc.) |
Content-Disposition | attachment; filename="domain.ext" |
Cache-Control | public, max-age=86400 (24h for logos, 5min for defaults) |
X-Cache | hit or miss (in-memory cache status) |
Response:
| Status | Description |
|---|---|
| 200 | Logo image with Content-Type: image/png|webp|avif |
| 400 | Invalid domain or invalid size parameter |
Default Image
When a domain has no matching Tomba logo, a default placeholder image is returned instead of a 404 error. The default image is a gray square with a "?" mark, sized according to the s/size parameter (or 80x80 by default).
If you'd prefer to use your own default image, supply the URL in the d= or default= parameter. The URL should be URL-encoded to ensure that it carries across correctly. When a custom default is provided and the logo is not found, the API proxies the image from your URL.
Code
Only https URLs are accepted. Invalid URLs return a 400 Bad Request.
Examples
Code