Documentation Index
Fetch the complete documentation index at: https://docs.stablebrowse.com/llms.txt
Use this file to discover all available pages before exploring further.
The idea
Point us at a public URL; we render the page in a real browser and return its visual assets as JSON. No agent, no LLM in the loop — these are deterministic extractors that walk the loaded DOM, the computed styles, and the loaded stylesheets.Authorization: Bearer sb_live_... header as the rest of the API — see Authentication. Same monthly task quota — every extraction counts as one task.
The six extractors
You can request all six (default) or a subset via theextractors array.
| Name | Returns | Notes |
|---|---|---|
images | All <img>, inline <svg>, and CSS background-image assets | Includes natural dimensions and alt text. SVGs include their inline markup. |
fonts | Font families in use, with weights and @font-face source URLs | Tags each as google / self-hosted / cdn / system. Categorizes usage as headings / body / decorative. |
colors | The page’s color palette, role-classified | Each color tagged with one of seven roles (see Color roles), plus WCAG contrast issues found on the page. |
icons | Small SVG/icon assets discovered in the DOM | Deduplicated by hash; classified as outline / solid / duotone. |
tokens | Design tokens — spacing scale, radii, shadows, gradients, motion durations | Returns a DTCG-shaped JSON plus convenience flat lists, plus all the page’s :root CSS custom properties. |
logo | The site’s primary logo (best-effort) | Heuristic — checks <header> SVGs, link[rel=icon], then favicons. Returns found: false if nothing convincing is found. |
What the response looks like
POST /v1/design/extract. The full extractor JSON is always returned in task.design on a completed task — there’s no truncation, paging, or sampling.
Color roles
Each entry incolors.colors[] carries a role field. The classifier emits one of seven values:
| Role | Assigned to |
|---|---|
primary | The most-used CTA background color — i.e. the dominant button/<a class="btn"> background. |
background | The most-used background-color page-wide. Usually white or a near-white neutral. |
text | The most-used color (foreground text) page-wide. |
error | RGB heuristic — red-dominant. |
success | RGB heuristic — green-dominant. |
warning | RGB heuristic — orange/amber. |
neutral | Default for everything else. |
The
ColorRole TypeScript union also includes "secondary" and "accent", but the current classifier never emits them. Treat the seven values above as the source of truth for what the API actually returns. Improving the classifier to assign secondary/accent roles is on the roadmap.Asset URLs and the 7-day TTL
For images, fonts, icons, and the logo, every binary asset is uploaded to S3 and surfaced on the response as a signed URL. There are up to three URL fields per asset:src/signedUrl/faceUrl— fresh signed URL safe to use as<img src>,@font-face, etc. NoContent-Disposition.downloadUrl— same bytes, but withContent-Disposition: attachmentbaked into the response. Use this for “Download” buttons; cross-origin<a download>works against this URL.originalSrc/originalFaceUrl— the source CDN URL we found on the page, before mirroring to S3. Useful for provenance.
Lifecycle
A design task goes through the same task states as an agent task:pending → running → completed | failed. See Tasks for the full lifecycle. Typical extractions complete in 5–15 seconds depending on page weight.
You submit a design task by hitting POST /v1/design/extract (the URL is what selects the design route — there’s no flag on the agent endpoint that switches into design mode). The SDKs expose this as client.design.run(...), which submits and polls until terminal in one call:
client.design.submit(...) returns immediately and client.tasks.get(taskId) returns the same task record (with design populated once status === "completed").
Quota and pricing
Every design extraction counts as one task against your monthly quota — same pool as agent tasks. See Authentication → Rate limits. Pricing for high-volume extraction beyond the free tier is handled per-business. Email team@stablebrowse.ai with your expected volume to talk through limits and rates.Common pitfalls
- Logged-in pages. Extraction runs in a fresh browser with no cookies, so you’ll get the page as an unauthenticated visitor sees it. Extracting the signed-in version of a SaaS dashboard isn’t supported in v1.
- Heavy SPAs that hydrate after
networkidle. We do a lazy-load scroll pass before extracting, but a small number of pages keep loading content for 30+ seconds. If you see emptyimages[]arrays on a page that’s clearly image-rich, the page may be deferring loads in a way our scroll pass misses. - Pages behind aggressive bot mitigation. Cloudflare challenges, hCaptcha walls, etc. are not bypassed — the worker uses a residential proxy by default, but if the page hard-refuses, the task will fail. Open an issue with the URL if you hit this.
