GET /v1/get-screenshot

This is the main endpoint to use GetScreenshot. This section contains a description of all the available query parameters to control the API, its behavior and the resulting captured screenshots.

get
Required Parameters

https://api.rasterwise.com/v1/get-screenshot
These URL query parameters are required to get a successful response from the API.
Request
Response
Query Parameters
url
required
string
URL of the website / page you want to screenshot. Should start with http:// or https://
apikey
required
string
You secret API Key. This is required to authenticate your request.
200: OK
Cake successfully retrieved.
{
"name": "Cake's name",
"recipe": "Cake's recipe name",
"cake": "Binary cake"
}
404: Not Found
Could not find a cake matching this query.
{
"message": "Ain't no cake like that."
}

get
Optional "Format" Parameter

https://api.rasterwise.com/v1/get-screenshot
Request
Response
Query Parameters
format
optional
string
The file type/format in which you want to get your capture. It can be either png or jpeg. Defaults to png
200: OK

get
Optional "PDF" Parameter

https://api.rasterwise.com/v1/get-screenshot
Request
Response
Query Parameters
pdf
optional
boolean
If set to true, we will ignore any image format settings and instead generate an A4 PDF of the passed website. This will work the same and render the website as if you were printing it from your browser. Defaults to false
200: OK

get
Optional "Dimensions" Parameters

https://api.rasterwise.com/v1/get-screenshot
Use these URL query parameters to control the size of the viewport at the time of taking a page screenshot.
Request
Response
Query Parameters
height
optional
number
Height in pixels of the viewport when taking the page screenshot. Defaults to 800
width
optional
number
Width in pixels of the viewport when taking the page screenshot. Defaults to 1280
fullpage
optional
boolean
If set totrue, we will calculate the full height of the website and used it as the height in pixels of the viewport when taking the page screenshot. Any passed height value will be ignored. Defaults to false
200: OK

get
Optional "Preset" Parameter

Request
Response
Query Parameters
preset
optional
string
If set, we will control the dimension and user-agent to simulate the preset device or graphics display resolution. If a preset value is passed, we will ignore other passed dimension parameters. This parameter can accept any of the following presets: iphone 5 (iPhone 5) iphone678 (iPhone 6/7/8) iphone678_plus (iPhone 6/7/8 +) iphonex (iPhone X / XS) pixel2 (Google Pixel 2) pixel2_xl (Google Pixel 2 XL) ipad (iPad in Vertical) ipadpro (iPad Pro Vertical) hvga (320 x 480) wvga (480 x 800) dvga (640 x 960) wxga_v (768 x 1280) xga (1024 x 768) wxga_s (1280 x 800) wxga_l (1366 x 768) sxga (1280 x 1024) wsxga_plus (1680 x 1050)
200: OK

get
Optional "Modified-Rendering" Parameters

https://api.rasterwise.com/v1/get-screenshot
Use these URL query parameters to modify the final rendering of the page before taking a page screenshot. Use these to hide DOM elements, add custom styles, highlight words and more.
Request
Response
Query Parameters
highlight
optional
string
A custom word or phrase you want to highlight. If passed, GetScreenshot will look for that string on the website and highlight all its instances with bright-yellow box.
customjs
optional
string
A custom JS evaluation you want to inject before the capture. If passed we will inject this statement as a header <script> with a just in time model, after all the required operations and just before the capture operation. This is important to have in mind when passing JS that changes the rendering.
customcss
optional
string
A custom CSS style you want to inject before the capture. If passed we will inject the style declaration as a header <style> just before the capture operation.
hidemsg
optional
boolean
If set to true, we will hide message, chat and customer support clients. Currently hides the following clients: Intercom, Drift, Facebook and Tawk (partiallly). Defaults to false
hidecookie
optional
boolean
If set to true, we will hide cookie disclaimers that will usually appear as floating boxes or fixed containers. The hiding is not guaranteed but it has a pretty broad coverage and the underlying hiding heuristic is updated weekly. Defaults to false
200: OK

get
Optional "Workflow" Parameters

https://api.rasterwise.com/v1/get-screenshot
Request
Response
Query Parameters
email
optional
string
A valid email address. If set, we will send a formatted email to this email address including the capture image and the details of the capture (capture time and URL). Example: test@example.com
webhook
optional
string
A valid endpoint url that can receive and respond to a POSTrequest (preferably an endpoint that you control). If set, we will send a POST request with the final response of the original call, to the provided endpoint (webhook listener). For your convenience we send the response in the body and queryStringParameters of the request. Example: https://mywebhook.example.com
200: OK