Extracts structured data from the current page using AI-powered analysis.
POST
/
v1
/
sessions
/
{id}
/
extract
JavaScript
import Stagehand from 'stagehand-sdk';
const client = new Stagehand({
browserbaseAPIKey: process.env['BROWSERBASE_API_KEY'], // This is the default and can be omitted
browserbaseProjectID: process.env['BROWSERBASE_PROJECT_ID'], // This is the default and can be omitted
modelAPIKey: process.env['MODEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.sessions.extract('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123');
console.log(response.data);
import os
from stagehand import Stagehand
client = Stagehand(
browserbase_api_key=os.environ.get("BROWSERBASE_API_KEY"), # This is the default and can be omitted
browserbase_project_id=os.environ.get("BROWSERBASE_PROJECT_ID"), # This is the default and can be omitted
model_api_key=os.environ.get("MODEL_API_KEY"), # This is the default and can be omitted
)
for session in client.sessions.extract(
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
):
print(session)
package main
import (
"context"
"fmt"
"github.com/browserbase/stagehand-go"
"github.com/browserbase/stagehand-go/option"
)
func main() {
client := stagehand.NewClient(
option.WithBrowserbaseAPIKey("My Browserbase API Key"),
option.WithBrowserbaseProjectID("My Browserbase Project ID"),
option.WithModelAPIKey("My Model API Key"),
)
response, err := client.Sessions.Extract(
context.TODO(),
"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
stagehand.SessionExtractParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.browserbase.api.example;
import com.browserbase.api.client.StagehandClient;
import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
import com.browserbase.api.models.sessions.SessionExtractParams;
import com.browserbase.api.models.sessions.SessionExtractResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StagehandClient client = StagehandOkHttpClient.fromEnv();
SessionExtractResponse response = client.sessions().extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123");
}
}
package com.browserbase.api.example
import com.browserbase.api.client.StagehandClient
import com.browserbase.api.client.okhttp.StagehandOkHttpClient
import com.browserbase.api.models.sessions.SessionExtractParams
import com.browserbase.api.models.sessions.SessionExtractResponse
fun main() {
val client: StagehandClient = StagehandOkHttpClient.fromEnv()
val response: SessionExtractResponse = client.sessions().extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123")
}
require "stagehand"
stagehand = Stagehand::Client.new(
browserbase_api_key: "My Browserbase API Key",
browserbase_project_id: "My Browserbase Project ID",
model_api_key: "My Model API Key"
)
response = stagehand.sessions.extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123")
puts(response)
using System;
using Stagehand;
using Stagehand.Models.Sessions;
StagehandClient client = new();
SessionExtractParams parameters = new()
{
ID = "c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123"
};
var response = await client.Sessions.Extract(parameters);
Console.WriteLine(response);
import Stagehand from 'stagehand-sdk';
const client = new Stagehand({
browserbaseAPIKey: process.env['BROWSERBASE_API_KEY'], // This is the default and can be omitted
browserbaseProjectID: process.env['BROWSERBASE_PROJECT_ID'], // This is the default and can be omitted
modelAPIKey: process.env['MODEL_API_KEY'], // This is the default and can be omitted
});
const response = await client.sessions.extract('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123');
console.log(response.data);
import os
from stagehand import Stagehand
client = Stagehand(
browserbase_api_key=os.environ.get("BROWSERBASE_API_KEY"), # This is the default and can be omitted
browserbase_project_id=os.environ.get("BROWSERBASE_PROJECT_ID"), # This is the default and can be omitted
model_api_key=os.environ.get("MODEL_API_KEY"), # This is the default and can be omitted
)
for session in client.sessions.extract(
id="c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
):
print(session)
package main
import (
"context"
"fmt"
"github.com/browserbase/stagehand-go"
"github.com/browserbase/stagehand-go/option"
)
func main() {
client := stagehand.NewClient(
option.WithBrowserbaseAPIKey("My Browserbase API Key"),
option.WithBrowserbaseProjectID("My Browserbase Project ID"),
option.WithModelAPIKey("My Model API Key"),
)
response, err := client.Sessions.Extract(
context.TODO(),
"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123",
stagehand.SessionExtractParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.Data)
}
package com.browserbase.api.example;
import com.browserbase.api.client.StagehandClient;
import com.browserbase.api.client.okhttp.StagehandOkHttpClient;
import com.browserbase.api.models.sessions.SessionExtractParams;
import com.browserbase.api.models.sessions.SessionExtractResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
StagehandClient client = StagehandOkHttpClient.fromEnv();
SessionExtractResponse response = client.sessions().extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123");
}
}
package com.browserbase.api.example
import com.browserbase.api.client.StagehandClient
import com.browserbase.api.client.okhttp.StagehandOkHttpClient
import com.browserbase.api.models.sessions.SessionExtractParams
import com.browserbase.api.models.sessions.SessionExtractResponse
fun main() {
val client: StagehandClient = StagehandOkHttpClient.fromEnv()
val response: SessionExtractResponse = client.sessions().extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123")
}
require "stagehand"
stagehand = Stagehand::Client.new(
browserbase_api_key: "My Browserbase API Key",
browserbase_project_id: "My Browserbase Project ID",
model_api_key: "My Model API Key"
)
response = stagehand.sessions.extract("c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123")
puts(response)
using System;
using Stagehand;
using Stagehand.Models.Sessions;
StagehandClient client = new();
SessionExtractParams parameters = new()
{
ID = "c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123"
};
var response = await client.Sessions.Extract(parameters);
Console.WriteLine(response);
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Stagehand","colors":{"primary":"#00C851","light":"#00C851","dark":"#00C851"},"logo":{"light":"https://mintcdn.com/stagehand/iZoJpVulsYk9lDMY/logo/light_logo.png?fit=max\u0026auto=format\u0026n=iZoJpVulsYk9lDMY\u0026q=85\u0026s=1562b274b6ffc39253bc8091cf8291d9","dark":"https://mintcdn.com/stagehand/u4M3vTBXE1a-6gkD/logo/dark_logo.png?fit=max\u0026auto=format\u0026n=u4M3vTBXE1a-6gkD\u0026q=85\u0026s=b0e7e87230f778f827debae5c8ddb2ab","href":"https://stagehand.dev"},"favicon":"https://mintcdn.com/stagehand/u4M3vTBXE1a-6gkD/images/favicon.svg?fit=max\u0026auto=format\u0026n=u4M3vTBXE1a-6gkD\u0026q=85\u0026s=c1925307fa5695f54570af3e6f31a603","api":{"openapi":"v3/openapi.json"},"navbar":{"links":[{"href":"https://discord.gg/stagehand","label":"Discord"},{"href":"mailto:support@browserbase.com","label":"Support"}]},"footer":{"socials":{"discord":"https://discord.gg/stagehand","x":"https://x.com/stagehanddev","github":"https://github.com/browserbase/stagehand","linkedin":"https://linkedin.com/company/browserbasehq"}},"seo":{"metatags":{"og:type":"website","og:site_name":"Stagehand Docs"},"indexing":"all"},"integrations":{"posthog":{"apiKey":"phc_hmwkFrlc9UVrdE1jyG8AEKoCQCSr8dScjsRpKoLBEiV","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["copy","chatgpt","claude","view"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/stagehand"},{"anchor":"GitHub","icon":"github","href":"https://github.com/browserbase/stagehand"},{"anchor":"Changelog","icon":"scroll","href":"https://github.com/browserbase/stagehand/releases"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"stagehand","hasAudioNarration":false,"actualSubdomain":"stagehand","customDomains":["docs.stagehand.dev"],"gitSource":{"type":"github","owner":"browserbase","repo":"stagehand","deployBranch":"docs-production","contentDirectory":"packages/docs","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6adfa131f461612355a9d86a","collectionId":"a8f25d5e-06b0-472f-864c-77e8c484ce0d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6adfa131f461612355a9d86a"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6adfa131f461612355a9d86a","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"TypeScript","count":53},{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Integrations","count":31},{"language":"default","tag":"Best Practices","count":11},{"language":"default","tag":"Reference","count":11},{"language":"default","tag":"Go","count":9},{"language":"default","tag":"Java","count":9},{"language":"default","tag":"Python","count":9},{"language":"default","tag":"Ruby","count":9},{"language":"default","tag":"Best practices","count":8}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"v3/api-reference/python/extract-data-from-the-page","slug":"/v3/api-reference/python/extract-data-from-the-page","pageMetadata":{"title":"Extract data from the page","description":"Extracts structured data from the current page using AI-powered analysis.","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/python/extract-data-from-the-page","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Extracts structured data from the current page using AI-powered analysis.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Extract data from the page","description":"Extracts structured data from the current page using AI-powered analysis.","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/python/extract-data-from-the-page","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/stagehand/9925f322d52dece3/language-selector.js","/_mintlify/custom/stagehand/2000de99ab50d13e/scripts/sync-sdk-docs.js","/_mintlify/custom/stagehand/331973f287bf1fb3/scripts/runtimePaths.js","/_mintlify/custom/stagehand/de79ed803bd849f2/sdk-api-reference-labels.js"],"openApiReferenceData":{"operation":{"summary":"Extract data from the page","description":"Extracts structured data from the current page using AI-powered analysis.","operationId":"SessionExtract","parameters":["3f5700d9-1530-4b5a-8138-ff3099f23649","a747041f-5a26-40f1-8434-5c4c68619645"],"requestBody":"7d0667d3-2877-4000-8de7-7f1d1081f53a","responses":{"200":"19701168-de93-4a51-b861-5a30f8708272"},"x-codeSamples":[{"lang":"JavaScript","source":"import Stagehand from 'stagehand-sdk';\n\nconst client = new Stagehand({\n browserbaseAPIKey: process.env['BROWSERBASE_API_KEY'], // This is the default and can be omitted\n browserbaseProjectID: process.env['BROWSERBASE_PROJECT_ID'], // This is the default and can be omitted\n modelAPIKey: process.env['MODEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.sessions.extract('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123');\n\nconsole.log(response.data);"},{"lang":"Python","source":"import os\nfrom stagehand import Stagehand\n\nclient = Stagehand(\n browserbase_api_key=os.environ.get(\"BROWSERBASE_API_KEY\"), # This is the default and can be omitted\n browserbase_project_id=os.environ.get(\"BROWSERBASE_PROJECT_ID\"), # This is the default and can be omitted\n model_api_key=os.environ.get(\"MODEL_API_KEY\"), # This is the default and can be omitted\n)\nfor session in client.sessions.extract(\n id=\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\",\n):\n print(session)"},{"lang":"Go","source":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/browserbase/stagehand-go\"\n\t\"github.com/browserbase/stagehand-go/option\"\n)\n\nfunc main() {\n\tclient := stagehand.NewClient(\n\t\toption.WithBrowserbaseAPIKey(\"My Browserbase API Key\"),\n\t\toption.WithBrowserbaseProjectID(\"My Browserbase Project ID\"),\n\t\toption.WithModelAPIKey(\"My Model API Key\"),\n\t)\n\tresponse, err := client.Sessions.Extract(\n\t\tcontext.TODO(),\n\t\t\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\",\n\t\tstagehand.SessionExtractParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"},{"lang":"Java","source":"package com.browserbase.api.example;\n\nimport com.browserbase.api.client.StagehandClient;\nimport com.browserbase.api.client.okhttp.StagehandOkHttpClient;\nimport com.browserbase.api.models.sessions.SessionExtractParams;\nimport com.browserbase.api.models.sessions.SessionExtractResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StagehandClient client = StagehandOkHttpClient.fromEnv();\n\n SessionExtractResponse response = client.sessions().extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\");\n }\n}"},{"lang":"Kotlin","source":"package com.browserbase.api.example\n\nimport com.browserbase.api.client.StagehandClient\nimport com.browserbase.api.client.okhttp.StagehandOkHttpClient\nimport com.browserbase.api.models.sessions.SessionExtractParams\nimport com.browserbase.api.models.sessions.SessionExtractResponse\n\nfun main() {\n val client: StagehandClient = StagehandOkHttpClient.fromEnv()\n\n val response: SessionExtractResponse = client.sessions().extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\")\n}"},{"lang":"Ruby","source":"require \"stagehand\"\n\nstagehand = Stagehand::Client.new(\n browserbase_api_key: \"My Browserbase API Key\",\n browserbase_project_id: \"My Browserbase Project ID\",\n model_api_key: \"My Model API Key\"\n)\n\nresponse = stagehand.sessions.extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\")\n\nputs(response)"},{"lang":"PHP","source":"\u003c?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse Stagehand\\Client;\nuse Stagehand\\Core\\Exceptions\\APIException;\n\n$client = new Client(\n browserbaseAPIKey: getenv('BROWSERBASE_API_KEY') ?: 'My Browserbase API Key',\n browserbaseProjectID: getenv(\n 'BROWSERBASE_PROJECT_ID'\n ) ?: 'My Browserbase Project ID',\n modelAPIKey: getenv('MODEL_API_KEY') ?: 'My Model API Key',\n);\n\ntry {\n $response = $client->sessions->extract(\n 'c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123',\n frameID: 'frameId',\n instruction: 'Extract all product names and prices from the page',\n options: [\n 'ignoreSelectors' => ['nav', '.cookie-banner', '#sidebar-ads'],\n 'model' => [\n 'auth' => [\n 'credentials' => [\n 'clientEmail' => 'client_email',\n 'privateKey' => 'private_key',\n 'authProviderX509CertURL' => 'https://example.com',\n 'authUri' => 'https://example.com',\n 'clientID' => 'client_id',\n 'clientX509CertURL' => 'https://example.com',\n 'privateKeyID' => 'private_key_id',\n 'projectID' => 'project_id',\n 'tokenUri' => 'https://example.com',\n 'type' => 'service_account',\n 'universeDomain' => 'universe_domain',\n ],\n 'type' => 'googleServiceAccount',\n 'projectID' => 'projectId',\n 'scopes' => 'string',\n 'universeDomain' => 'universeDomain',\n ],\n 'modelName' => 'openai/gpt-5.4-mini',\n 'provider' => 'vertex',\n 'providerOptions' => [\n 'vertex' => [\n 'location' => 'us-central1',\n 'project' => 'my-gcp-project',\n 'baseURL' => 'https://example.com',\n 'headers' => ['foo' => 'string'],\n ],\n ],\n 'apiKey' => 'sk-some-openai-api-key',\n 'baseURL' => 'https://api.openai.com/v1',\n 'headers' => ['foo' => 'string'],\n ],\n 'screenshot' => false,\n 'selector' => '#main-content',\n 'timeout' => 30000,\n ],\n schema: ['foo' => 'bar'],\n xStreamResponse: 'true',\n );\n\n var_dump($response);\n} catch (APIException $e) {\n echo $e->getMessage();\n}"},{"lang":"C#","source":"using System;\nusing Stagehand;\nusing Stagehand.Models.Sessions;\n\nStagehandClient client = new();\n\nSessionExtractParams parameters = new()\n{\n ID = \"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\"\n};\n\nvar response = await client.Sessions.Extract(parameters);\n\nConsole.WriteLine(response);"}],"method":"post","type":"path","servers":["40da429c-9334-4c5a-9981-d59bc38e1245"],"security":["cc60a412-157a-4b6a-850a-a896e4b21ff4"],"path":"/v1/sessions/{id}/extract","baseUrlOptions":["https://api.stagehand.browserbase.com"],"title":"Extract data from the page","codeSamples":[{"lang":"JavaScript","source":"import Stagehand from 'stagehand-sdk';\n\nconst client = new Stagehand({\n browserbaseAPIKey: process.env['BROWSERBASE_API_KEY'], // This is the default and can be omitted\n browserbaseProjectID: process.env['BROWSERBASE_PROJECT_ID'], // This is the default and can be omitted\n modelAPIKey: process.env['MODEL_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.sessions.extract('c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123');\n\nconsole.log(response.data);"},{"lang":"Python","source":"import os\nfrom stagehand import Stagehand\n\nclient = Stagehand(\n browserbase_api_key=os.environ.get(\"BROWSERBASE_API_KEY\"), # This is the default and can be omitted\n browserbase_project_id=os.environ.get(\"BROWSERBASE_PROJECT_ID\"), # This is the default and can be omitted\n model_api_key=os.environ.get(\"MODEL_API_KEY\"), # This is the default and can be omitted\n)\nfor session in client.sessions.extract(\n id=\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\",\n):\n print(session)"},{"lang":"Go","source":"package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/browserbase/stagehand-go\"\n\t\"github.com/browserbase/stagehand-go/option\"\n)\n\nfunc main() {\n\tclient := stagehand.NewClient(\n\t\toption.WithBrowserbaseAPIKey(\"My Browserbase API Key\"),\n\t\toption.WithBrowserbaseProjectID(\"My Browserbase Project ID\"),\n\t\toption.WithModelAPIKey(\"My Model API Key\"),\n\t)\n\tresponse, err := client.Sessions.Extract(\n\t\tcontext.TODO(),\n\t\t\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\",\n\t\tstagehand.SessionExtractParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"},{"lang":"Java","source":"package com.browserbase.api.example;\n\nimport com.browserbase.api.client.StagehandClient;\nimport com.browserbase.api.client.okhttp.StagehandOkHttpClient;\nimport com.browserbase.api.models.sessions.SessionExtractParams;\nimport com.browserbase.api.models.sessions.SessionExtractResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n StagehandClient client = StagehandOkHttpClient.fromEnv();\n\n SessionExtractResponse response = client.sessions().extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\");\n }\n}"},{"lang":"Kotlin","source":"package com.browserbase.api.example\n\nimport com.browserbase.api.client.StagehandClient\nimport com.browserbase.api.client.okhttp.StagehandOkHttpClient\nimport com.browserbase.api.models.sessions.SessionExtractParams\nimport com.browserbase.api.models.sessions.SessionExtractResponse\n\nfun main() {\n val client: StagehandClient = StagehandOkHttpClient.fromEnv()\n\n val response: SessionExtractResponse = client.sessions().extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\")\n}"},{"lang":"Ruby","source":"require \"stagehand\"\n\nstagehand = Stagehand::Client.new(\n browserbase_api_key: \"My Browserbase API Key\",\n browserbase_project_id: \"My Browserbase Project ID\",\n model_api_key: \"My Model API Key\"\n)\n\nresponse = stagehand.sessions.extract(\"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\")\n\nputs(response)"},{"lang":"PHP","source":"\u003c?php\n\nrequire_once dirname(__DIR__) . '/vendor/autoload.php';\n\nuse Stagehand\\Client;\nuse Stagehand\\Core\\Exceptions\\APIException;\n\n$client = new Client(\n browserbaseAPIKey: getenv('BROWSERBASE_API_KEY') ?: 'My Browserbase API Key',\n browserbaseProjectID: getenv(\n 'BROWSERBASE_PROJECT_ID'\n ) ?: 'My Browserbase Project ID',\n modelAPIKey: getenv('MODEL_API_KEY') ?: 'My Model API Key',\n);\n\ntry {\n $response = $client->sessions->extract(\n 'c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123',\n frameID: 'frameId',\n instruction: 'Extract all product names and prices from the page',\n options: [\n 'ignoreSelectors' => ['nav', '.cookie-banner', '#sidebar-ads'],\n 'model' => [\n 'auth' => [\n 'credentials' => [\n 'clientEmail' => 'client_email',\n 'privateKey' => 'private_key',\n 'authProviderX509CertURL' => 'https://example.com',\n 'authUri' => 'https://example.com',\n 'clientID' => 'client_id',\n 'clientX509CertURL' => 'https://example.com',\n 'privateKeyID' => 'private_key_id',\n 'projectID' => 'project_id',\n 'tokenUri' => 'https://example.com',\n 'type' => 'service_account',\n 'universeDomain' => 'universe_domain',\n ],\n 'type' => 'googleServiceAccount',\n 'projectID' => 'projectId',\n 'scopes' => 'string',\n 'universeDomain' => 'universeDomain',\n ],\n 'modelName' => 'openai/gpt-5.4-mini',\n 'provider' => 'vertex',\n 'providerOptions' => [\n 'vertex' => [\n 'location' => 'us-central1',\n 'project' => 'my-gcp-project',\n 'baseURL' => 'https://example.com',\n 'headers' => ['foo' => 'string'],\n ],\n ],\n 'apiKey' => 'sk-some-openai-api-key',\n 'baseURL' => 'https://api.openai.com/v1',\n 'headers' => ['foo' => 'string'],\n ],\n 'screenshot' => false,\n 'selector' => '#main-content',\n 'timeout' => 30000,\n ],\n schema: ['foo' => 'bar'],\n xStreamResponse: 'true',\n );\n\n var_dump($response);\n} catch (APIException $e) {\n echo $e->getMessage();\n}"},{"lang":"C#","source":"using System;\nusing Stagehand;\nusing Stagehand.Models.Sessions;\n\nStagehandClient client = new();\n\nSessionExtractParams parameters = new()\n{\n ID = \"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123\"\n};\n\nvar response = await client.Sessions.Extract(parameters);\n\nConsole.WriteLine(response);"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{"3f5700d9-1530-4b5a-8138-ff3099f23649":{"schema":{"description":"Unique session identifier","example":"c4dbf3a9-9a58-4b22-8a1c-9f20f9f9e123","type":"string","isRequired":true,"uniqueKey":"","typeLabel":"string"},"in":"path","name":"id","required":true,"description":"Unique session identifier"},"a747041f-5a26-40f1-8434-5c4c68619645":{"schema":{"description":"Whether to stream the response via SSE","example":"true","type":"string","enum":["true","false"],"uniqueKey":"","typeLabel":"enum\u003cstring>"},"in":"header","name":"x-stream-response","description":"Whether to stream the response via SSE"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"description":"Natural language instruction for what to extract","example":"Extract all product names and prices from the page","type":"string","uniqueKey":"instruction","typeLabel":"string"},"schema":{"description":"JSON Schema defining the structure of data to extract","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"schema.additionalProperties","typeLabel":"any"},"uniqueKey":"schema","typeLabel":"object"},"options":{"type":"object","properties":{"model":{"oneOf":[{"type":"object","description":"Model configuration object or model name string (e.g., 'openai/gpt-5-nano')","required":["modelName","provider","auth","providerOptions"],"properties":{"modelName":{"description":"Model name string with provider prefix (e.g., 'openai/gpt-5-nano')","example":"openai/gpt-5.4-mini","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.0.modelName","typeLabel":"string"},"provider":{"description":"Vertex AI model provider","type":"string","const":"vertex","isRequired":true,"uniqueKey":"options.model.oneOf.0.provider","typeLabel":"string"},"auth":{"type":"object","properties":{"type":{"description":"Use inline Google Cloud service account credentials for provider authentication","type":"string","const":"googleServiceAccount","isRequired":true,"uniqueKey":"options.model.oneOf.0.auth.type","typeLabel":"string"},"credentials":{"type":"object","properties":{"private_key":{"type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.0.auth.credentials.private_key","typeLabel":"string"},"client_email":{"type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.0.auth.credentials.client_email","typeLabel":"string"},"type":{"type":"string","const":"service_account","uniqueKey":"options.model.oneOf.0.auth.credentials.type","typeLabel":"string"},"project_id":{"type":"string","uniqueKey":"options.model.oneOf.0.auth.credentials.project_id","typeLabel":"string"},"private_key_id":{"type":"string","uniqueKey":"options.model.oneOf.0.auth.credentials.private_key_id","typeLabel":"string"},"client_id":{"type":"string","uniqueKey":"options.model.oneOf.0.auth.credentials.client_id","typeLabel":"string"},"auth_uri":{"type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.auth.credentials.auth_uri","typeLabel":"string\u003curi>"},"token_uri":{"type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.auth.credentials.token_uri","typeLabel":"string\u003curi>"},"auth_provider_x509_cert_url":{"type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.auth.credentials.auth_provider_x509_cert_url","typeLabel":"string\u003curi>"},"client_x509_cert_url":{"type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.auth.credentials.client_x509_cert_url","typeLabel":"string\u003curi>"},"universe_domain":{"type":"string","uniqueKey":"options.model.oneOf.0.auth.credentials.universe_domain","typeLabel":"string"}},"required":["private_key","client_email"],"additionalProperties":false,"description":"Google Cloud service account credentials","isRequired":true,"uniqueKey":"options.model.oneOf.0.auth.credentials","typeLabel":"object"},"scopes":{"oneOf":[{"type":"string","description":"Google auth scopes for the desired API request","uniqueKey":"options.model.oneOf.0.auth.scopes.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"options.model.oneOf.0.auth.scopes.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Google auth scopes for the desired API request","uniqueKey":"options.model.oneOf.0.auth.scopes.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"options.model.oneOf.0.auth.scopes","typeLabel":"string | string[]"},"projectId":{"description":"Google Cloud project ID used by google-auth-library","type":"string","uniqueKey":"options.model.oneOf.0.auth.projectId","typeLabel":"string"},"universeDomain":{"description":"Google Cloud universe domain","type":"string","uniqueKey":"options.model.oneOf.0.auth.universeDomain","typeLabel":"string"}},"required":["type","credentials"],"additionalProperties":false,"description":"Vertex provider authentication configuration","isRequired":true,"uniqueKey":"options.model.oneOf.0.auth","typeLabel":"object"},"providerOptions":{"type":"object","properties":{"vertex":{"type":"object","properties":{"project":{"description":"Google Cloud project ID for Vertex AI models","example":"my-gcp-project","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.0.providerOptions.vertex.project","typeLabel":"string"},"location":{"description":"Google Cloud location for Vertex AI models","example":"us-central1","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.0.providerOptions.vertex.location","typeLabel":"string"},"baseURL":{"description":"Base URL for the Vertex AI provider","type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.providerOptions.vertex.baseURL","typeLabel":"string\u003curi>"},"headers":{"description":"Custom headers sent with every request to the Vertex AI provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.0.providerOptions.vertex.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.0.providerOptions.vertex.headers","typeLabel":"object"}},"required":["project","location"],"additionalProperties":false,"description":"Vertex AI provider-specific settings","isRequired":true,"uniqueKey":"options.model.oneOf.0.providerOptions.vertex","typeLabel":"object"}},"required":["vertex"],"additionalProperties":false,"description":"Vertex provider-specific model configuration","isRequired":true,"uniqueKey":"options.model.oneOf.0.providerOptions","typeLabel":"object"},"apiKey":{"description":"API key for the model provider","example":"sk-some-openai-api-key","type":"string","uniqueKey":"options.model.oneOf.0.apiKey","typeLabel":"string"},"baseURL":{"description":"Base URL for the model provider","example":"https://api.openai.com/v1","type":"string","format":"uri","uniqueKey":"options.model.oneOf.0.baseURL","typeLabel":"string\u003curi>"},"headers":{"description":"Custom headers sent with every request to the model provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.0.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.0.headers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"options.model.oneOf.0","typeLabel":"object"},{"type":"object","description":"Model configuration object or model name string (e.g., 'openai/gpt-5-nano')","required":["modelName","provider","providerOptions","auth"],"properties":{"modelName":{"description":"Model name string with provider prefix (e.g., 'openai/gpt-5-nano')","example":"openai/gpt-5.4-mini","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.1.modelName","typeLabel":"string"},"provider":{"description":"Azure OpenAI model provider","type":"string","const":"azure","isRequired":true,"uniqueKey":"options.model.oneOf.1.provider","typeLabel":"string"},"providerOptions":{"type":"object","properties":{"azure":{"type":"object","properties":{"resourceName":{"description":"Azure OpenAI resource name","example":"my-azure-openai-resource","type":"string","uniqueKey":"options.model.oneOf.1.providerOptions.azure.resourceName","typeLabel":"string"},"baseURL":{"description":"Base URL for the Azure OpenAI provider","type":"string","format":"uri","uniqueKey":"options.model.oneOf.1.providerOptions.azure.baseURL","typeLabel":"string\u003curi>"},"apiVersion":{"description":"Azure OpenAI API version","example":"2024-10-01-preview","type":"string","uniqueKey":"options.model.oneOf.1.providerOptions.azure.apiVersion","typeLabel":"string"},"useDeploymentBasedUrls":{"description":"Whether to use deployment-based Azure OpenAI URLs","type":"boolean","uniqueKey":"options.model.oneOf.1.providerOptions.azure.useDeploymentBasedUrls","typeLabel":"boolean"},"headers":{"description":"Custom headers sent with every request to the Azure OpenAI provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.1.providerOptions.azure.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.1.providerOptions.azure.headers","typeLabel":"object"}},"additionalProperties":false,"description":"Azure OpenAI provider-specific settings","isRequired":true,"uniqueKey":"options.model.oneOf.1.providerOptions.azure","typeLabel":"object"}},"required":["azure"],"additionalProperties":false,"description":"Azure provider-specific model configuration","isRequired":true,"uniqueKey":"options.model.oneOf.1.providerOptions","typeLabel":"object"},"auth":{"type":"object","properties":{"type":{"description":"Use a Microsoft Entra ID bearer token for authentication","type":"string","const":"azureEntraId","isRequired":true,"uniqueKey":"options.model.oneOf.1.auth.type","typeLabel":"string"},"token":{"description":"Microsoft Entra ID bearer token for Azure OpenAI","type":"string","minLength":1,"isRequired":true,"uniqueKey":"options.model.oneOf.1.auth.token","typeLabel":"string"}},"required":["type","token"],"additionalProperties":false,"description":"Azure provider authentication configuration","isRequired":true,"uniqueKey":"options.model.oneOf.1.auth","typeLabel":"object"},"baseURL":{"description":"Base URL for the model provider","example":"https://api.openai.com/v1","type":"string","format":"uri","uniqueKey":"options.model.oneOf.1.baseURL","typeLabel":"string\u003curi>"},"headers":{"description":"Custom headers sent with every request to the model provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.1.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.1.headers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"options.model.oneOf.1","typeLabel":"object"},{"type":"object","description":"Model configuration object or model name string (e.g., 'openai/gpt-5-nano')","required":["modelName","provider","providerOptions"],"properties":{"modelName":{"description":"Model name string with provider prefix (e.g., 'openai/gpt-5-nano')","example":"openai/gpt-5.4-mini","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.2.modelName","typeLabel":"string"},"provider":{"description":"Azure OpenAI model provider","type":"string","const":"azure","isRequired":true,"uniqueKey":"options.model.oneOf.2.provider","typeLabel":"string"},"providerOptions":{"type":"object","properties":{"azure":{"type":"object","properties":{"resourceName":{"description":"Azure OpenAI resource name","example":"my-azure-openai-resource","type":"string","uniqueKey":"options.model.oneOf.2.providerOptions.azure.resourceName","typeLabel":"string"},"baseURL":{"description":"Base URL for the Azure OpenAI provider","type":"string","format":"uri","uniqueKey":"options.model.oneOf.2.providerOptions.azure.baseURL","typeLabel":"string\u003curi>"},"apiVersion":{"description":"Azure OpenAI API version","example":"2024-10-01-preview","type":"string","uniqueKey":"options.model.oneOf.2.providerOptions.azure.apiVersion","typeLabel":"string"},"useDeploymentBasedUrls":{"description":"Whether to use deployment-based Azure OpenAI URLs","type":"boolean","uniqueKey":"options.model.oneOf.2.providerOptions.azure.useDeploymentBasedUrls","typeLabel":"boolean"},"headers":{"description":"Custom headers sent with every request to the Azure OpenAI provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.2.providerOptions.azure.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.2.providerOptions.azure.headers","typeLabel":"object"}},"additionalProperties":false,"description":"Azure OpenAI provider-specific settings","isRequired":true,"uniqueKey":"options.model.oneOf.2.providerOptions.azure","typeLabel":"object"}},"required":["azure"],"additionalProperties":false,"description":"Azure provider-specific model configuration","isRequired":true,"uniqueKey":"options.model.oneOf.2.providerOptions","typeLabel":"object"},"apiKey":{"description":"API key for the model provider","example":"sk-some-openai-api-key","type":"string","uniqueKey":"options.model.oneOf.2.apiKey","typeLabel":"string"},"baseURL":{"description":"Base URL for the model provider","example":"https://api.openai.com/v1","type":"string","format":"uri","uniqueKey":"options.model.oneOf.2.baseURL","typeLabel":"string\u003curi>"},"headers":{"description":"Custom headers sent with every request to the model provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.2.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.2.headers","typeLabel":"object"}},"additionalProperties":false,"uniqueKey":"options.model.oneOf.2","typeLabel":"object"},{"type":"object","description":"Model configuration object or model name string (e.g., 'openai/gpt-5-nano')","required":["modelName"],"properties":{"modelName":{"description":"Model name string with provider prefix (e.g., 'openai/gpt-5-nano')","example":"openai/gpt-5.4-mini","type":"string","isRequired":true,"uniqueKey":"options.model.oneOf.3.modelName","typeLabel":"string"},"apiKey":{"description":"API key for the model provider","example":"sk-some-openai-api-key","type":"string","uniqueKey":"options.model.oneOf.3.apiKey","typeLabel":"string"},"baseURL":{"description":"Base URL for the model provider","example":"https://api.openai.com/v1","type":"string","format":"uri","uniqueKey":"options.model.oneOf.3.baseURL","typeLabel":"string\u003curi>"},"headers":{"description":"Custom headers sent with every request to the model provider","type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","uniqueKey":"options.model.oneOf.3.headers.additionalProperties","typeLabel":"string"},"uniqueKey":"options.model.oneOf.3.headers","typeLabel":"object"},"openaiEndpointFormat":{"description":"Wire format used by an OpenAI-compatible endpoint. Defaults to the Responses API; use chat for Chat Completions-only endpoints.","example":"chat","type":"string","enum":["responses","chat"],"uniqueKey":"options.model.oneOf.3.openaiEndpointFormat","typeLabel":"enum\u003cstring>"},"provider":{"description":"AI provider for the model (or provide a baseURL endpoint instead)","example":"openai","type":"string","enum":["openai","anthropic","google","microsoft","bedrock"],"uniqueKey":"options.model.oneOf.3.provider","typeLabel":"enum\u003cstring>"}},"additionalProperties":false,"uniqueKey":"options.model.oneOf.3","typeLabel":"object"},{"type":"string","description":"Model configuration object or model name string (e.g., 'openai/gpt-5-nano')","uniqueKey":"options.model.oneOf.4","typeLabel":"string"}],"uniqueKey":"options.model","typeLabel":"object · object · object · object · string"},"timeout":{"description":"Timeout in ms for the extraction","example":30000,"type":"number","uniqueKey":"options.timeout","typeLabel":"number"},"selector":{"description":"CSS selector to scope extraction to a specific element","example":"#main-content","type":"string","uniqueKey":"options.selector","typeLabel":"string"},"ignoreSelectors":{"description":"Selectors for elements and subtrees that should be excluded from extraction","example":["nav",".cookie-banner","#sidebar-ads"],"type":"array","items":{"type":"string","uniqueKey":"options.ignoreSelectors.items.[INDEX]","typeLabel":"string"},"uniqueKey":"options.ignoreSelectors","typeLabel":"string[]"},"screenshot":{"description":"When true, include a screenshot of the current viewport in the extraction LLM call. Defaults to false.","example":false,"type":"boolean","uniqueKey":"options.screenshot","typeLabel":"boolean"}},"uniqueKey":"options","typeLabel":"object"},"frameId":{"oneOf":[{"type":"string","description":"Target frame ID for the extraction","uniqueKey":"frameId.oneOf.0","typeLabel":"string"},{"type":"null","description":"Target frame ID for the extraction","uniqueKey":"frameId.oneOf.1","typeLabel":"null"}],"uniqueKey":"frameId","typeLabel":"string | null"},"streamResponse":{"description":"Whether to stream the response via SSE","example":true,"type":"boolean","uniqueKey":"streamResponse","typeLabel":"boolean"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"instruction":"Extract all product names and prices from the page","schema":{},"options":{"model":{"modelName":"openai/gpt-5.4-mini","provider":"vertex","auth":{"type":"googleServiceAccount","credentials":{"private_key":"\u003cstring>","client_email":"\u003cstring>","type":"service_account","project_id":"\u003cstring>","private_key_id":"\u003cstring>","client_id":"\u003cstring>","auth_uri":"\u003cstring>","token_uri":"\u003cstring>","auth_provider_x509_cert_url":"\u003cstring>","client_x509_cert_url":"\u003cstring>","universe_domain":"\u003cstring>"},"scopes":"\u003cstring>","projectId":"\u003cstring>","universeDomain":"\u003cstring>"},"providerOptions":{"vertex":{"project":"my-gcp-project","location":"us-central1","baseURL":"\u003cstring>","headers":{}}},"apiKey":"sk-some-openai-api-key","baseURL":"https://api.openai.com/v1","headers":{}},"timeout":30000,"selector":"#main-content","ignoreSelectors":["nav",".cookie-banner","#sidebar-ads"],"screenshot":false},"frameId":"\u003cstring>","streamResponse":true}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"19701168-de93-4a51-b861-5a30f8708272":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"description":"Indicates whether the request was successful","type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"object","properties":{"result":{"description":"Extracted data matching the requested schema","x-stainless-any":true,"isRequired":true,"uniqueKey":"data.result","typeLabel":"any"},"actionId":{"description":"Action ID for tracking","type":"string","uniqueKey":"data.actionId","typeLabel":"string"}},"required":["result"],"additionalProperties":false,"isRequired":true,"uniqueKey":"data","typeLabel":"object"}},"required":["success","data"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"data":{"result":"\u003cunknown>","actionId":"\u003cstring>"}}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"cc60a412-157a-4b6a-850a-a896e4b21ff4":{"BrowserbaseApiKey":{"type":"apiKey","in":"header","name":"x-bb-api-key","description":"Browserbase API key for authentication","scopes":[]},"BrowserbaseProjectId":{"type":"apiKey","in":"header","name":"x-bb-project-id","description":"Deprecated. Browserbase API keys are now project-scoped, so this header is no longer required.","scopes":[]}}},"servers":{"40da429c-9334-4c5a-9981-d59bc38e1245":{"url":"https://api.stagehand.browserbase.com"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-bb-api-key","description":"Browserbase API key for authentication","scopes":[]},"schema":{"title":"x-bb-api-key","type":"string","description":"Browserbase API key for authentication","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"BrowserbaseApiKey","name":"x-bb-api-key"},{"scheme":{"type":"apiKey","in":"header","name":"x-bb-project-id","description":"Deprecated. Browserbase API keys are now project-scoped, so this header is no longer required.","scopes":[]},"schema":{"title":"x-bb-project-id","type":"string","description":"Deprecated. Browserbase API keys are now project-scoped, so this header is no longer required.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"BrowserbaseProjectId","name":"x-bb-project-id"}],"title":"BrowserbaseApiKey \u0026 BrowserbaseProjectId"}]},"originalFileLocation":"v3/openapi.json"},"subdomain":"stagehand","siteName":"Stagehand","title":"Extract data from the page - Stagehand","navMaps":{"firstHrefInVersion":{"v4":{"href":"/v4/first-steps/introduction","matchLevel":3},"v3":{"href":"/v3/api-reference/python/extract-data-from-the-page","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-07-27T14:24:06.441Z","originalFileLocation":"v3/api-reference/python/extract-data-from-the-page.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Extracts structured data from the current page using AI-powered analysis.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Stagehand\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Extract data from the page - Stagehand\">\u003cmeta data-mint-head property=\"og:description\" content=\"Extracts structured data from the current page using AI-powered analysis.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Stagehand Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://stagehand.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Extract+data+from+the+page\u0026amp;description=Extracts+structured+data+from+the+current+page+using+AI-powered+analysis.\u0026amp;theme=4b62b60986504105fdf72d9e\u0026amp;signature=943aee8d7ae22cd842338dcc1c77a95095c8dcdcc5a3a0004164319017916da4\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Extract data from the page - Stagehand\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Extracts structured data from the current page using AI-powered analysis.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://stagehand.mintlify.site/_mintlify/api/og/v2?division=API+Reference\u0026amp;title=Extract+data+from+the+page\u0026amp;description=Extracts+structured+data+from+the+current+page+using+AI-powered+analysis.\u0026amp;theme=4b62b60986504105fdf72d9e\u0026amp;signature=943aee8d7ae22cd842338dcc1c77a95095c8dcdcc5a3a0004164319017916da4\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/stagehand/AOyqXB1zvpc48cEh/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Stagehand\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#00C851\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/v3/api-reference/python/extract-data-from-the-page.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.stagehand.dev/#organization\",\"name\":\"Stagehand\",\"url\":\"https://docs.stagehand.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/stagehand/iZoJpVulsYk9lDMY/logo/light_logo.png?fit=max\u0026auto=format\u0026n=iZoJpVulsYk9lDMY\u0026q=85\u0026s=1562b274b6ffc39253bc8091cf8291d9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.stagehand.dev#website\",\"name\":\"Stagehand\",\"url\":\"https://docs.stagehand.dev\",\"publisher\":{\"@id\":\"https://docs.stagehand.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page#webpage\",\"url\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page\",\"name\":\"Extract data from the page\",\"description\":\"Extracts structured data from the current page using AI-powered analysis.\",\"dateModified\":\"2026-07-27T14:24:06.441Z\",\"isPartOf\":{\"@id\":\"https://docs.stagehand.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.stagehand.dev/v3/api-reference/python/start-a-new-browser-session\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Extract data from the page\",\"item\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page#apireference\",\"headline\":\"Extract data from the page\",\"name\":\"Extract data from the page\",\"description\":\"Extracts structured data from the current page using AI-powered analysis.\",\"url\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page\",\"mainEntityOfPage\":{\"@id\":\"https://docs.stagehand.dev/v3/api-reference/python/extract-data-from-the-page#webpage\"},\"dateModified\":\"2026-07-27T14:24:06.441Z\",\"publisher\":{\"@id\":\"https://docs.stagehand.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.stagehand.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Stagehand\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Stagehand","nav":{"global":{"anchors":[{"anchor":"Discord","icon":"discord","href":"https://discord.gg/stagehand"},{"anchor":"GitHub","icon":"github","href":"https://github.com/browserbase/stagehand"},{"anchor":"Changelog","icon":"scroll","href":"https://github.com/browserbase/stagehand/releases"}]},"versions":[{"version":"v4","pages":[{"title":"v4","href":"/v4/first-steps/introduction"}]},{"version":"v3","dropdowns":[{"dropdown":"TypeScript","icon":"code","groups":[{"group":"First Steps","pages":[{"title":"Introducing Stagehand","sidebarTitle":"Introduction","href":"/v3/first-steps/introduction"},{"title":"Quickstart","href":"/v3/first-steps/quickstart"},{"title":"Installation","href":"/v3/first-steps/installation"},{"title":"AI Rules","href":"/v3/first-steps/ai-rules"}]},{"group":"The Basics","pages":[{"title":"Agent","href":"/v3/basics/agent"},{"title":"Act","href":"/v3/basics/act"},{"title":"Extract","href":"/v3/basics/extract"},{"title":"Observe","sidebarTitle":"Observe","href":"/v3/basics/observe"},{"title":"WebMCP","sidebarTitle":"WebMCP","href":"/v3/basics/webmcp"},{"title":"Evaluations \u0026 Metrics","sidebarTitle":"Evals","href":"/v3/basics/evals"}]},{"group":"Configuration","pages":[{"title":"Browser","sidebarTitle":"Browser","href":"/v3/configuration/browser"},{"title":"Observability","sidebarTitle":"Observability","href":"/v3/configuration/observability"},{"title":"Logging","sidebarTitle":"Logging","href":"/v3/configuration/logging"},{"title":"Models","sidebarTitle":"Models","href":"/v3/configuration/models"}]},{"group":"Best Practices","pages":[{"title":"Caching Actions","href":"/v3/best-practices/caching"},{"title":"Cost Optimization","sidebarTitle":"Cost Optimization","href":"/v3/best-practices/cost-optimization"},{"title":"Deterministic Agent Scripts","sidebarTitle":"Deterministic Agent","href":"/v3/best-practices/deterministic-agent"},{"title":"Using Multiple Tabs","href":"/v3/best-practices/using-multiple-tabs"},{"title":"Deploying Stagehand","href":"/v3/best-practices/deployments"},{"title":"History Tracking","sidebarTitle":"History Tracking","href":"/v3/best-practices/history"},{"title":"Computer Use Agents","href":"/v3/best-practices/computer-use"},{"title":"Agent Fallbacks","href":"/v3/best-practices/agent-fallbacks"},{"title":"Prompting Best Practices","href":"/v3/best-practices/prompting-best-practices"},{"title":"MCP Integrations","href":"/v3/best-practices/mcp-integrations"},{"title":"Speed Optimization","sidebarTitle":"Speed Optimization","href":"/v3/best-practices/speed-optimization"}]},{"group":"Integrations","pages":[{"group":"MCP Server","pages":[{"title":"Browserbase MCP Server","sidebarTitle":"Introduction","href":"/v3/integrations/mcp/introduction"},{"title":"Browserbase MCP Server Setup","sidebarTitle":"Setup","href":"/v3/integrations/mcp/setup"},{"title":"Browserbase MCP Server Tools","sidebarTitle":"Tools","href":"/v3/integrations/mcp/tools"},{"title":"Browserbase MCP Server Configuration","sidebarTitle":"Configuration","href":"/v3/integrations/mcp/configuration"}]},{"group":"CrewAI","pages":[{"title":"CrewAI Introduction","sidebarTitle":"Introduction","href":"/v3/integrations/crew-ai/introduction"},{"title":"Use CrewAI to Automate Browser Tasks","sidebarTitle":"Configuration","href":"/v3/integrations/crew-ai/configuration"}]},{"group":"Langchain","pages":[{"title":"Langchain JS Introduction","sidebarTitle":"Introduction","href":"/v3/integrations/langchain/introduction"},{"title":"LangChain JS Configuration","sidebarTitle":"Configuration","href":"/v3/integrations/langchain/configuration"}]},{"group":"Next.js + Vercel","pages":[{"title":"Next.js + Vercel","sidebarTitle":"Introduction","href":"/v3/integrations/vercel/introduction"},{"title":"Use Stagehand in Next.js","sidebarTitle":"Configuration","href":"/v3/integrations/vercel/configuration"}]},{"group":"Convex","pages":[{"title":"Convex","sidebarTitle":"Introduction","href":"/v3/integrations/convex/introduction"},{"title":"Use Stagehand in Convex","sidebarTitle":"Configuration","href":"/v3/integrations/convex/configuration"}]},{"title":"Playwright","href":"/v3/integrations/playwright"},{"title":"Puppeteer","href":"/v3/integrations/puppeteer"},{"title":"Selenium","href":"/v3/integrations/selenium"}]},{"group":"Reference","pages":[{"title":"Stagehand","icon":"hand-horns","href":"/v3/references/stagehand"},{"title":"agent()","icon":"robot","href":"/v3/references/agent"},{"title":"act()","icon":"arrow-pointer","href":"/v3/references/act"},{"title":"extract()","icon":"ufo-beam","href":"/v3/references/extract"},{"title":"observe()","icon":"magnifying-glass","href":"/v3/references/observe"},{"title":"context","icon":"window","href":"/v3/references/context"},{"title":"clipboard","icon":"clipboard","href":"/v3/references/clipboard"},{"title":"page","icon":"page","href":"/v3/references/page"},{"title":"locator","icon":"crosshairs","href":"/v3/references/locator"},{"title":"deepLocator","icon":"layer-group","href":"/v3/references/deeplocator"},{"title":"Response","icon":"reply","href":"/v3/references/response"}]},{"group":"Migration Guides","pages":[{"title":"Migrate TypeScript v2 to v3","sidebarTitle":"Migrate TypeScript v2 to v3","icon":"arrow-up-right-dots","href":"/v3/migrations/v2"},{"title":"Migrate Python v2 to v3","sidebarTitle":"Migrate Python v2 to v3","icon":"snake","href":"/v3/migrations/python"}]}]},{"dropdown":"Python","icon":"code","groups":[{"group":"SDK Reference","pages":[{"title":"Python SDK","href":"/v3/sdk/python"}]},{"group":"API Reference","pages":[{"title":"Start a new browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/start","href":"/v3/api-reference/python/start-a-new-browser-session"},{"title":"Navigate to a URL","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/navigate","href":"/v3/api-reference/python/navigate-to-a-url"},{"title":"Perform an action","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/act","href":"/v3/api-reference/python/perform-an-action"},{"title":"Observe available actions","description":"Identifies and returns available actions on the current page that match the given instruction.","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/observe","href":"/v3/api-reference/python/observe-available-actions"},{"title":"Extract data from the page","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/python/extract-data-from-the-page"},{"title":"Execute an AI agent","description":"Runs an autonomous AI agent that can perform complex multi-step browser tasks.","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/agentExecute","href":"/v3/api-reference/python/execute-an-ai-agent"},{"title":"End a browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/end","href":"/v3/api-reference/python/end-a-browser-session"},{"title":"Replay session metrics","deprecated":null,"version":null,"openapi":"/v3/openapi.json get /v1/sessions/{id}/replay","href":"/v3/api-reference/python/replay-session-metrics"}]}]},{"dropdown":"Java","icon":"code","groups":[{"group":"SDK Reference","pages":[{"title":"Java SDK","href":"/v3/sdk/java"}]},{"group":"API Reference","pages":[{"title":"Start a new browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/start","href":"/v3/api-reference/java/start-a-new-browser-session"},{"title":"Navigate to a URL","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/navigate","href":"/v3/api-reference/java/navigate-to-a-url"},{"title":"Perform an action","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/act","href":"/v3/api-reference/java/perform-an-action"},{"title":"Observe available actions","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/observe","href":"/v3/api-reference/java/observe-available-actions"},{"title":"Extract data from the page","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/java/extract-data-from-the-page"},{"title":"Execute an AI agent","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/agentExecute","href":"/v3/api-reference/java/execute-an-ai-agent"},{"title":"End a browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/end","href":"/v3/api-reference/java/end-a-browser-session"},{"title":"Replay session metrics","deprecated":null,"version":null,"openapi":"/v3/openapi.json get /v1/sessions/{id}/replay","href":"/v3/api-reference/java/replay-session-metrics"}]}]},{"dropdown":"Go","icon":"code","groups":[{"group":"SDK Reference","pages":[{"title":"Go SDK","href":"/v3/sdk/go"}]},{"group":"API Reference","pages":[{"title":"Start a new browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/start","href":"/v3/api-reference/go/start-a-new-browser-session"},{"title":"Navigate to a URL","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/navigate","href":"/v3/api-reference/go/navigate-to-a-url"},{"title":"Perform an action","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/act","href":"/v3/api-reference/go/perform-an-action"},{"title":"Observe available actions","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/observe","href":"/v3/api-reference/go/observe-available-actions"},{"title":"Extract data from the page","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/go/extract-data-from-the-page"},{"title":"Execute an AI agent","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/agentExecute","href":"/v3/api-reference/go/execute-an-ai-agent"},{"title":"End a browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/end","href":"/v3/api-reference/go/end-a-browser-session"},{"title":"Replay session metrics","deprecated":null,"version":null,"openapi":"/v3/openapi.json get /v1/sessions/{id}/replay","href":"/v3/api-reference/go/replay-session-metrics"}]}]},{"dropdown":"Ruby","icon":"code","groups":[{"group":"SDK Reference","pages":[{"title":"Ruby SDK","href":"/v3/sdk/ruby"}]},{"group":"API Reference","pages":[{"title":"Start a new browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/start","href":"/v3/api-reference/ruby/start-a-new-browser-session"},{"title":"Navigate to a URL","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/navigate","href":"/v3/api-reference/ruby/navigate-to-a-url"},{"title":"Perform an action","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/act","href":"/v3/api-reference/ruby/perform-an-action"},{"title":"Observe available actions","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/observe","href":"/v3/api-reference/ruby/observe-available-actions"},{"title":"Extract data from the page","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/extract","href":"/v3/api-reference/ruby/extract-data-from-the-page"},{"title":"Execute an AI agent","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/agentExecute","href":"/v3/api-reference/ruby/execute-an-ai-agent"},{"title":"End a browser session","deprecated":null,"version":null,"openapi":"/v3/openapi.json post /v1/sessions/{id}/end","href":"/v3/api-reference/ruby/end-a-browser-session"},{"title":"Replay session metrics","deprecated":null,"version":null,"openapi":"/v3/openapi.json get /v1/sessions/{id}/replay","href":"/v3/api-reference/ruby/replay-session-metrics"}]}]}]}]},"basePath":"","title":"Extract data from the page - Stagehand","buildId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","deploymentId":"dpl_BLQvU86QFwq3AhPofSTw6q8dGWKm","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-Myd8dsju.js","utils-C2HkQgW0.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-8rSppmTv.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B6MjiCFm.js","snippetPresets-DwrSAONL.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-CxAy5y67.js","ApiExamples-1-a5UQKQ.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C541m7wZ.js","shallow-CWELCZ77.js","getApiPlaygroundDisplay-CTo5Zn03.js","CodeSnippet-D--dzvnl.js","CodeSnippets-DM3cXEDh.js","getPastedJson-C-VECgcL.js","icon-BPq2-Mg3.js","MethodPill-D9J5cUHd.js","DuplicateIcon-BqHaxUnD.js","createIcon-CIbcZHp9.js","DynamicMarkdown-BKiHAm_d.js","SectionHeading-DstQXt3H.js","axios-vUo_bRtp.js","Markdown-CpxgzsKA.js","clsx-C5EfhVm0.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-CJ9Oly2E.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Mk6P3qvh.js"]}