DocsAI Intelligencebrowser_query_page

browser_query_page

Browser Query Page

Ask a natural language question about the current page content. The LLM analyzes the page and answers questions like 'What is the main topic?', 'Are there any prices listed?', 'Extract all email addresses'. Uses intelligent page summarization for better context understanding.

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.query_page(
context_id=context_id,
query="value"
)

Parameters

Required

context_idstringrequired

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

querystringrequired

Natural language question to ask about the page content. Examples: 'What is the main topic?', 'Does this page have pricing information?', 'What products are shown?', 'Extract all email addresses'

Response

Returns a JSON object with the operation result.

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