Get started

Reference Workflows 06 / 06

Extract step

Pull structured data out of the page into named fields. A step a recorded Writ workflow can run, with its fields and an example.

Runs on Writ CloudWrit Desktop

Open in Claude Open in ChatGPT

The extract step is the heart of data collection: it maps named fields to selectors and returns clean, structured data. Each field can read text or a specific attribute, and can collect every match instead of the first.

In a workflow, this step is a JSON object with "type": "extract". Steps run in order, and each step can read the outputs of the steps before it.

Fields

Set these inside the step’s config object.

fields map required
Field name → selector, or an object with selector, attribute, and multiple.

Example

One extract step, as it appears in the steps list of a workflow.

Step
{
  "type": "extract",
  "config": {
    "fields": {
      "title": ".product .title",
      "price": { "selector": ".product .price" },
      "links": { "selector": ".product a", "attribute": "href", "multiple": true }
    }
  }
}

How it behaves

  • Extracted values join the run output and are also available to later request steps as {{extracted:key}}.
  • Collect only data you are authorized to access.

Where it runs

The step runs wherever its workflow runs. On Writ Desktop, runs are free and can reach systems that only your own network can reach.

On Writ Cloud, each call costs credits: 20 when the run needs a browser, 2 when it does not. A call that fails because of the site or Writ costs nothing.

Next