Capturing screenshots

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

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
        }
    }]
}'

To take a screenshot, render must be set to true.

ParameterRequiredDescriptionValues

full_page

Optional Default = false

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

Boolean - true/false

format

Optional Default = "png"

The Base64 format of the screenshot image.

Enum - png jpeg webp

timeout

Optional Default = 30000

Controls the time to allow screenshots scrolling before terminating screenshot processing.

Integer - milliseconds

Last updated