Sample code to take website screenshots in Node.js

Check out our npm package here here, and on github

// npm install urlbox --save
import Urlbox from 'urlbox';
// Plugin your API key and secret
const urlbox = Urlbox(YOUR_API_KEY, YOUR_API_SECRET);
// Set your options
const options = {
url: '',
thumb_width: 600,
format: 'jpg',
quality: 80
const imgUrl = urlbox.buildUrl(options);
// Now set it as the src in an img tag to render the screenshot
<img src={imgUrl} />
Was this page helpful?