Parameters:
file_type | string | File type for the file (If output is not set to json ), the options include PNG , JPG , WebP , and PDF . The default is PNG |
omit_background | boolean | Omit background (If using PNG as the file_type only) removes the background from websites with a basic white background and makes it transparent. Default is false . |
destroy_screenshot | boolean | If true , the screenshot will not be stored on our server after render. The resulting screenshot (or PDF) must be deleted (destroyed) when it's rendered as it will not be available again. Default is false |
fail_on_error | boolean | If fail on error is set to true, then the API will return an error if the render encounters a 4xx or 5xx status code. Default is false |
longitude | number | The longitude to use with the browser's Geolocation API. Default is null |
latitude | number | The latitude to use with the browser's Geolocation API. Default is null |
proxy | string | Use an address for a proxy server for the request. Example: address:port or username:password@address:port . Default: '' |
no_cookie_banners | string | Block or hide cookie banners on websites as the request loads before render. Default is false |
block_ads | boolean | Block ad requests from common and popular ad-networks from loading the request before the render. Default is false |
headers | string | Sets the header or headers when the request is being loaded before the render. This works for single or multiple headers. Example: X-HEADER: value; X-OTHER_HEADERL otherValue; . Default is '' |
cookies | string | Sets the cookie or cookies when the request is being loaded before the render. This works for single or multiple cookies. Example: cookie=value;otherCookie=otherValue; . Default is '' |
scroll_to_element | string | Target a specific element for the browser to scroll to before the render. This is useful if a given element is only loaded in the viewport. Default is '' |
selector | string | Specify the target for the render based on a element with a matching selector. If the element is not found, a render of the results is still returned. Example: div > .main-navigation > .logo . Default is '' |
css | string | CSS code injected into the render. Default is '' |
css_url | string | URL for CSS code injected into the render. Default is '' |
ttl | integer | TTL (Time to Live) sets the number of seconds to keep a rendered screenshot (or PDF) in the cache. Default is 30 days or 2592000 seconds |
user_agent | string | Sets the User-Agent string for the render for a particular request. Default is '' |
accept_languages | string | Sets the Accept-Language header on the request for the specified URL rendered. Default isen-US,en;q=0.8 |
delay | integer | Time delay in milliseconds (ms) before the screenshot is rendered from the browser instance (this includes PDFs). Default is 0 |
thumbnail_width | integer | The width in pixels of the thumbnail generated from the render. If not set, the fallback behavior is the outputted screenshot. Default is null |
output | string | Set the output of the results from the render. The output can be either JSON or the raw image captured. Default is image |
fresh | string | Take a fresh screenshot or render (or PDF) vs. getting the version cached version within the app's storage. Default is false |
lazy_load | boolean | If lazy load is set to true , the browser will cross down the entire page to ensure all content is loaded in the render. Default is false |
full_page | boolean | Capture the full page of a website vs. the scrollable area that is visible in the viewport upon render. Default is false |
retina | boolean | Retina or a high definition equivalent for a device that sets the pixel ratio to 2X. This option will cause the screenshot processing time to go up due to processing of the larger images. Default is false |
height | integer | Viewport height in pixels of the browser render. Default is 867 |
width | integer | Viewport width in pixels of the browser render. Default is 1680 |
custom_html | string | Provide custom HTML that should be rendered. This will override the URL option and take a screenshot of the following HTML output. Default is '' |
url | string | The URL of the website for the screenshot / render |
token | string | Your API key for Screenshot API |
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article