screenshot, response_type=pdf and file downloads
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 a full-page screenshot
Setjs_render=true, screenshot=true and screenshot_fullpage=true. The response body is a PNG.
--screenshot saves the visible area:
CLI
Example output
page.png is a PNG of the whole shop page, from the header to the footer.
Capture one element
Setscreenshot_selector to a CSS selector, together with screenshot=true, and the image is cropped to that element. screenshot_format=jpeg with screenshot_quality keeps files small.
Python (Requests)
50832 bytes saved to product.jpg, an 832 x 1030 image of the product title, price, options and Add to cart button.
Save the page as a PDF
Setjs_render=true and response_type=pdf. The body is a PDF of the rendered page, ready to archive or pass to a document pipeline.
190406 bytes saved to product.pdf, an 8-page PDF.
Download a file directly
When the URL points at a file, such as an image, a PDF or a CSV, Fetch returns the file itself. No extra parameters are needed.Customize it
Troubleshooting
- The saved file is HTML, not an image: the request had no
screenshot=true. Send it together withscreenshot_fullpageorscreenshot_selector, and withjs_render=true. 400with codeREQS004on a PDF request:response_type=pdfrenders the page. Addjs_render=true, or--manual --js-renderin the CLI.- The image opens as a broken file: the response was an error. Check the status code before writing the body, as the samples do with
raise_for_status()andresponse.ok. - The element screenshot is empty or wrong: the selector matched a different or hidden element. Test the selector in your browser’s console with
document.querySelector. - Content is missing from the capture: it loads late. Add
wait_forwith a selector of that content.
Related recipes
Click, fill, and scroll before you scrape
Act on the page before the capture.
Take screenshots and save pages as PDF
Capture any step of a multi-page browser session.
Scrape JavaScript-rendered pages
Wait for the content before you capture it.
Detect changes on any page and get alerted
Compare pages over time and act on the difference.