Capture before/after screenshots for visual regression testing. Compare deployments, catch CSS bugs, and verify UI changes across devices.
const fetch = require("node-fetch");
const fs = require("fs");
const devices = ["desktop", "iphone14", "ipad"];
const envs = { staging: "https://staging.example.com", prod: "https://example.com" };
for (const device of devices) {
for (const [env, url] of Object.entries(envs)) {
const res = await fetch(
"https://snapapi.tech/v1/screenshot?" + new URLSearchParams({
url, api_key: "YOUR_KEY", device
})
);
fs.writeFileSync(`${env}-${device}.png`, Buffer.from(await res.arrayBuffer()));
}
}
console.log("Compare staging vs prod screenshots!");Capturing screenshot...
We run Chromium so you don't have to. No Puppeteer, no Selenium, no drivers.
Choose your format. Set quality. Get optimized output.
9 device presets — iPhone, Pixel, iPad, desktop. One parameter.
Scroll the entire page and stitch into one image. Automatic.
Capture a specific element by CSS selector instead of the whole page.
Emulate prefers-color-scheme: dark to capture dark-themed pages.
1. Sign up for a free API key — 100 screenshots/month, no credit card required.
2. Make a GET request to /v1/screenshot with your URL and API key.
3. Receive a pixel-perfect screenshot as a binary image, or JSON with metadata if meta=true.
That's it. No browser installation, no Chromium management, no headless infrastructure to maintain.