Capture Screenshot
Cloudflare Browser Run
Cloudflare Browser Run
Capture Screenshot
Capture a screenshot of a page and return it as a file.
ActionAI Tool
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
url | text | Required | The URL to screenshot. Provide either url or html. |
html | text | Optional | Raw HTML to render instead of a URL. |
screenshotOptions | object | Optional | Screenshot output options. |
fullPage | yes/no | Optional | Capture the full scrollable page. |
omitBackground | yes/no | Optional | Render a transparent background. |
type | select | Optional | Image format. (options: PNG, JPEG, WebP) |
quality | number | Optional | Image quality (0-100), for jpeg/webp. |
captureBeyondViewport | yes/no | Optional | Capture content beyond the viewport. |
clip | object | Optional | Clip region. |
x | number | Optional | X offset. |
y | number | Optional | Y offset. |
width | number | Optional | Clip width. |
height | number | Optional | Clip height. |
selector | text | Optional | CSS selector of a single element to capture. |
viewport | object | Optional | Viewport dimensions and device settings. |
width | number | Optional | Viewport width in pixels. |
height | number | Optional | Viewport height in pixels. |
deviceScaleFactor | number | Optional | Device scale factor (pixel density). |
gotoOptions | object | Optional | Navigation options controlling how the page is loaded. |
waitUntil | select | Optional | When to consider navigation finished. (options: Load, DOM Content Loaded, Network Idle 0, Network Idle 2) |
timeout | number | Optional | Maximum navigation time in milliseconds. |
referer | text | Optional | Referer header value. |
cookies | array of object | Optional | Cookies to set before loading the page. |
name | text | Required | Cookie name. |
value | text | Required | Cookie value. |
domain | text | Optional | Cookie domain. |
url | text | Optional | Cookie URL. |
path | text | Optional | Cookie path. |
authenticate | object | Optional | HTTP basic auth credentials. |
username | text | Optional | HTTP auth username. |
password | text | Optional | HTTP auth password. |
setExtraHTTPHeaders | dynamic object | Optional | Extra HTTP headers to send with the request. |
userAgent | text | Optional | Custom user agent string. |
waitForSelector | text | Optional | Wait for this CSS selector before capturing. |
addScriptTag | array of object | Optional | Inject JavaScript before capture. |
url | text | Optional | External script URL. |
content | text | Optional | Inline JS content. |
id | text | Optional | Script id. |
addStyleTag | array of object | Optional | Inject CSS before capture. |
url | text | Optional | External stylesheet URL. |
content | text | Optional | Inline CSS content. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code. |
body | object | Result containing the generated file. |
file | attachments | The generated screenshot file, uploaded to the file store. |
contentType | text | MIME type of the generated file. |
size | number | File size in bytes. |