node package manager

urlbox

urlbox-screenshots

Quickly generate screenshots using the urlbox.io screenshot as a service API.

Signup at Urlbox.io to get your API key and secret.

Installation

npm install urlbox --save

Example

import Urlbox from 'urlbox';
 
// Get your API key and secret from urlbox.io 
const urlbox = Urlbox(YOUR_API_KEY, YOUR_API_SECRET);
 
// See all urlbox screenshot options at urlbox.io/docs 
const options = {
  url: 'github.com',
  thumb_width: 600,
  format: 'jpg',
  quality: 80
}
 
const imgUrl = urlbox.buildUrl(options);
// https://api.urlbox.io/v1/YOUR_API_KEY/TOKEN/jpg?url=github.com&thumb_width=600&quality=80 

Now stick that url in an img tag to render the screenshot!

Urlbox Screenshot of github.com