DocsElement Statebrowser_get_page_map

browser_get_page_map

Browser Get Page Map

Get a compact structured map of all interactive elements on the page, grouped by sections. Returns a markdown table with numbered references, types, descriptions, current values, and selectors. Use element numbers as selectors in browser_click and browser_type (e.g., selector '5'). 10x cheaper than screenshots for AI agent page understanding.

Usage Example

1234567891011
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.get_page_map(
context_id=context_id
)

Parameters

Required

context_idstringrequired

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

Optional

intentstring

Task description to boost matching elements (e.g., 'buy nvidia jetson')

max_elementsstring

Maximum number of elements to return (0 = unlimited). Returns top N by importance score

regionstring

Filter to specific page region: 'main', 'nav', 'header', 'footer', 'sidebar', 'article', 'form', 'dialog'. Empty = all regions

Response

Returns a JSON object with the operation result.

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