Skip to main content
The Extract Datamodel node extracts structured data from the current page based on a JSON schema. This is useful for scraping data, validating page content, or capturing information for later use in the workflow.

Parameters

How the selector interacts with the datamodel

The selector parameter behaves very differently between STATIC and LLM_DOM — be careful not to confuse the two.
  • STATIC: The selector is a readiness gate only. Before extracting, the runtime waits up to wait_time ms for the selector to resolve (throwing selector_error_message if it never does). It is not prepended to field paths and does not restrict what is extracted — every path inside extract_data_model is evaluated against the full document (including iframes and open shadow DOM). To scope STATIC extraction to a specific region, put the XPath on the array or field’s own path instead (e.g., "path": "//table//tbody/tr" for row containers with relative ".//td[1]" children).
  • LLM_DOM: The selector is required. The runtime waits for the element, then takes its outerHTML and sends only that subtree to the model as the extraction input. Choose the smallest element that still contains every field you want the model to extract.
  • LLM_VISION and PROMPT: The selector is not used.

Schema Structure

The extract_data_model follows JSON Schema with CloudCruise extensions:

Schema Properties

Examples

Basic Extraction with LLM_DOM

Extract user information using AI:

STATIC Extraction with XPath

Extract data using explicit XPath selectors:
You can also extract HTML attributes (e.g., id, href, data-*) by pointing the XPath to the attribute:

Arrays

Extract Array of Items

Extract a list of items from the page:

Static Array Extraction

To extract an array using STATIC execution, provide an XPath that matches multiple elements. Each matched element becomes an item in the array:
For extracting an array of objects (e.g., table rows with multiple columns), define the path on the array to match the repeating container elements, then use relative XPaths for each property within the items:
The array’s path matches each <tr> row, and each property uses a relative XPath to extract the corresponding cell within that row.

Overwrite Arrays

Arrays are ‘append’ by default. If you extract into the same array twice e.g. in a loop, new items will be appended. You can override this behavior by adding the array key to the overwriteArrayKeys array. Here’s an example JSON schema you could use in a ExtractDatamodel node:

Access Browser Variables

We allow extraction of some browser variables:
  • The complete URL the browser agent is on: {{window.location.href}}
  • The path name of the current URL: {{window.location.pathname}}
  • The query string of the current URL: {{window.location.search}}
Here’s an example JSON schema you can use in a ExtractDatamodel node:
Note that the execution type for this needs to be STATIC.

Extract Raw HTML

You can extract the HTML content of the current page using document variables:
  • Sanitized HTML ({{document.sanitized}}): Extracts a simplified version of the HTML that removes most attributes and only maintains the structure, tags, and content. This is useful for cleaner data extraction and reduces noise when processing HTML.
  • Complete HTML ({{document}}): Extracts the entire raw HTML with all attributes intact, including classes, IDs, data attributes, styles, and other metadata.
Here’s an example JSON schema you can use in a ExtractDatamodel node:
Note that the execution type for this needs to be STATIC.

Extract OS Clipboard

Use the {{clipboard}} variable to read the worker’s operating-system clipboard as the extraction source. When an application can copy the exact text you need to the clipboard, you can read it back verbatim: the full, character-exact content (including multi-line text), without the transcription errors or truncation of screenshot/vision extraction. First trigger the copy (a Copy button via a CLICK node, or a {{ctrl+c}} keystroke), then extract {{clipboard}}. The extract waits for the clipboard to be populated, so no manual DELAY is needed. It also clears the clipboard after reading, so a copy-per-row loop reads each new value rather than a stale prior one, whichever way you copy. This is especially useful for native or remote-desktop (RDP/DCV) applications, where the content isn’t part of the page DOM but the app can still copy it to the clipboard. Here’s an example JSON schema you can use in a ExtractDatamodel node:
Note that the execution type for this needs to be STATIC. If the clipboard can’t be read, the node fails with error code CLIPBOARD-E0001. If it is still empty after the wait (the copy never landed), it fails with CLIPBOARD-E0002 rather than returning empty data.

Notes

  • Use STATIC execution with XPaths for speed and reliability when page structure is stable
  • Use LLM_DOM for complex pages or when selectors frequently change
  • Add clear descriptions for each field to help the LLM understand what data to extract
  • Arrays extracted multiple times (e.g., in a loop) append by default; use overwriteArrayKeys to replace
  • For STATIC, scope row containers via the array’s own path (not the node selector), and prefer relative child paths like .//td[1] for cleanest semantics