ApiLeap

FREE
By zakutynsky
Updated 5 months ago
Video, Images
-/10
Popularity Score
-
Latency
-
Success Rate

ApiLeap API Documentation

ApiLeap is an easy to use API that can capture near pixel perfect screenshots of web pages.

View API Details
POSTgetImageFromHtml
POSTgetImageFromUrl
POSTgetImageFromHtml

Get snapshot of the specified html

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
htmlSTRING
REQUIREDThe HTML you want to make a snapshot of.
accessKeyCREDENTIALS
REQUIREDYour personal access key to use the API.
Optional Parameters
delayNUMBER
OPTIONALDelay, after the pageload event is fired, to wait before taking the screenshot. From 0 to 10 seconds. Most websites are fully loaded after the pageload event so this parameter is not needed most of the time.
cssSTRING
OPTIONALAn additional CSS string to be injected into the page before capturing.
widthNUMBER
OPTIONALWidth of the viewport to use.
freshSELECT
OPTIONALReturn a fresh new screenshot instead of the eventually cached one.
fullPageSELECT
OPTIONALSet this to true if you want to capture the full height of the target website.
ttlNUMBER
OPTIONALThe number of seconds the screenshot should be kept in cache. When a screenshot is served from cache, the API call doesn't count in your monthly credit.
heightNUMBER
OPTIONALHeight of the viewport to use. This will be ignored if fullPage is set to true.
formatSELECT
OPTIONALThe format of the returned screenshot. One of jpeg and png.
Code Snippet
unirest.post("https://ApiLeapzakutynskyV1.p.rapidapi.com/getImageFromHtml")
.header("X-RapidAPI-Host", "ApiLeapzakutynskyV1.p.rapidapi.com")
.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
General
Request URL: https://ApiLeapzakutynskyV1.p.rapidapi.com/getImageFromHtml
Request Method: POST
Response Headers
Response Body

Install SDK for NodeJS

Installing

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

unirest.post("https://ApiLeapzakutynskyV1.p.rapidapi.com/getImageFromHtml")
.header("X-RapidAPI-Host", "ApiLeapzakutynskyV1.p.rapidapi.com")
.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