v11

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-26811271.7 KB

Extract data from the page

Extracts structured data from the current page using AI-powered analysis.

post/v1/sessions/{id}/extract

Path parameters

idstring required

Unique session identifier

Example:c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123

Unique session identifier

Headers

x-stream-response'true' | 'false'

Whether to stream the response via SSE

Example:true

Whether to stream the response via SSE

Request body

instructionstring

Natural language instruction for what to extract

schemaobject

JSON Schema defining the structure of data to extract

frameIdstring nullable

Target frame ID for the extraction

streamResponseboolean

Whether to stream the response via SSE

Example request

{
  "instruction": "Extract all product names and prices from the page",
  "options": {
    "model": {
      "modelName": "openai/gpt-5.4-mini",
      "apiKey": "sk-some-openai-api-key",
      "baseURL": "https://api.openai.com/v1",
      "providerOptions": {
        "vertex": {
          "project": "my-gcp-project",
          "location": "us-central1"
        }
      }
    },
    "timeout": 30000,
    "selector": "#main-content",
    "ignoreSelectors": [
      "nav",
      ".cookie-banner",
      "#sidebar-ads"
    ]
  },
  "streamResponse": true
}

Response

Default Response

successboolean required

Indicates whether the request was successful