Skip to content

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
urltextRequiredThe URL to navigate to. Provide either url or html.
htmltextOptionalRaw HTML to render instead of navigating to a URL. Provide either url or html.
gotoOptionsobjectOptionalNavigation options controlling how the page is loaded.
waitUntilselectOptionalWhen to consider navigation finished. (options: Load, DOM Content Loaded, Network Idle 0, Network Idle 2)
timeoutnumberOptionalMaximum navigation time in milliseconds.
referertextOptionalReferer header value.
viewportobjectOptionalViewport dimensions and device settings.
widthnumberOptionalViewport width in pixels.
heightnumberOptionalViewport height in pixels.
deviceScaleFactornumberOptionalDevice scale factor (pixel density).
setExtraHTTPHeadersdynamic objectOptionalExtra HTTP headers to send with the request.
cookiesarray of objectOptionalCookies to set before loading the page.
nametextRequiredCookie name.
valuetextRequiredCookie value.
domaintextOptionalCookie domain.
urltextOptionalCookie URL.
pathtextOptionalCookie path.
authenticateobjectOptionalHTTP basic auth credentials.
usernametextOptionalHTTP auth username.
passwordtextOptionalHTTP auth password.
userAgenttextOptionalCustom user agent string.
waitForSelectortextOptionalWait for this CSS selector to appear before capturing.
rejectResourceTypesarray of textOptionalResource types to block, e.g. image, stylesheet, font.
rejectRequestPatternarray of textOptionalRegex patterns; matching requests are blocked.
screenshotOptionsobjectOptionalScreenshot output options.
fullPageyes/noOptionalCapture the full scrollable page.
omitBackgroundyes/noOptionalRender a transparent background.
typeselectOptionalImage format. (options: PNG, JPEG, WebP)
qualitynumberOptionalImage quality (0-100), for jpeg/webp.
captureBeyondViewportyes/noOptionalCapture content beyond the viewport.
clipobjectOptionalClip region.
xnumberOptionalX offset.
ynumberOptionalY offset.
widthnumberOptionalClip width.
heightnumberOptionalClip height.

Outputs

Name Type Description
statusCodenumberHTTP status code.
bodyobjectCloudflare API response.
successyes/noWhether the request succeeded.
resultobjectSnapshot result.
screenshottextBase64-encoded screenshot image.
contenttextHTML content of the page.
markdowntextPage content converted to Markdown (when requested via formats).
accessibilityTreeobjectAccessibility tree of the page (when requested via formats).
roletextAccessibility role (e.g. RootWebArea, heading, link).
nametextAccessible name or label.
levelnumberHeading level (1-6) when role is heading.
childrenarrayChild nodes in the accessibility tree. Further: item fields: role, name, level, children.
metaobjectResponse metadata.
statusnumberHTTP status of the page.
titletextPage title.
errorsarray of objectErrors returned by the API.
codenumberError code.
messagetextError message.