Get page content
get_page_contentExtract visible text or full HTML from a page directly, optionally writing to a file. Read content without building accessibility trees or dealing with selectors.
Instructions
Get the page's visible text, or its full HTML.
The cheapest way to read a page when you only need content and not the uids take_snapshot provides: no accessibility tree is built, and the text form carries no markup overhead.
Returns the DOM as it stands right now, so on pages that render asynchronously call wait_for or wait_for_selector first.
Use take_snapshot when you intend to interact with elements, and query_selector when you want specific elements rather than the whole page.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | Read inside one of the page's frames instead of the main document: an index or frame id from list_frames. Chrome's DOM queries never cross a frame boundary, so anything inside an iframe is unreachable without this. The frame is read through an isolated world, which shares the DOM but not the page's own JavaScript variables. Empty string reads the main document. | |
| format | No | "text" returns document.body.innerText — visible text without markup, which is what you want for reading. "html" returns the full outerHTML including scripts and attributes, needed when you care about markup, data- attributes or hidden field values. | text |
| browser | No | Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name. | default |
| file_path | No | Write the content to this local path instead of returning it — the way to capture a large page without flooding the conversation. | |
| max_chars | No | Truncate the output at this many characters. 0 means no limit, which is risky on large pages — especially with format="html". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |