UNPKG

screenshot-capture

Version:

Free URL to Screenshot API - capture crisp and clean snapshots of any website, with any device, any setting and lightning fast. Free for personal use.

17 lines (15 loc) 466 B
var API = require('screenshot-capture'); var api = new API({ access_key: 'access_key', secret_key: 'secret_key' }); var captureQuery = { url: 'https://en.wikipedia.org/wiki/Special:Random' }; api.capture(captureQuery) .then(function (result) { console.log('Capture Promise Resolve (image contains '+ result.length +' bytes)'); }) .catch(function (err) { console.log('Capture Promise Reject: ' + JSON.stringify(err)); });