GuidesAPI Reference Overview

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"
{
  "domain": "paypal.com",
  "logo": "https://cdn.brandql.com/logos/paypal.png",
  "size": "128x128",
  "format": "png",
  "cached": true,
  "colors": {
    "primary": "#00A86B",
    "background": "#FFFFFF"
  }
}
curl -X POST "https://api.brandql.com/batch" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["stripe.com", "paypal.com", "github.com"],
    "size": "64x64"
  }'
[
  {
    "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

path
domainstring
Required

The domain name, e.g., paypal.com or newstartup.io. BrandQL fetches logos even for uncached domains.

Query Parameters

query
sizestring

Logo size as widthxheight, e.g., 64x64, 128x128, 256x256. Defaults to 128x128.

query
formatstring

Output format: png, svg, or webp. PNG is recommended for broad compatibility.

query
variantstring

Color variant: light or dark. Matches your app's theme.

Response Fields

domainstring
Required

The requested domain.

logostring
Required

Direct URL to the optimized logo image on BrandQL's CDN.

cachedboolean
Required

Whether the logo was served from cache (true) or fetched just-in-time (false).

colorsobject

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');

Rate Limits and Best Practices

Free tier: 1,000 requests per day. Paid plans scale to millions.

Always validate domains before requesting to avoid unnecessary 404s.