Skip to main content

Screenshot URL

GET 

/screenshot

Screenshot URL

Request

Query Parameters

    api_key stringrequired

    API key for authorization

    url stringrequired

    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.

    Example: https://httpbin.org
    css string

    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_scale number

    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.

    Example: 1
    viewport_height number

    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_width number

    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.

    viewport_device string

    Possible values: [blackberry_playbook, blackberry_playbook_landscape, blackberry_z30, blackberry_z30_landscape, galaxy_note_3, galaxy_note_3_landscape, galaxy_note_ii, galaxy_note_ii_landscape, galaxy_s_iii, galaxy_s_iii_landscape, galaxy_s5, galaxy_s5_landscape, galaxy_s8, galaxy_s8_landscape, galaxy_s9+, galaxy_s9+_landscape, galaxy_tab_s4, galaxy_tab_s4_landscape, ipad, ipad_landscape, ipad_(gen_6), ipad_(gen_6)_landscape, ipad_(gen_7), ipad_(gen_7)_landscape, ipad_mini, ipad_mini_landscape, ipad_pro, ipad_pro_landscape, ipad_pro_11, ipad_pro_11_landscape, iphone_4, iphone_4_landscape, iphone_5, iphone_5_landscape, iphone_6, iphone_6_landscape, iphone_6_plus, iphone_6_plus_landscape, iphone_7, iphone_7_landscape, iphone_7_plus, iphone_7_plus_landscape, iphone_8, iphone_8_landscape, iphone_8_plus, iphone_8_plus_landscape, iphone_se, iphone_se_landscape, iphone_x, iphone_x_landscape, iphone_xr, iphone_xr_landscape, iphone_11, iphone_11_landscape, iphone_11_pro, iphone_11_pro_landscape, iphone_11_pro_max, iphone_11_pro_max_landscape, iphone_12, iphone_12_landscape, iphone_12_pro, iphone_12_pro_landscape, iphone_12_pro_max, iphone_12_pro_max_landscape, iphone_12_mini, iphone_12_mini_landscape, iphone_13, iphone_13_landscape, iphone_13_pro, iphone_13_pro_landscape, iphone_13_pro_max, iphone_13_pro_max_landscape, iphone_13_mini, iphone_13_mini_landscape, jiophone_2, jiophone_2_landscape, kindle_fire_hdx, kindle_fire_hdx_landscape, lg_optimus_l70, lg_optimus_l70_landscape, microsoft_lumia_550, microsoft_lumia_950, microsoft_lumia_950_landscape, nexus_10, nexus_10_landscape, nexus_4, nexus_4_landscape, nexus_5, nexus_5_landscape, nexus_5x, nexus_5x_landscape, nexus_6, nexus_6_landscape, nexus_6p, nexus_6p_landscape, nexus_7, nexus_7_landscape, nokia_lumia_520, nokia_lumia_520_landscape, nokia_n9, nokia_n9_landscape, pixel_2, pixel_2_landscape, pixel_2_xl, pixel_2_xl_landscape, pixel_3, pixel_3_landscape, pixel_4, pixel_4_landscape, pixel_4a_(5g), pixel_4a_(5g)_landscape, pixel_5, pixel_5_landscape, moto_g4, moto_g4_landscape]

    Emulates a given device's metrics and user agent.

    viewport_has_touch boolean

    The default value is false. Indicates whether the viewport supports touch events.

    viewport_landscape boolean

    The default value is false. Indicates whether the viewport is in landscape mode.

    viewport_mobile boolean

    The default value is false. Specifies whether the meta viewport tag is considered.

    full_page boolean

    This parameter allows you take screenshot of entire webpage.

    selector string

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

    Example: .swagger-ui
    ms_delay number

    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.

    user_agent string

    An user agent for the request. The default value is the latest version of the browser used by Puppeteer.

    Example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36
    format string

    Possible values: [png, jpeg, jpg, webp, gif, jp2, tiff, avif, heif]

    Default value: png

    The format of the output file

    Example: jpg
    image_quality number

    Default value: 80

    Render the image with the specified quality.

    image_width number

    The image_width and image_height parameters enable you to create a thumbnail of the screenshot.

    image_height number

    The image_width and image_height parameters enable you to create a thumbnail of the screenshot.

Responses

Rendered image URL.

Schema
    imageUrl stringrequired

    URL to generated image

Loading...