Skip to main content
POST
Capture 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
websiteId
string
required

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

Minimum string length: 1
url
string<uri>
required

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

Maximum string length: 2048
viewport
enum<string>
default:desktop

Device class to render at.

Available options:
desktop,
tablet,
mobile
selector
string

Crop to the first element matching this CSS selector, scrolled into view. Preferred: it follows the layout at every viewport.

Minimum string length: 1
padding
integer

CSS pixels of surrounding page to include on every side of the selector match.

Required range: 0 <= x <= 500
clip
object

Crop to this rectangle, in CSS pixels from the top-left of the rendered page at the chosen viewport; it is scrolled into view and must fit within the viewport. Only for regions no selector frames.

scrollTo

Scroll to a CSS selector or an absolute Y offset before capturing.

Minimum string length: 1
waitForSelector
string

Wait for this CSS selector to match before capturing.

Minimum string length: 1
delayMs
integer

Extra settle time before capturing, in milliseconds.

Required range: 0 <= x <= 5000
freezeAnimations
boolean
default:true

Fast-forward CSS animations and transitions to their end state so captures are deterministic.

Response

Rendered page image.

The response is of type file.