DocsContent Extractionbrowser_ai_extract

browser_ai_extract

Browser Ai Extract

Extract specific information from the page using AI. Describe what you want to extract and the AI will analyze the page content and return the relevant data. Example: 'all product prices'.

Usage Example

123456789101112
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.ai_extract(
context_id=context_id,
what="value"
)

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

whatstringrequired

Description of what to extract (e.g., 'all product prices', 'main headline')

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}