Skip to main content
GET
Extract a design system

Overview

/styleguide renders a page in a real browser and reads its design system off what is actually on screen — the way a designer would write it down to rebuild the site’s look:
  • Colors by role — primary (the main button’s fill), secondary, accent, background, surface, text, text_muted, heading, link, border — and the full palette.
  • Typography — the heading, body and monospace faces with their font stacks, and the type scale: h1–h6, body, small, label and nav, each with size, weight, line height, letter spacing and text transform. The ratio between steps is reported, named when it is a classic one (major third, perfect fourth…).
  • Spacing — the base unit most margins and paddings are a multiple of, and the scale in use.
  • Radii and shadows — small, medium and large, plus whether pills are used.
  • Components — the primary and secondary button (fill, text, border, radius, weight, font size, height, padding, shadow), the input, the card and the link.
  • Breakpoints — the widths the CSS switches layout at.
  • CSS variables — the site’s own custom properties for colors, lengths, fonts and shadows.
exports has the same guide as CSS custom properties and a Tailwind theme, ready to paste. It is built for coding agents: point one at a site and it can generate UI that looks like it. For logos, brand colors from the logo itself, fonts and social links, use /brand.

Example requests

Example response

How it reads a site

Everything comes from computed styles in the rendered page, so it reflects what visitors see, whatever the CSS framework:
  • Colors are read in any CSS color space (oklch(), lab(), color() included) and given as hex; translucent ones are blended over what is behind them.
  • A text style is the one most instances of an element share, weighted by text, so one oversized hero heading does not speak for every heading.
  • Spacing, radii and shadows are tallied across up to 2,500 visible elements. Off-grid one-offs don’t make the scale, transparent placeholder shadows (Tailwind’s) are dropped, and hairline “ring” shadows count as borders, not elevation.
  • css_variables lists custom properties in scope on the page, names that read as design tokens first.
It is best effort: a value the page gives no reliable answer for is null. Set dark_mode=true to read the dark theme of a site that has one; color_scheme says which theme you got.

Credits

10 credits per request. Never answered from curated data; repeat requests can be served from the request cache.

GET /brand

Logos, brand colors, fonts and social links. 10 credits.

GET /screenshot

See the page the guide was read from. 1 credit.

Authorizations

X-API-Key
string
header
required

Your Prefetch API key. Obtain one from the dashboard.

Query Parameters

url
string
required

Target website URL. https:// is prepended automatically if the protocol is omitted.

Minimum string length: 1
Example:

"https://stripe.com"

dark_mode
string

Read the site's dark theme (prefers-color-scheme: dark) instead of its default one. Sites without one return their usual theme, with color_scheme saying which it is. Pass "true" to enable.

Response

The site's design system.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required