---
title: "Capture an external page"
method: POST
path: "/webResearch/screenshot"
tags: ["Web research"]
---

# Capture an external page

`POST /webResearch/screenshot`

## Request

- Base URL: `https://api.cactal.ai/v1`
- URL: `https://api.cactal.ai/v1/webResearch/screenshot`
- Auth: HTTP bearer

Renders an external public page in a real browser and returns the image, to study a reference site or the user's existing site: its layout, hierarchy, density, and feel. Consent banners and overlays are dismissed first. Focus with `selector` (plus `padding`) or `clip` and page down with `scrollTo`; external pages render in their own color scheme and never full page. Capture your own website with `websitePreview.capture`. Charged in AI credits to the website's organization.

## Request body

- object
  - `websiteId` string, required: A website you can edit; its organization pays for the call in AI credits.
  - `url` string, uri, required: Absolute public http(s) URL of the page to capture.
  - `viewport` 'desktop' | 'tablet' | 'mobile': Device class to render at.
  - `selector` string: Crop to the first element matching this CSS selector, scrolled into view. Preferred: it follows the layout at every viewport.
  - `padding` integer: CSS pixels of surrounding page to include on every side of the `selector` match.
  - `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.
    - `x` number, required
    - `y` number, required
    - `width` number, required
    - `height` number, required
  - `scrollTo` union: Scroll to a CSS selector or an absolute Y offset before capturing.
    - string
    - integer
  - `waitForSelector` string: Wait for this CSS selector to match before capturing.
  - `delayMs` integer: Extra settle time before capturing, in milliseconds.
  - `freezeAnimations` boolean: Fast-forward CSS animations and transitions to their end state so captures are deterministic.

## Response `200`

Rendered page image.

## Other responses

- `400`: Validation failed. The response `message` names the first invalid field.
- `401`: Missing, invalid, expired, or revoked API key.
- `403`: The authenticated principal lacks the required capability.
- `404`: The resource does not exist or is outside the principal’s access scope.
- `429`: Rate limit exceeded. Retry after the number of seconds in the `Retry-After` header.

---

[API](https://skmtc.dev/cactal/apis/cactal-api.md) · [All operations](https://skmtc.dev/cactal/apis/cactal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cactal/apis/cactal-api/revisions/9cd0fb5eacdd?raw)
