API Reference
Comprehensive reference for all BrandQL API endpoints, parameters, and response formats to build robust logo fetching into your applications.
curl "https://api.brandql.com/logo/paypal.com?size=128&format=png"
const response = await fetch("https://api.brandql.com/logo/paypal.com?size=128&format=png");
const data = await response.json();
import requests
response = requests.get("https://api.brandql.com/logo/paypal.com", params={
"size": "128",
"format": "png"
})
data = response.json()
{
"domain": "paypal.com",
"logo": "https://cdn.brandql.com/logos/paypal.png",
"size": "128x128",
"format": "png",
"cached": true,
"colors": {
"primary": "#00A86B",
"background": "#FFFFFF"
}
}
{
"error": "Domain not found",
"domain": "nonexistent.xyz"
}
curl -X POST "https://api.brandql.com/batch" \
-H "Content-Type: application/json" \
-d '{
"domains": ["stripe.com", "paypal.com", "github.com"],
"size": "64x64"
}'
const response = await fetch("https://api.brandql.com/batch", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
domains: ["stripe.com", "paypal.com", "github.com"],
size: "64x64"
})
});
const data = await response.json();
[
{
"domain": "stripe.com",
"logo": "https://cdn.brandql.com/logos/stripe.png",
"cached": true
},
{
"domain": "paypal.com",
"logo": "https://cdn.brandql.com/logos/paypal.png",
"cached": true
},
{
"domain": "github.com",
"logo": "https://cdn.brandql.com/logos/github.png",
"cached": false
}
]
Overview
Access BrandQL's logo fetching capabilities through simple REST API endpoints. The primary endpoint retrieves high-quality logos for any domain with just-in-time fetching. You can specify sizes, formats, and variants to match your UI needs. All requests require no authentication for the free tier—simply hit the endpoints.
Base URL: https://api.brandql.com
Use the examples below to integrate logo fetching into your applications. Responses include direct URLs to optimized CDN-hosted images.
Single Logo Endpoint
Fetch a logo for a single domain using GET /logo/{domain}. BrandQL handles caching and on-demand retrieval automatically.
Path Parameters
The domain name, e.g., paypal.com or newstartup.io. BrandQL fetches logos even for uncached domains.
Query Parameters
Logo size as widthxheight, e.g., 64x64, 128x128, 256x256. Defaults to 128x128.
Output format: png, svg, or webp. PNG is recommended for broad compatibility.
Color variant: light or dark. Matches your app's theme.
Response Fields
The requested domain.
Direct URL to the optimized logo image on BrandQL's CDN.
Whether the logo was served from cache (true) or fetched just-in-time (false).
Extracted dominant colors from the logo for theming.
Batch Logo Fetching
Request logos for multiple domains in a single call using POST /batch. Ideal for dashboards or lists.
Batch requests support up to 50 domains per call. Use consistent query parameters across the batch for efficiency.
SDK Integration Examples
BrandQL provides lightweight SDKs for popular frameworks. Install via npm and use intuitive components or functions.
const { getLogo } = require('@brandql/node');
async function fetchLogo(domain) {
const logoData = await getLogo(domain, { size: '128x128' });
console.log(logoData.logo); // CDN URL
}
fetchLogo('paypal.com');
import { BrandLogo } from '@brandql/react';
function CompanyCard({ domain }) {
return (
<div className="company-card">
<BrandLogo domain={domain} size="64" fallback="initials" />
<span>{domain}</span>
</div>
);
}
<template>
<div class="company-card">
<BrandLogo :domain="domain" size="64" fallback="initials" />
<span>{{ domain }}</span>
</div>
</template>
<script>
import { BrandLogo } from '@brandql/vue';
</script>
Rate Limits and Best Practices
Free tier: 1,000 requests per day. Paid plans scale to millions.
Caching
Leverage cached field and your own cache to stay under limits.
Error Handling
Gracefully handle 404s with fallback initials or placeholders.
Always validate domains before requesting to avoid unnecessary 404s.