4. Enrich Brand Logos
Purpose: Fetch and store logo URLs for brands in the Brand Library using the Brandfetch API, skipping brands that already have logos.
Prerequisites:
.env.localwithSUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY,BRANDFETCH_API_KEY- Brands exist in the
brandstable withoutlogo_url
Cost / Duration: $0 (Brandfetch API credits) | 5-15 min
Prompt
Enrich brands with logo URLs from Brandfetch.
Step 1 — Dry-run (preview which brands would be updated):
```bash
bun scripts/enrich-brand-logos.ts
```
Default limit is 25 brands. No API calls or database writes in dry-run.
Step 2 — Execute enrichment:
```bash
bun scripts/enrich-brand-logos.ts --execute
```
Fetches logos from Brandfetch and updates brand records. Respects API
rate limits (~30 req/min).
Step 3 — Process a specific batch size:
```bash
bun scripts/enrich-brand-logos.ts --limit=50 --execute
```
Step 4 — Process all brands missing logos:
```bash
bun scripts/enrich-brand-logos.ts --all --execute
```
Use with caution for large brand libraries.
Verify: Re-run dry-run to confirm reduced count of brands without logos.
```bash
bun scripts/enrich-brand-logos.ts
```
Verification
- Dry-run shows reduced count of brands without logos (or
0) - No rate limit errors (429) during execution
- Logo URLs are valid and accessible
- Brands that already had logos were skipped
Related Prompts
- Discover Domains via PDL — Discover new brands that need logos
- Seed Brand URLs — Seed URLs for enriched brands