Skip to content

Extract Structured Data

Cloudflare Browser Run

Cloudflare Browser Run

Extract Structured Data

Capture structured JSON data from a page using AI. Requires at least one of prompt or response_format.

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.
prompttextOptionalNatural-language instructions describing the data to extract. Required unless response_format is provided.
response_formatobjectOptionalCloudflare requires this wrapper: type must be "json_schema", and json_schema is the JSON Schema you define (any shape). Required unless prompt is provided. See https://developers.cloudflare.com/browser-run/quick-actions/json-endpoint/
typeselectRequiredMust be json_schema (Cloudflare API requirement). (options: JSON Schema)
json_schemadynamic objectRequiredYour JSON Schema for the extracted data (e.g. { "type": "object", "properties": { ... } }). User-defined — not tied to a fixed example.

Outputs

Name Type Description
statusCodenumberHTTP status code.
bodyobjectCloudflare API response.
successyes/noWhether the request succeeded.
resultdynamic objectExtracted JSON from Cloudflare. Shape matches your response_format.json_schema (or free-form keys when using prompt only). Define output fields on the Outputs tab to match your schema.
errorsarray of objectErrors returned by the API.
codenumberError code.
messagetextError message.