browser_get_html
Extract HTML content with configurable cleaning levels. Optionally target a specific element using a CSS selector to get its innerHTML instead of the full page. When the selector matches multiple elements, returns a JSON array of HTML strings. 'minimal' preserves most structure, 'basic' removes scripts and styles, 'aggressive' strips to essential content. Useful for page analysis, content extraction, and feeding HTML to other processing tools.
Usage Example
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
Optional
selectorstringOptional CSS selector to get innerHTML of a specific element (e.g., '#content', '.article-body'). When the selector matches multiple elements, returns a JSON array of HTML strings (one per element). When omitted, returns the full page HTML
clean_levelenumminimalbasicaggressiveLevel of HTML cleaning to apply. 'minimal': preserves most structure, 'basic': removes scripts/styles (default), 'aggressive': strips to essential content only. Choose based on how much structure you need
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}