Endpoint
Authentication
No authentication required. All endpoints useuserId for session isolation.
Path parameters
The unique identifier of the tab
Query parameters
User identifier for session isolation
Whether to capture the entire scrollable page instead of just the viewport
Response
Returns a binary PNG image withContent-Type: image/png header.
Screenshot behavior
- Viewport screenshot (default): Captures only the visible area (1280x720 by default)
- Full page screenshot (
fullPage=true): Captures the entire scrollable page height - Format: PNG with transparency support
- No artificial delays - captures current rendered state immediately
- Does not scroll the page or change current viewport position
Size limits
Full-page screenshots of very long pages can produce large files:- Viewport screenshot: ~100-500 KB (1280x720)
- Full page screenshot: 1-10 MB depending on page height
- Maximum practical height: ~50,000 pixels (taller pages may timeout or OOM)
/scroll instead.
Error codes
400- Missing required parameter (userId)404- Tab not found500- Screenshot capture failed (page closed, timeout)
Examples
Viewport screenshot
Full page screenshot
Save with timestamp
Get screenshot in base64 (for JSON workflows)
Use the/snapshot endpoint with includeScreenshot=true instead:
Use cases
Visual verification
Capture screenshots before/after interactions to verify UI changes:Debug automation failures
When an interaction fails, capture a screenshot to see what went wrong:Archive page state
Capture full-page screenshots for archival:Visual regression testing
Compare screenshots across runs to detect unintended UI changes:Comparison with snapshot screenshot
There are two ways to get screenshots:| Method | Format | Use case |
|---|---|---|
| GET /screenshot | Binary PNG | Direct image download, external tools |
| GET /snapshot?includeScreenshot=true | Base64 in JSON | Combined with accessibility tree, AI vision models |
Best practices
- Prefer viewport screenshots: Faster and smaller files
- Wait for rendering: Call
/snapshotor wait 1-2s before screenshot for dynamic content - Handle large files: Stream screenshots instead of loading into memory
- Use descriptive filenames: Include timestamp, tab ID, or test name
- Check page loaded: Verify page is fully rendered before capturing
Performance considerations
- Viewport screenshots: ~100-200ms
- Full-page screenshots: ~500-2000ms depending on page height
- Screenshots do not block other operations on different tabs
- Multiple concurrent screenshots on the same tab are serialized
Related endpoints
- GET /tabs/:tabId/snapshot - Get accessibility tree with optional embedded screenshot (base64)
- POST /tabs/:tabId/wait - Wait for page ready before capturing screenshot