Skip to main content
POST
Measure an external page

Authorizations

Authorization
string
header
required

Cactal API key. Create one in the dashboard or via POST /apiKeys. The plaintext key is shown once at creation.

Body

application/json
url
string<uri>
required

Absolute public http(s) URL of the page to render.

Maximum string length: 2048
websiteId
string
required

A website you can edit; its organization pays for the call in AI credits.

Minimum string length: 1
presets
enum<string>[]

Built-in measurement presets to run in the rendered page: design-tokens (computed and declared colors, typography, fonts, layout, shape, depth), images (every image, background, and video with size, position, poster, and role), metadata (head metadata in the field names metadata edits take, plus favicon, theme color, and scroll height).

Required array length: 1 - 3 elements
Available options:
design-tokens,
images,
metadata
script
string

Custom JavaScript run in the page as the body of an async function; return a JSON-serializable value. Use it only when no preset answers the question.

Required string length: 1 - 20000

Response

One result per preset or script.

url
string<uri>
required
measuredAt
object
required
results
object
required
message
string