Screenshots
The screenshot endpoint captures the session framebuffer as a PNG. Use it instead of page.screenshot().
Why a separate endpoint?
page.screenshot() reads pixels back through Chromium’s compositor. On remote sessions this path can stall or return empty frames. The /screenshot endpoint captures the framebuffer directly, avoiding the compositor entirely.
Taking a screenshot
The response is a raw PNG (image/png). No JSON wrapping.
From TypeScript:
From Python:
Response details
Timing
Screenshots take roughly 1–3 seconds. The session must be in ready status. If the session has expired, the endpoint returns 409.
Full-page screenshots
The endpoint captures the visible viewport. To capture the full page, scroll and stitch, or set the viewport size before navigating: