Capture Snapshot
Cloudflare Browser Run
Cloudflare Browser Run
Capture Snapshot
Capture page HTML content and a base64 screenshot together.
ActionAI Tool
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
url | text | Required | The URL to navigate to. Provide either url or html. |
html | text | Optional | Raw HTML to render instead of navigating to a URL. Provide either url or html. |
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. |
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). |
setExtraHTTPHeaders | dynamic object | Optional | Extra HTTP headers to send with the request. |
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. |
userAgent | text | Optional | Custom user agent string. |
waitForSelector | text | Optional | Wait for this CSS selector to appear before capturing. |
rejectResourceTypes | array of text | Optional | Resource types to block, e.g. image, stylesheet, font. |
rejectRequestPattern | array of text | Optional | Regex patterns; matching requests are blocked. |
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. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code. |
body | object | Cloudflare API response. |
success | yes/no | Whether the request succeeded. |
result | object | Snapshot result. |
screenshot | text | Base64-encoded screenshot image. |
content | text | HTML content of the page. |
markdown | text | Page content converted to Markdown (when requested via formats). |
accessibilityTree | object | Accessibility tree of the page (when requested via formats). |
role | text | Accessibility role (e.g. RootWebArea, heading, link). |
name | text | Accessible name or label. |
level | number | Heading level (1-6) when role is heading. |
children | array | Child nodes in the accessibility tree. Further: item fields: role, name, level, children. |
meta | object | Response metadata. |
status | number | HTTP status of the page. |
title | text | Page title. |
errors | array of object | Errors returned by the API. |
code | number | Error code. |
message | text | Error message. |