take_screenshot
Capture webpage screenshots as base64 images with options for full-page, element-specific, dark mode, mobile emulation, ad blocking, and custom viewport sizes.
Instructions
Capture a screenshot of any webpage. Returns the image as base64-encoded data. Supports custom viewport sizes, device emulation, dark mode, full-page capture, ad blocking, and more.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | No | Custom JavaScript to execute before capture | |
| css | No | Custom CSS to inject into the page | |
| url | Yes | URL of the page to screenshot (must start with http:// or https://) | |
| delay | No | Delay in seconds after page load before capturing | |
| width | No | Viewport width in pixels | |
| device | No | Device preset (affects viewport and user agent) | |
| format | No | Output image format | png |
| height | No | Viewport height in pixels | |
| retina | No | Capture at 2x resolution (retina) | |
| quality | No | Image quality for JPEG/WebP (1-100) | |
| selector | No | CSS selector to capture a specific element instead of the full viewport | |
| block_ads | No | Block advertisements during capture | |
| dark_mode | No | Enable dark mode (prefers-color-scheme: dark) | |
| full_page | No | Capture the entire scrollable page | |
| scroll_to | No | CSS selector of an element to scroll into view before capture | |
| block_cookies | No | Block cookie consent dialogs | |
| click_selector | No | CSS selector of an element to click before capture | |
| hide_selectors | No | CSS selectors of elements to hide before capture |