Skip to main content

screenshot

Screenshots the page or a specific selector

Example:

mutation Screenshot {
goto(url: "https://example.com") {
status
}

screenshot {
base64
}
}
screenshot(
captureBeyondViewport: Boolean
clip: ScreenshotClip
fromSurface: Boolean
fullPage: Boolean
omitBackground: Boolean
optimizeForSpeed: Boolean
quality: Float
selector: String
type: ScreenshotType
): ScreenshotResponse

Arguments

screenshot.captureBeyondViewport ● Boolean scalar

Capture the screenshot beyond the viewport. Default: False if there is no clip. True otherwise

screenshot.clip ● ScreenshotClip input

Specifies the region of the page/element to clip

screenshot.fromSurface ● Boolean scalar

Capture the screenshot from the surface, rather than the view. Default: True

screenshot.fullPage ● Boolean scalar

When True, takes a screenshot of the full page. Default: False

screenshot.omitBackground ● Boolean scalar

Hides default white background and allows capturing screenshots with transparency. Default: False

screenshot.optimizeForSpeed ● Boolean scalar

Optimize image encoding for speed, not for resulting size. Default: False

screenshot.quality ● Float scalar

Quality of the image, between 0-100. Not applicable to png images.

screenshot.selector ● String scalar

The CSS selector of the element on the page you want to screenshot

screenshot.type ● ScreenshotType enum

The final format of the screenshot

Type

ScreenshotResponse object

The response returned after generating a Screenshot