Website Screenshot or Thumbnail

FREE
By restpack
Updated 7 months ago
Tools
-/10
Popularity Score
-
Latency
-
Success Rate

Website Screenshot or Thumbnail API Documentation

Take pixel-perfect screenshots or thumbnails of any website. Restpack Screenshot API is an easy to use RESTful web service that can capture screenshots of live web pages and deliver the results in several formats. The service sits on a fully functional browser rendering engine with rich html / css / js capabilities.

View API Details
GET/capture
GET/capture

Capture screenshot from any URL or Raw HTML. POST method is also available. Please take a look https://restpack.io/screenshot/docs

Authorization:

There is no requirement to obtain a token for testing purposes, responses will be watermarked in that case. To remove the watermark, an access token should be obtained from https://restpack.io by creating a free account. Token is accepted in x-access-token header or access_token querystring parameter.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
urlSTRING
OPTIONALThe URL of web page, including the protocol that you want to capture.
htmlSTRING
OPTIONALRaw HTML string of a page that you want to capture. Example: <p>Test</p>
access_tokenSTRING
OPTIONALYou can provide your token via querystring instead of header.
jsonBOOLEAN
OPTIONALReturn a JSON response with the resulting image's URL instead of the image itself. Default: false
modeSTRING
OPTIONALCapturing mode. Please see below for details. Default: fullpage Pattern: fullpage | viewport | element
formatSTRING
OPTIONALPreferred image output format. If you need a raw html string you can pass html as format Default: png Pattern: jpg | png | pdf | html
widthNUMBER
OPTIONALPreferred viewport width in pixels. Default: 1280 Min: 320 Max: 2000
heightNUMBER
OPTIONALPreferred viewport height in pixels. Default: 1024 Min: 160
thumbnail_widthNUMBER
OPTIONALIn case you want a thumbnail image, provide a preferred width. Min: 10 Max: 3000
thumbnail_heightNUMBER
OPTIONALPreferred thumbnail height, requires thumbnail_width to be set, unbounded if omitted. Min: 10 Max: 3000
cssSTRING
OPTIONALAdditional CSS string to be injected into the page before render.
jsSTRING
OPTIONALAdditional JS string to be injected into the page before render.
prescrollBOOLEAN
OPTIONALForce scrolling the webpage before capture. Might help with dynamic loading assets.
delayNUMBER
OPTIONALTime in milliseconds to delay capture after page load. Default: 2000 Max: 10000
ttlNUMBER
OPTIONALTime in milliseconds for the resulting image to be cached for further requests. Default: 1 day Max: 1 week
freshBOOLEAN
OPTIONALForce rendering a new screenshot disregarding the cache status. Default: false
user_agentSTRING
OPTIONALCustom user-agent header string for the web request. Default: Chrome Compatible User Agent
accept_languageSTRING
OPTIONALCustom accept-language header string for the web request.
element_selectorSTRING
OPTIONALA CSS selector to be used with element rendering mode.
headersSTRING
OPTIONALAdditional headers seperated with newline Example: X-Test: header\nAccept-Type: html
retinaBOOLEAN
OPTIONALGenerate retina sized screen capture (2x device pixel ratio). Default: false
base64BOOLEAN
OPTIONALSerialize response file to base64
Code Snippet
Install SDK
Response ExampleSchema

Install SDK for (Node.js)Unirest

OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication