Press / to search

All documentation
docs Teach the agent Step reference

Runs onWrit CloudDesktopSelf-hosted

Extraction step

Extract

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 is a step object with "type": "extract". Steps run in order, and each step can read the outputs of the steps before it. See the full workflows reference for the 30+ step types.

Writ runs on your own accounts, with your own credentials and data, on sites you are authorized to use.

Fields

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

Example

A single extract step as it appears in a workflow's steps array:

{
  "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 extract step executes wherever the run executes. On your local or BYO agent there is no compute charge and the agent can reach intranet-only systems; on Writ cloud the run is metered by running time (~$0.12 per browser-hour, from your plan’s included usage wallet.

What next

  • Workflows - the full step vocabulary and the workflow object.
  • Recorder - capture steps by clicking through a site.
  • Managed endpoints - turn the workflow into a REST endpoint, or an MCP tool.