stagehand.extract

View as Markdown

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

ArgumentTypeRequiredDescription
instructionstringYesExtraction task description.
schemaobjectNoOptional extraction schema.

Result

  • Type: unknown
  • Description: Structured extraction result.

SDK Example

1await runtime.stagehand.extract('Export the latest invoices');

HTTP Example

1{
2 "runtime": "crm",
3 "steps": [
4 {
5 "call": "stagehand.extract",
6 "args": [
7 "Export the latest invoices"
8 ]
9 }
10 ]
11}