Extract website layout tree
extract_layoutAnalyze a webpage's layout by extracting a simplified DOM tree with layout computed styles (flex, grid, sizing, spacing, positioning) and section labels, revealing structural organization.
Instructions
Return a simplified DOM tree of a page (or a subtree) with only layout-relevant computed styles per node (flex/grid, sizing, spacing, positioning) and section labels. Shows how the page is structured, not just its tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Absolute http:// or https:// URL to analyze. | |
| maxDepth | No | Maximum tree depth to descend. | |
| maxNodes | No | Maximum nodes to include. | |
| timeoutMs | No | Navigation timeout in milliseconds. | |
| userAgent | No | Optional browser user-agent override. | |
| waitUntil | No | Page lifecycle event to await before extraction. | domcontentloaded |
| autoScroll | No | Scroll through the page before extraction to trigger lazy-rendered content. | |
| maxScrolls | No | Maximum viewport-sized scroll steps when autoScroll is enabled. | |
| rootSelector | No | Selector for the subtree root. | body |
| viewportWidth | No | Browser viewport width in CSS pixels. | |
| viewportHeight | No | Browser viewport height in CSS pixels. | |
| allowPrivateNetwork | No | Allow localhost and private-network URLs. Enable only for trusted sites. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |