page.screenshot, locator.screenshot, page.pdf and in-page fetch
Ask your AI agent
With the Zenrows MCP server connected to Claude, Cursor or any MCP client, paste this prompt. Your agent picks the right Zenrows tools and settings on its own.Take screenshots and a PDF
Download files through the session
To save a file the page links to (an image, a report, an export), read the link and fetch it from inside the page. The request runs in the remote browser, so it carries the session’s IP, cookies and login, and returns the bytes to your script.Python (Playwright)
Example output
Customize it
Troubleshooting
- The screenshot shows a half-loaded page: the page was still rendering. Wait for the element you care about with
page.wait_for_selector(...)before the screenshot. - Lazy-loaded images are blank in the full-page screenshot: they load as you scroll. Scroll to the bottom first (see Scroll and paginate), then take the screenshot.
- The PDF has no background colors: set
print_background=True(printBackground: truein Node.js). - A download triggered by a click comes back as
canceled: the file lands inside the cloud browser. Read the link’s URL and fetch it in the page, as shown above, to get the bytes in your script.
Related recipes
Fill and submit multi-step forms
Submit a form, then capture the result as proof.
Log in once and reuse the session
Download files that sit behind a login.
Capture screenshots, PDFs, and files
One request per screenshot, PDF or file, no session to manage.
Let your AI assistant browse with Browser tools
Ask Claude or Cursor for screenshots and PDFs in plain language.