Get Logo Image

GEThttps://api-logos.dataandapis.com/v1/logos/{domain}/image

Get Logo Image is an endpoint of the Logos API. Every icon a website publishes, scored and served as an image, from just the domain.

Send your key in the X-Api-Key header. Each call costs 5 tokens; a free key includes 500 tokens a month.

Request

Path parameters

ParameterExample
domaingithub.comRequired

Example request

curl
curl "https://api-logos.dataandapis.com/v1/logos/github.com/image" \
  -H "X-Api-Key: YOUR_API_KEY"
JavaScript / TypeScript (dataandapis package)
// npm install dataandapis
import { DataAndApis } from "dataandapis";

const client = new DataAndApis(); // reads DATAANDAPIS_API_KEY

const file = await client.logos.getLogoImage({ domain: "github.com" }); // a Blob
Node.js (fetch)
const res = await fetch("https://api-logos.dataandapis.com/v1/logos/github.com/image", {
  headers: { "X-Api-Key": process.env.DATAANDAPIS_KEY },
});
const data = await res.json();
Python (dataandapis package)
# pip install dataandapis
from dataandapis import DataAndApis

client = DataAndApis()  # reads DATAANDAPIS_API_KEY

file = client.logos.get_logo_image(domain="github.com")  # bytes
Python (requests)
import os, requests

r = requests.get(
    "https://api-logos.dataandapis.com/v1/logos/github.com/image",
    headers={"X-Api-Key": os.environ["DATAANDAPIS_KEY"]},
)
data = r.json()

Guide to the dataandapis npm package →Guide to the dataandapis Python package →

Example response

Example response
{
  "note": "Binary response — the best icon itself, not JSON. Shown here as the headers the endpoint returns.",
  "status": 200,
  "headers": {
    "Content-Type": "image/svg+xml",
    "Cache-Control": "public, max-age=86400",
    "X-Logo-Source": "https://github.githubassets.com/favicons/favicon.svg"
  },
  "body": "<svg width=\"32\" height=\"32\" ...> (959 bytes)"
}