Get page content
get_page_contentExtract a webpage's visible text or full HTML for reading content directly, without building an accessibility tree. Write large pages to a file to avoid output limits.
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 |
|---|---|---|---|
| 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 |
| 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 |