Here are all of WebScreenshot.io options and what they do.
Remember you’ll also need to include your API Key and API Secret hash in your query.
Sample GET request to the WebScreenshot.io API:
https://api.webscreenshot.io/v1/YOURAPIKEY/jpeg?cache=false&height=1080&width=1920&page=https://google.com
Screenshot API Options
Option Name | Default Value | Description | Example |
---|---|---|---|
format | png | Defined before your query string format can be png/jpeg/pdf | https://api.webscreenshot.io/v1/ YOURAPIKEY/FORMAT?page=… |
page | null | URL of the page you want to screenshot, including https://. Remember to url encode strings if they contain query strings. | page=https://google.com |
height | 1080 | Height of the browser window taking the screenshot. | height=600 |
width | 1920 | Width of the browser window taking the screenshot. | width=1200 |
selector | null | Screenshot only a specific part of a page. This can be done by selecting a CSS class or ID. | selector=.my-div |
css | null | Add CSS to the render, perfect for modifying the page with different styling. | css=body{background:red} |
hide_selector | null | Hide a specific element based on a selector. | hide_selector=.modal |
delay | null | Delay the screenshot capture for a specific amount of time in milliseconds. | delay=1000 |
fullpage | null | Setting this to true will screenshot the entire page. Note that your width will remain the same but the height of the image will match the output. | fullpage=true |
unique | null | A unique value designed to break cache. This is useful for example using a date or time if you want to force a new render. | unique=05-23-2022 |
ttl | 2630000 | Length that the render should be cached in seconds (default is 1 month if not set). Set this to 0 if you want all renders with that query to be uncached. | ttl=30 |
blockads | null | Set this to true to block ads on the page of the render. | blockads=true |
timeout | 30000 | Set how long the render should try to load the URL, default is 30 seconds. | timeout=15000 |
Template Engine Options (beta)
Option Name | Default Value | Description | Example |
---|---|---|---|
template | standard-1 | Select your template to use, currently we only offer standard-1 but more will be coming soon. Coming soon: Template browser | template=standard-2 |
template_values | 1080 | Variables to pass to the template. Most templates include title, background, and logo by default. Read specific template guidelines for addition variables a template may offer. This is in the form of JSON and can be used in GET requests. | template_values=[{ “name”: “title”, “text”: “My Headline!” }, { “name”: “background”, “image_url”: “https://images.unsplash.com/photo-1651981101695-219fa3653bf1” }, { “name”: “logo”, “image_url”: “https://webscreenshot.io/wp-content/uploads/2022/05/webscreenshot-logo.png” }] |