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 |
|---|---|---|---|
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. |
prompt | text | Optional | Natural-language instructions describing the data to extract. Required unless response_format is provided. |
response_format | object | Optional | Cloudflare 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/ |
type | select | Required | Must be json_schema (Cloudflare API requirement). (options: JSON Schema) |
json_schema | dynamic object | Required | Your JSON Schema for the extracted data (e.g. { "type": "object", "properties": { ... } }). User-defined — not tied to a fixed example. |
Outputs
| Name | Type | Description |
|---|---|---|
statusCode | number | HTTP status code. |
body | object | Cloudflare API response. |
success | yes/no | Whether the request succeeded. |
result | dynamic object | Extracted 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. |
errors | array of object | Errors returned by the API. |
code | number | Error code. |
message | text | Error message. |