*** title: stagehand.extract description: Extract structured information from the page using Stagehand. -------------------------------------------------------------------------- `stagehand.extract` is a browser runtime capability in the `stagehand` namespace. ## Availability * Runtime: `browser` * Kind: `agent` * Category: `agents` * Supported drivers: Stagehand ## SDK Surface * SDK path: `runtime.stagehand.extract` * Async: Yes ## HTTP Surface * Transport: `workspace.execute(...)` * Call: `stagehand.extract` * Long-running: No ## Reference Semantics * Requires refs: `page` ## Arguments | Argument | Type | Required | Description | | ------------- | -------- | -------- | ---------------------------- | | `instruction` | `string` | Yes | Extraction task description. | | `schema` | `object` | No | Optional extraction schema. | ## Result * Type: `unknown` * Description: Structured extraction result. ## SDK Example ```ts await runtime.stagehand.extract('Export the latest invoices'); ``` ## HTTP Example ```json { "runtime": "crm", "steps": [ { "call": "stagehand.extract", "args": [ "Export the latest invoices" ] } ] } ``` ## Related Capabilities * [`stagehand.act`](../agents/stagehand-act) * [`stagehand.observe`](../agents/stagehand-observe)