API Quickstart
End-to-end tutorials for integrating Brandparser into your app
The Brandparser API lets you parse any website and extract its brand identity: colors, fonts, logos, tone of voice, and more. These guides show you how to use that data in real integration scenarios.
Prerequisites
- A Brandparser account with an API key
- Node.js 18+ (all examples use
fetch, no SDK required)
Setup
Set your API key as an environment variable:
export BRANDPARSER_API_KEY="bp_prod_your_api_key"Every guide uses this shared helper to parse a brand and wait for results:
const API_KEY = process.env.BRANDPARSER_API_KEY!;
const BASE_URL = "https://api.brandparser.com";
async function parseBrand(url: string) {
// Submit URL for analysis
const parseRes = await fetch(`${BASE_URL}/v1/api/parse`, {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ url }),
});
const { data } = await parseRes.json();
const brandId = data.brand_id;
// Poll until complete
while (true) {
const brandRes = await fetch(`${BASE_URL}/v1/api/brands/${brandId}`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const brand = await brandRes.json();
if (brand.data.analysis_status === "complete") {
return brand.data;
}
if (brand.data.analysis_status === "failed") {
throw new Error("Analysis failed");
}
await new Promise((r) => setTimeout(r, 5000));
}
}Guides
| Guide | What you'll build |
|---|---|
| Onboard a Customer | Parse a URL and extract colors, fonts, and logos |
| Branded UI | Theme a React/Next.js app with customer brand data |
| Branded Emails | Generate HTML email templates with brand colors and logos |
| White-Label SaaS | Multi-tenant brand theming with Next.js middleware |
| Let Users Edit Their Brand | Build a brand editing UI with PATCH, revert, and edit history |
API Reference
For full endpoint and schema documentation, see the API Reference.