Generate screenshots of web pages using the WebScreenshot.io API. Perfect for generating thumbnails of web pages, or for generating screenshots of web pages for use in your own applications.
Sign up for an API key and secret at WebScreenshot.io.
npm install webscreenshot-io
import Webscreenshot from 'webscreenshot-io';
// API key and secret from webscreenshot.io
const webscreenshot = Webscreenshot(API_KEY, API_SECRET);
// Available options: webscreenshot.io/documentation/options/options/
const options = {
page: 'google.com',
height: 600,
width: 800,
format: 'jpeg'
}
const imageUrl = webscreenshot.screenshotUrl(options);
console.log(imageUrl);