v1

latestOpenAPI 3.0.02026-08-065720.9 KB
render

Screenshot URL

get/screenshot

Query parameters

api_keystring required

API key for authorization

urlstring required

This refers to a complete URL for a public webpage, like https://httpbin.org. If provided, it will supersede the html parameter and produce a screenshot of the specified URL.

cssstring

This refers to the CSS styling for your rendered image. If used in conjunction with a URL, it will be incorporated into the webpage.

device_scalenumber

Modifies the pixel density of the screenshot. By default, it is set to 2, mirroring the quality of a 4K monitor. The minimum value allowed is 1, while the maximum is 3.

viewport_heightnumber

This allows you to specify the height of Chrome's viewing area, which in turn deactivates the auto-cropping feature. Both the height and width parameters need to be established if you choose to use either one.

viewport_widthnumber

This allows you to determine the width of Chrome's viewing area, which will deactivate the auto-cropping feature. If you're using either parameter, both the height and width settings need to be specified.

full_pageboolean

This parameter allows you take screenshot of entire webpage.

selectorstring

Specify a CSS selector corresponding to an element in the HTML. The image will be cropped precisely to this designated element.

ms_delaynumber

Incorporates additional delay to ensure JavaScript execution is complete. This option is useful if you encounter blank images while using JavaScript. The default setting is 0, but you can begin with a 500 millisecond delay if necessary.

Response

Rendered image URL.

imageUrlstring required

URL to generated image

Example response

{
  "imageUrl": "https://api.canvasflare.com/image/8d063c49-3f15-46c1-91c7-9cf61e6758c6"
}