Install via npm
or GitHub
npm install screenshotscloud
Or if you prefer yarn
yarn add screenshotscloud
Once installed you can generate website screenshot urls as follows:
const ScreenshotsCloud = require('screenshotscloud');
const SCREENSHOTSCLOUD_KEY = 'my-key-generated-at-screenshots-dot-cloud';
const SCREENSHOTSCLOUD_SECRET = 'mysecretstringgeneratedatscreenshotsdotcloud';
const screenshotscloud = ScreenshotsCloud(SCREENSHOTSCLOUD_KEY, SCREENSHOTSCLOUD_SECRET);
const screenshotUrl = screenshotscloud.screenshotUrl({
"url": "openai.com/research",
"width": 800
});
If you wish to download the image the simplest method would be to use a http client such as request
or the built in http
library. Example below:
const ScreenshotsCloud = require('screenshotscloud');
const request = require('request'); // make sure to npm install request or yarn add request to your project first
const fs = require('fs');
const SCREENSHOTSCLOUD_KEY = 'my-key-generated-at-screenshots-dot-cloud';
const SCREENSHOTSCLOUD_SECRET = 'mysecretstringgeneratedatscreenshotsdotcloud';
const screenshotscloud = ScreenshotsCloud(SCREENSHOTSCLOUD_KEY, SCREENSHOTSCLOUD_SECRET);
const screenshotUrl = screenshotscloud.screenshotUrl({
"url": "openai.com/research",
"width": 800
});
request.get(screenshotUrl, {encoding: 'binary'}, function(error, response, imageBody) {
let screenshotResult = imageBody;
// and if you want to save it to disk
fs.writeFileSync('screenshot.png', screenshotResult, 'binary');
});
Don't spend precious developer time building and maintaining your own website screenshot infrastructure. Focus on your core product and let us deliver the screenshots!
Large businesses already trust us to deliver millions of fast high quality website screenshots using our API. Service Level Agreements are available. Knowledgeable support is always available via web chat or e-mail.
We use our website screenshot API across the range of our other products including Brushd. Because we rely on our own products you can be assured we create the best quality screenshots with high uptime.
We're working to make your screenshots available everywhere. We've recently added Slack integration so now you can share website screenshots directly in your Slack workspace. More integrations coming soon!
Don't be bound to a single browser. Pit Chrome and Firefox against each other. By default and for no extra cost we serve your screenshot request to both a Google Chrome and Mozilla Firefox instance and deliver the fastest result. You can also choose to use only Chrome or Firefox in your requests.
Using Google Kubernetes Engine on Google Cloud Platform and our robust worker-queue infrastructure we're quickly able to scale to meet burst and sustained demand.
Real screenshots using a real browser delivered as quickly as possible. Download screenshots directly or use our Google Cloud powered CDN.
Make sure your website looks correct before deploying it into production. Test your site in both Google Chrome and Mozilla Firefox with one API.
Show users alternate versions of pages for example in a website builder.
No need to compose images using cumbersome image manipulation tools. Use what you already know and compose your graphics using HTML, CSS and other media and render them on our platform.
Rasterize your complex vector images inside a real browser in seconds. Make them more advanced using other HTML elements.
Convert a website or HTML document into a PDF ready to download and send in seconds. No need to deal with PDF authoring tools.