Capture website screenshots in your Node.js application without installing Puppeteer, managing Chrome, or dealing with memory leaks. Just a simple HTTP request.
Get Free API Key →const fetch = require('node-fetch');
const url = 'https://grabshot.dev/v1/screenshot?url=https://example.com&key=YOUR_API_KEY';
const res = await fetch(url);
const buffer = await res.buffer();
// Save to file
require('fs').writeFileSync('screenshot.png', buffer);
const fetch = require('node-fetch');
async function captureScreenshot(targetUrl, options = {}) {
const params = new URLSearchParams({
url: targetUrl,
key: process.env.GRABSHOT_API_KEY,
width: options.width || '1440',
height: options.height || '900',
format: options.format || 'png',
fullPage: options.fullPage || 'false',
delay: options.delay || '0',
...(options.darkMode && { darkMode: 'true' }),
...(options.deviceFrame && { deviceFrame: options.deviceFrame }),
});
const res = await fetch(`https://grabshot.dev/v1/screenshot?${params}`);
if (!res.ok) {
const err = await res.json();
throw new Error(err.error || 'Screenshot failed');
}
return Buffer.from(await res.arrayBuffer());
}
// Usage
const screenshot = await captureScreenshot('https://github.com', {
width: '1920',
fullPage: 'true',
darkMode: true,
deviceFrame: 'macbook'
});
Add screenshot generation to any Express app:
const express = require('express');
const app = express();
app.get('/screenshot', async (req, res) => {
const { url } = req.query;
if (!url) return res.status(400).json({ error: 'url required' });
const response = await fetch(
`https://grabshot.dev/v1/screenshot?url=${encodeURIComponent(url)}&key=${process.env.GRABSHOT_API_KEY}`
);
res.set('Content-Type', 'image/png');
res.send(Buffer.from(await response.arrayBuffer()));
});
app.listen(3000);
Automatically create Open Graph preview images for your blog posts or SaaS pages.
Show visual previews of external links in your app, like Slack or Twitter do.
Capture screenshots before and after deployments to catch UI regressions.
Include website screenshots in automated reports and documents.
| Feature | GrabShot API | Self-hosted Puppeteer |
|---|---|---|
| Setup time | 2 minutes | Hours (Chrome, deps, memory) |
| Memory usage | 0 MB (API call) | 200-500 MB per instance |
| Concurrent screenshots | Unlimited | Limited by RAM |
| Device frames | Built-in | DIY image overlay |
| AI cleanup (popups/banners) | Yes (paid plans) | No |
| Cost at 1,000/mo | $9/mo | $20-50/mo (VPS + maintenance) |
Free tier: 25 screenshots/month. No credit card required.
Starter: $9/mo — 2,500 screenshots, no watermark.
Pro: $29/mo — 10,000 screenshots, AI cleanup, priority support.
Start Free — No Credit Card →