Extraction

Extract Text Block

Extract Text reads content from a CSS selector and saves the result into an output variable for later Blocks.

At a glance

Best for
Single values or simple lists
Required setting
CSS selector
Output
Output variable
Error handle
Yes

What it does

Extract Text pulls content from matching elements on the current page. It can read visible text, HTML, or a specific attribute.

Use it for simple page values such as a title, price, link, count, or repeated text list. Use Extract Data when you need structured rows with multiple fields.

Use it when

  • Save the text of one element into a variable.
  • Extract every matching text value from a repeated list.
  • Read an attribute such as href or src from matching elements.

Do not use it when

  • You need multiple fields per row; use Extract Data.
  • You need to parse a whole page into a rich object.
  • The selector target is not available in the current page state.

Settings

Extract Text requires a selector and an output variable. Choose what to extract and whether to return the first match or all matches.

CSS selector

Required: Yes
Variables
Yes
Description
Selector for the element or elements to read.

What to extract

Required: No
Variables
No
Description
Choose text, HTML, or attribute. Text is the default.

Attribute name

Required: Only for attribute mode
Variables
No
Description
Name of the attribute to read, such as href or src.

Match mode

Required: No
Variables
No
Description
Return the first matching value or all matching values.

Output variable

Required: Recommended
Variables
Variable name
Description
Name later Blocks can reference with {{variableName}}.

Outputs

Extract Text writes the extracted value to the configured output variable. The output is a string for first-match extraction or an array when extracting multiple matches.

outputVariableNamestring | string[]

The saved variable value. Use the actual configured name in later Blocks.

extractedstring | string[]

The raw extracted value shown in the run output.

Example Flow

Extract Text works well after navigation and a readiness wait.

  1. Open the page with Go To URL.
  2. Wait for the content selector if the page loads dynamically.
  3. Extract the text, HTML, or attribute into a variable.

Errors and fixes

Start with symptoms visible in the editor or Inspector, then check the earliest Block that produced the wrong page state, variable, or output.

The output is empty.

Check
Confirm the selector matches content in the current page state.
Fix
Update the selector or add Wait For Element before extraction.

Attribute extraction returns the wrong URL.

Check
Check whether the page uses relative links.
Fix
Use the resolved value returned by the runtime, or extract a different attribute if needed.

Local and cloud runs

Local and cloud runtimes both interpolate selectors and save extracted values to variables.

When extracting href or src attributes, the cloud runtime resolves relative links against the current page URL.