New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksWeb Scraping & Browsers
Block

Stagehand Extract Block

Extract data from websites

The Stagehand Extract block uses Stagehand to extract structured data from webpages using Browserbase and OpenAI. Reach for it when you need to turn an arbitrary web page into clean, schema-shaped JSON.

Overview

PropertyValue
Typestagehand
Categorytools
Color#FFC83C

When to Use

  • Scrape structured fields (prices, titles, listings, contact details) from a live web page.
  • Convert unstructured page content into a predictable JSON shape defined by a schema.
  • Pull data from sites that lack a public API by describing what you want in plain language.
  • Feed extracted data into downstream blocks for transformation, storage, or notification.
  • Automate recurring data collection from product, news, or directory pages.

Configuration

URL

The address of the website to extract data from. Required.

Instructions

Detailed natural-language instructions describing exactly what data to extract from the page. Required.

OpenAI API Key

Your OpenAI API key, used to power the extraction. Stored as a password field. Required.

Schema

A JSON Schema describing the structure of the data to return. Required.

Inputs & Outputs

  • Inputs:
    • url (string) — Website URL to extract data from
    • instruction (string) — Extraction instructions in plain language
    • schema (json) — JSON schema definition describing the expected output structure
    • apiKey (string) — OpenAI API key (required by Stagehand)
  • Outputs:
    • data (json) — Extracted structured data matching the provided schema

Tools

  • Stagehand Extract (stagehand_extract) — Extracts structured data from a webpage by sending the URL, natural-language instruction, and a JSON schema to the Stagehand service, which uses Browserbase (headless browser) and OpenAI to parse the page and return schema-shaped JSON.

YAML Example

stagehand_extract_1:
  type: stagehand
  name: "Stagehand Extract"
  inputs:
    url: "https://example.com/products"
    instruction: "Extract the name and price of each product listed on the page."
    apiKey: "{{OPENAI_API_KEY}}"
    schema: |
      {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": { "type": "string" },
                "price": { "type": "string" }
              }
            }
          }
        }
      }
  connections:
    outgoing:
      - target: next-block-id