By stefan.skliarov
Updated 5 months ago
Video, Images
Popularity Score
Success Rate

Screenshotlayer API Documentation

Capture and automate highly customizable screenshots.

View API Details

Verify the provided address

Header Parameters
Required Parameters
REQUIREDWebsite url to capture
REQUIREDApi key obtained from Screenshotlayer
Optional Parameters
OPTIONALYour snapshots can be requested in three different formats: PNG, JPG and GIF. You can change the default format (PNG) simply by appending the API's outputFormat parameter containing your preferred format
OPTIONALBy appending the API's placeholderImage parameter and setting it to 1, you can request the default screenshotlayer placeholder image. If you prefer setting your own custom placeholder image, simply append it to the API's placeholderImage parameter as an image URL.Supported file formats: PNG, JPEG, GIF
OPTIONALBy default, the screenshotlayer API returns your target website's snapshot in original size (1:1). If you'd like to request a thumbnail, append the API's thumbnailsWidth parameter containing your preferred thumbnail width in pixels.
OPTIONALBy default, website screenshots are cached for 30 days (2,592,000 seconds). Using the API's cachingTime parameter, you can specify a custom caching time (time-to-live) lower than the default setting.
OPTIONALInject a custom CSS stylesheet into the target website
OPTIONALThe default HTTP Accept-Language header is en-US, en (US English, or English in general). You can specify a custom Accept-Language header by appending it to the API's acceptLanguage parameter.
OPTIONALSpecify a custom delay time (in seconds) before the snapshot is captured
OPTIONALThe screenshotlayer API's default viewportControl setting is 1440x900. You can specify a custom viewport by setting the viewportControl parameter to your desired dimensions. (format: width x height, in pixels)
OPTIONALYou can easily force the API to capture a fresh screenshot of the requested target URL by appending the forceRefresh parameter to the request URL and setting it to 1.
OPTIONALBy default, screenshots are rendered based on the height of the selected (or default) viewport. Alternatively, you can request the full height of the target website to be captured, simply by setting the API's fullPage parameter to 1.
OPTIONALSecret keyword to prevent your publicly displayed API request URL from being abused
OPTIONALBy default, the screenshotlayer API does not send any HTTP User-Agent headers with your request. You can specify a custom user-agent string by appending it to the API's userAgent parameter.
OPTIONALIf you are subscribed to the Professional or Enterprise Plan, you may request the API to directly export your snapshot to your AWS S3 Bucket. This can be done simply by appending your S3 Bucket path (format: s3://API_KEY:[email protected]) to the API's exportTo parameter. Professional and Enterprise Customers may also specify a custom ftp path to directly export captured snapshots to. This can be achieved simply by appending your desired FTP path (format: ftp://user:[email protected]) to the API's exportTo parameter.
Code Snippet"")
.header("X-RapidAPI-Host", "")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
Sample Response
Request URL:
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS


To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request"")
.header("X-RapidAPI-Host", "")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.header("Content-Type", "application/x-www-form-urlencoded")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication