Node.js REST API No Puppeteer needed

Screenshot API for Node.js

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 →

Quick Start — 3 Lines of Code

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);

Full Example with Options

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'
});

Express.js Middleware

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);

Common Use Cases

Generate OG Images

Automatically create Open Graph preview images for your blog posts or SaaS pages.

Link Previews

Show visual previews of external links in your app, like Slack or Twitter do.

Visual Regression Testing

Capture screenshots before and after deployments to catch UI regressions.

PDF Reports with Embedded Screenshots

Include website screenshots in automated reports and documents.

GrabShot vs Self-hosted Puppeteer

FeatureGrabShot APISelf-hosted Puppeteer
Setup time2 minutesHours (Chrome, deps, memory)
Memory usage0 MB (API call)200-500 MB per instance
Concurrent screenshotsUnlimitedLimited by RAM
Device framesBuilt-inDIY image overlay
AI cleanup (popups/banners)Yes (paid plans)No
Cost at 1,000/mo$9/mo$20-50/mo (VPS + maintenance)

Pricing

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 →

Full API documentation →