Skip to content

OnPage Page Screenshot

POST/v1/run

Capture a high-quality screenshot of a webpage with desktop, mobile, or tablet viewport settings.

Request body

Submit the public SandBase model identifier and screenshot options.

stringmodelrequired

Model identifier. Set to dataforseo/v3/on_page/page_screenshot.

Default: dataforseo/v3/on_page/page_screenshot

stringurlrequired

Absolute URL of the page to capture.

Optional<string>browser_preset

Viewport preset.

Allowed values: desktop, mobile, tablet

Default: desktop

Optional<boolean>full_page_screenshot

Capture the full page when true; capture only the viewport when false.

Default: true

Optional<integer>browser_screen_width

Custom viewport width in pixels. Overrides browser_preset.

Range: 240 to 9999

Optional<integer>browser_screen_height

Custom viewport height in pixels. Overrides browser_preset.

Range: 240 to 9999

Optional<number>browser_screen_scale_factor

Custom device scale factor. Overrides browser_preset.

Range: 0.5 to 3

Optional<boolean>disable_cookie_popup

Dismiss cookie-consent dialogs when true.

Default: false

Optional<string>accept_language

Accept-Language header sent while loading the page.

Optional<string>custom_user_agent

Custom browser user-agent string.

Optional<string>ip_pool_for_scan

Proxy pool location.

Allowed values: us, de

Optional<boolean>switch_pool

Use additional proxy pools when true.

Response Schema

The unified run envelope contains the operation result in outputs[0].data.

stringidrequired

Opaque SandBase run identifier.

stringstatusrequired

Current run status.

Allowed values: pending, running, completed, failed, timeout

stringmodelrequired

Public SandBase model name used for this run.

Optional<array<object>>outputs

Present when the run completes successfully.

Optional<object>error

Present for failed or timeout runs.

Optional<object>usage

Usage details when available.

Use a public URL that the rendering service can reach. The response data is operation-specific; inspect outputs[0].data for the returned screenshot URL and persist it before its media retention period expires.