mode:lightordarkcolors:accent,background,text(hex)typography: detected headings (h1–h4) andpwithfontFamily,fontFallbacks,fontSize,fontWeight,lineHeight,letterSpacingelementSpacing:xs,sm,md,lg,xlshadows:sm,md,lg,xl,innercomponents: detected button variants (primary,secondary,link) andcardwith full computed CSSfontLinks: Google or@font-facefont files keyed by family, with downloadable URLs per weight
Integrate Context.dev's Design System API in your app
Prerequisites
-
A Context.dev API key. Sign up at context.dev/signup, copy the key from the dashboard (prefix
ctxt_secret_), and export it: -
An SDK (optional). Install for your language, or skip the install and call directly with
curl:
Extract the full styleguide
GET /web/styleguide takes in a domain (or a webpage URL) and returns the website’s full design system.
Request Parameters
Response
Extract just the fonts
GET /web/fonts takes a domain (or a direct URL) and returns only the typography subset: every font family the site uses, with weights, fallbacks, usage counts, and downloadable file URLs.
Request Parameters
Response
Handle errors
A non-2xx response returns an{ message, error_code, status } envelope. The common ones:
A 400 from omitting both
domain and directUrl looks like:
Use cases
- Build faster, brand-aware onboarding flows
- Build branded email templates from a website
- Generate branded marketing assets at scale
Next steps
Prefetch for Faster Response
Hide cold-hit latency from your users.
Handle Rate Limits
Backoff strategies, client cache, and prefetch fallbacks.
Best Practices
Caching, error handling, and key hygiene.
Troubleshooting
Status codes, retry patterns, and common errors.