The cache parameter tells us approximately how old, in seconds, you are happy for the screenshot to be (e.g. cache=86400
for anything up to one day). A value of cache=-1
will generate a new webshot. Default: “yes” (2592000)
- If the webshot comes from our cache, response times can be significantly faster – assuming the webshot is already in the cache.
- There is a five minute wait time before a new webshot will be generated. If you do request one during this period, you’ll receive the cached image or a “queued” placeholder.
http://api.snapito.io/v2/webshot/<api-key>?url=cnn.com&cache=no
The following presets are also available:
Preset |
Description |
Actual value |
no |
Generate new image |
-1 |
yes |
Within a month |
2592000 |
true |
Within a month |
2592000 |
recent |
Within last 15 minutes |
900 |
hour |
Within last hour |
3600 |
day |
Within last 24 hours |
86400 |
week |
Within last 7 days |
604800 |
month |
Within last 30 days |
2592000 |
http://api.snapito.io/v2/webshot/<api-key>?url=cnn.com&cache=recent
Delay
The delay parameter delay=5
tells Snapito how long, in seconds, to delay the rendering of the snapshot, maximum of 45 seconds. This is helpful if you have items on the page that need more time to load. This is not needed for slow-loading sites, as we will wait up to 120 seconds for a site to load. However, sometimes things load “after” a site is officially loaded (like Flash, ads, video, external content, CDN-hosted elements, iframes, certain types of redirects, etc) and this feature overcomes that issue. Default: 0
http://api.snapito.com/v2/webshot/<api-key>?url=cnn.com&delay=10
Quality
The quality parameter expresses your preference of quality vs speed & size. The acceptable values are any number between 1
to 100
(omit the % sign). Default: 95
http://api.snapito.com/v2/webshot/<api-key>?url=cnn.com&quality=95
Screen
The screen parameter specifies the size of the browser screen (viewport) that is capturing the web page. This value can be in the width x height format. Default: 1024×768
http://api.snapito.com/v2/webshot/<api-key>?url=cnn.com&screen=1024x768
Pre-defined screen values have been deprecated, since everyone passes the specific resolution they want.
Reload
The reload parameter tells the system to load the URL, accept all cookies (normally blocked for security), close, reopen the URL, and then capture and save. This feature overcomes “first-time visit” popups, overlays, and lightboxes in many cases. You may “reload” up to X
times. Default: 0
http://api.snapito.com/v2/webshot/<api-key>?url=cnn.com&reload=1
Note: Each reload is a full process, so it will delay your capture by the multiple of reloads requested.
Type (deprecated)
The type parameter tells Snapito what format to render the image in, the default is type=jpg
at 95%. At some point, we may add type=png
for lossless, high quality captures.
http://api.snapito.com/v2/webshot/<api-key>?url=cnn.com&type=jpg