Capturing Screenshots

screenshot Function

Page Interactions can be used to capture screenshots of the desired webpage. To take a screenshot, use the following parameters:

ParameterRequiredDescription

full_page

Optional Default = false

Bool | Capture a screenshot of the entire page or just the viewable area.

format

Optional Default = png

Enum | The Base64 format of the screenshot image. Supported formats: png, jpeg, webp

timeout

Optional Default = 30000

Integer | Controls the time to allow screenshots scrolling before terminating screenshot processing in ms.

Example Request

curl -X POST 'https://api.webit.live/api/v1/realtime/web' \
--header 'Authorization: Basic <credential string>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "url": "https://www.example.com",
    "render": true,
    "render_flow": [{
        "screenshot": {
                "full_page": true,
                "format": "jpeg",
                "timeout": 30000
        }
    }]
}'

Like all Page Interactions, infinite scrolling is capped by the global 120-second session timeout, and will be terminated if this limit is reached.

Last updated