Skip to main content
GET
Scrape Styleguide
10 Credits

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <API_KEY>. Keys have full access by default.

Query Parameters

domain
string

Domain name to extract styleguide from (e.g., 'example.com', 'google.com'). The domain will be automatically normalized and validated. You must provide either 'domain' or 'directUrl', but not both.

Minimum string length: 3
directUrl
string<uri>

A specific URL to fetch the styleguide from directly, bypassing domain resolution (e.g., 'https://example.com/design-system'). When provided, the styleguide is extracted from this exact URL. You must provide either 'domain' or 'directUrl', but not both.

maxAgeMs
integer | null
default:7776000000

Maximum age in milliseconds for cached brand data before the API performs a hard refresh. Defaults to 3 months (7776000000 ms). Set to 0 to always perform a hard refresh. Negative values are clamped to 0; values above 1 year (31536000000 ms) are clamped to 1 year.

timeoutOpts
object

Optional request deadline and behavior on timeout. For GET requests, use timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded timeoutOpts object.

colorScheme
enum<string>

Optional browser color scheme to emulate for websites that respond to prefers-color-scheme. This value is part of the styleguide cache key.

Available options:
light,
dark
tags
string[]

Comma-separated tags for tracking request usage. Up to 20 tags, each 1-50 characters. Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Maximum array length: 20
Required string length: 1 - 50
Example:

Response

Successful response

cache_metadata
object
required

Cache outcome for this response. Composite responses are hits only when every cache-controlled fetch contributing to the output was a hit; age_ms is the oldest contributing hit.

request_id
string<uuid>
required

Unique id of this API call, also sent in the X-Request-Id response header. Quote it when contacting support about a failed request.

Example:

"3f1c2a6e-8b4d-4c1e-9f0a-2d7b5e6c8a91"

finalDOMState
enum<string>

How complete the returned content is. loaded means the page finished the waits the request asked for. still-loading only occurs with timeoutOpts.behavior=return-partial: the timeoutOpts.milliseconds deadline was reached first, so the content reflects the DOM at that moment and late-rendering parts may be missing. Partial results are billed at the base request cost.

Available options:
loaded,
still-loading
status
string

Status of the response, e.g., 'ok'

domain
string

The normalized domain that was processed

styleguide
object

Comprehensive styleguide data extracted from the website

code
integer

HTTP status code

key_metadata
object

Credit usage, included whenever a valid API key is provided.