How to Capture a Scrolling Webpage with Playwright MCP
Use Playwright MCP’s full-page screenshot option to capture a scrolling webpage, handle dynamic content, and troubleshoot incomplete captures.
To capture a scrolling webpage as one image with Playwright MCP, navigate to the page and call browser_take_screenshot with fullPage: true. That option requests the full scrollable page instead of only the visible viewport. It cannot be combined with an element screenshot. [Playwright MCP tool reference]
Capture the full page with Playwright MCP
- Start your Playwright MCP server and connect your MCP client to it. The available tools depend on the server configuration and enabled capabilities.
- Navigate the browser session to the page you want to capture.
- Call
browser_take_screenshotwithfullPageset totrue. You can provide a filename and image type; the MCP README says the image type is inferred from the filename extension, or defaults to PNG when unspecified. If you omit the filename, the server generates one in its output directory. - Open the resulting image and check that the page content you need is present.
The MCP tool-call shape is conceptually:
{
"name": "browser_take_screenshot",
"arguments": {
"fullPage": true,
"filename": "page.png"
}
}
Use the tool through your MCP client’s normal tool interface; the JSON above illustrates the arguments, not a command to paste into a terminal. For the exact current tool schema, consult the Playwright MCP repository documentation.
Choose the right kind of capture
| Goal | Use | Result |
|---|---|---|
| Save one image of the scrollable document | browser_take_screenshot with fullPage: true |
A full-page screenshot request |
| Move down the page and capture a particular visible state | browser_mouse_wheel, then take a screenshot |
A screenshot of the state after scrolling |
| Inspect page structure or find controls for interaction | browser_snapshot |
An accessibility snapshot, not an image |
Scrolling and capturing are separate actions. The vision-mode documentation lists browser_mouse_wheel among coordinate-based tools and says vision capability must be enabled for its tools. It may not be present in every default server setup. [Playwright vision mode]
An accessibility snapshot is useful when the next task is to locate or interact with page elements. Playwright MCP describes snapshots as a better representation for interaction; they do not produce a full-page image. [Playwright MCP tool reference] [Playwright accessibility snapshots]
Capture dynamic and lazy-loaded pages
A full-page option requests the full scrollable document, but the documentation cited here does not guarantee that one capture will trigger every lazy-loaded image, infinite-scroll result, or virtualized row. Behavior depends on how the page loads content.
- Inspect the first full-page result for missing images or sections.
- If the page loads content as the reader scrolls, scroll downward in increments with the available wheel tool.
- Wait for the new content to appear, then inspect or capture the relevant page state again.
- For a page that continuously appends results or virtualizes rows, capture the sections that matter as you move through it. A single full-page image may not contain content that the page has not rendered.
Use browser_snapshot when you need to understand the accessible structure or identify controls to operate. Use a screenshot when you need the visual result. [Playwright accessibility snapshots]
Use Playwright’s regular API instead of MCP
If you are writing a Playwright program rather than invoking the MCP tool, use the core API’s page.screenshot method. This is JavaScript API code, not Playwright MCP tool-call syntax. [Playwright screenshot documentation]
import { chromium } from 'playwright';
const browser = await chromium.launch({ headless: true });
const page = await browser.newPage();
try {
await page.goto('https://example.com', { waitUntil: 'load' });
await page.screenshot({ path: 'page.png', fullPage: true });
} finally {
await browser.close();
}
Install the Playwright package and browser for your environment before running this script. The fullPage option here has the same goal—capturing beyond the viewport—but this code runs a browser directly rather than asking an MCP-connected browser tool to do it.
Options and practical limits
| Option or behavior | What to know |
|---|---|
fullPage: true |
Requests the entire scrollable page instead of the current viewport. |
| Element screenshot | The MCP reference says it cannot be combined with fullPage. Choose either a full-page capture or an element capture. |
| Filename | You may supply a filename; an omitted filename is generated in the output directory according to the MCP README. |
| Image type | The README says the type can be inferred from the filename extension, with PNG as the default if it is not specified. |
| Scale | The MCP README lists a scale option. Check the current tool schema for its accepted values and behavior. |
| Dynamic content | Full-page capture does not establish that every site-specific lazy-load or infinite-scroll mechanism has run. Inspect the output. |
The documentation surfaced for this guide does not establish a fixed package release requirement or a universal maximum page size. Available tools and options can vary with the MCP server configuration, so check the current repository reference when a parameter is unavailable.
Troubleshooting
| Symptom | Likely cause | What to do |
|---|---|---|
| The image shows only the viewport | fullPage was omitted, set to false, or not passed to the screenshot tool. |
Call browser_take_screenshot again with fullPage: true. |
The MCP client cannot find browser_mouse_wheel |
The tool may require vision capability, which is not enabled in the current server configuration. | Check the server’s enabled capabilities and vision-mode setup. If you only need a full-page image, use the screenshot tool’s fullPage option. |
| The full-page and element options conflict | The MCP reference does not allow full-page capture with an element screenshot. | Remove the element target for a full-page capture, or capture the element separately without fullPage. |
| Lazy images or lower sections are missing | The page may only load them after scrolling, or may render a virtualized portion of its content. | Scroll in increments, wait for content to appear, then recapture or capture the needed states. Verify the output. |
| The file format is unexpected | The filename extension or image type setting may not match your expectation. | Set a filename with the intended extension and check the current tool schema’s image type options. |
| You received a structure snapshot instead of an image | browser_snapshot returns accessibility information. |
Use browser_take_screenshot for a visual image. |
Performance, reliability, and cost considerations
A full-page image contains more content than a viewport screenshot, so it may take more time and produce a larger file, especially for long pages or high-scale captures. The cited MCP documentation does not provide benchmarks or a universal page-size limit. Keep captures focused on the page and output you need, and inspect very long pages for missing or clipped content.
For reliability, wait until navigation has reached the state your workflow needs, then check the resulting image. A page that keeps changing or loads sections only on scroll can produce an incomplete capture even when the full-page option is set. If all you need is a visual record of a particular state, scroll to it and capture that state; if you need to understand controls and structure, use an accessibility snapshot.
Playwright MCP and the regular Playwright API are software tools; the research sources here do not specify their pricing. If you use a hosted screenshot API instead, compare its billing rules and features for your workload.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP, or PDF. For a full-page capture, use the documented full_page parameter; see the ScreenshotNeo API documentation for the current request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -d full_page=true -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://example.com", "full_page": "true"},
timeout=90,
)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({
access_key: 'YOUR_API_KEY',
url: 'https://example.com',
full_page: 'true'
});
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);
ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Every feature is on every plan.
Sign up for ScreenshotNeo’s free 1,000 screenshots a month, with no card required.
FAQ
Does a full-page screenshot scroll the browser visibly?
The full-page option requests an image of the scrollable page. Use the wheel tool when you need to move through the page interactively.
Can I use full-page capture and an element screenshot together?
No. The MCP screenshot reference says full-page capture cannot be combined with element screenshots.
Is browser_snapshot another way to save the page as an image?
No. It returns an accessibility snapshot for understanding and interacting with the page structure.
Will one capture include every result on an infinite-scroll page?
Do not assume so. Scroll and verify that the page has loaded the content you need before relying on the image.


