Most SaaS products touch the web in some way - they index it, monitor it, analyze it, or build on top of it. At some point in the product roadmap, somebody opens a ticket: "we need to show users a screenshot of their website." Or: "the changelog needs before-and-after images of the new dashboard." Or the CI pipeline breaks because a CSS refactor shifted a button 3 pixels to the left and nobody caught it until production.
ScreenshotRun handles all of these through one REST endpoint. Pass a URL, get back an image. The same API call works whether you are embedding thumbnails in your product UI, running visual regression tests in GitHub Actions, or generating OG images for your marketing pages.
Embedding screenshots in your product
SaaS products that work with websites - SEO tools, monitoring platforms, analytics dashboards, CRM systems - need to show users what those websites look like. A site audit tool without visual previews is just a spreadsheet. A CRM that stores customer websites but only shows the URL is missing context.
The API turns any URL into an image your product can display. Call it server-side when a user adds a new website, store the result, serve it as a thumbnail:
// When user adds a new website to their account
async function captureWebsiteThumbnail(websiteUrl, userId) {
const params = new URLSearchParams({
url: websiteUrl,
format: "webp",
width: "1280",
height: "800",
block_cookies: "true",
block_chats: "true",
delay: "2000",
response_type: "image",
});
const res = await fetch(
`https://api.screenshotrun.com/v1/screenshots/capture?${params}`,
{ headers: { Authorization: `Bearer ${process.env.SCREENSHOTRUN_KEY}` } }
);
const buffer = Buffer.from(await res.arrayBuffer());
await storage.upload(`users/${userId}/sites/${slugify(websiteUrl)}.webp`, buffer);
return storage.getPublicUrl(`users/${userId}/sites/${slugify(websiteUrl)}.webp`);
}
WebP at 1280px wide keeps file sizes under 100KB for most pages. The block_cookies and block_chats parameters strip overlays that would make the thumbnail look cluttered. For products displaying dozens of website cards in a grid, that combination of small file size and clean capture makes a noticeable difference in page load time.
If your product needs richer data alongside the screenshot, the analyze parameter returns every visible element on the page as structured JSON - headings, links, images, buttons, form fields - with coordinates. Build features on top of that data without maintaining your own scraper.
More on this pattern: website thumbnail API and link preview generation.
Visual regression testing in CI/CD
CSS changes break things in ways that unit tests cannot catch. A padding tweak pushes the signup button off-screen on mobile. Font weights shift and suddenly body text is unreadable on Windows. Sometimes a z-index fix is the culprit - it buries the dropdown menu on tablet. These bugs pass every automated test because the tests check DOM structure, not what the page actually looks like.
Screenshot-based visual testing catches them. Capture your app at key viewports after every deploy, diff against the baseline, fail the build if pixels shifted beyond threshold:
// visual-regression.test.js — runs in CI
import { expect, test } from "vitest";
const API_KEY = process.env.SCREENSHOTRUN_KEY;
const BASE = "https://api.screenshotrun.com/v1/screenshots/capture";
const STAGING = process.env.STAGING_URL;
const pages = ["/", "/pricing", "/dashboard", "/settings"];
const viewports = [
{ device: "desktop", width: 1440, height: 900 },
{ device: "mobile", width: 390, height: 844 },
];
for (const page of pages) {
for (const vp of viewports) {
test(`visual: ${page} @ ${vp.device}`, async () => {
const params = new URLSearchParams({
url: `${STAGING}${page}`,
format: "png",
device: vp.device,
width: String(vp.width),
height: String(vp.height),
block_cookies: "true",
response_type: "image",
});
const res = await fetch(`${BASE}?${params}`, {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const screenshot = Buffer.from(await res.arrayBuffer());
expect(screenshot.length).toBeGreaterThan(1000);
// Compare against baseline with pixelmatch or reg-suit
});
}
}
Eight screenshots per deploy (four pages, two viewports). The test suite runs in GitHub Actions alongside your existing checks. Failures show up as a red check on the PR - the developer sees which page broke before the reviewer even opens it.
For SaaS teams shipping daily, this catches regressions that would otherwise reach users and generate support tickets. Detailed setup: visual regression testing with screenshot API.
Changelog and release notes with screenshots
"Redesigned the settings page" - that line sits in every product changelog at some point. Without a screenshot, it communicates nothing. Users skim past it. With a before-and-after image, the same line becomes the highlight of the release post.
When a release branch merges, capture the affected pages on staging before and after deploy:
# Before deploy — capture current production state
curl -G "https://api.screenshotrun.com/v1/screenshots/capture" -H "Authorization: Bearer $SCREENSHOTRUN_KEY" --data-urlencode "url=https://app.your-saas.com/settings" --data-urlencode "format=webp" --data-urlencode "block_cookies=true" --data-urlencode "response_type=image" -o changelog/settings-before.webp
# After deploy — capture the new version
curl -G "https://api.screenshotrun.com/v1/screenshots/capture" -H "Authorization: Bearer $SCREENSHOTRUN_KEY" --data-urlencode "url=https://app.your-saas.com/settings" --data-urlencode "format=webp" --data-urlencode "block_cookies=true" --data-urlencode "response_type=image" -o changelog/settings-after.webp
Two images per changed page. Drop them into the changelog post. The marketing team stops pinging engineers for "a quick screenshot of the new feature" because the CI pipeline already produced one.
For dark mode releases, add dark_mode=true to capture both themes. That gives you four images per page (light before, light after, dark before, dark after) - enough for a proper announcement post without anyone opening a browser.
Generating link previews and OG images
SaaS products that let users share content - project management tools, documentation platforms, social schedulers - need link previews. When a user pastes a URL into your app, showing a thumbnail of that page is expected behavior. Slack does it. Notion does it. Your product should too.
The API generates these on demand. User pastes a URL, your backend calls the API, the preview card renders with an actual screenshot instead of a generic favicon:
import httpx, os
API_KEY = os.environ["SCREENSHOTRUN_KEY"]
def generate_link_preview(url: str) -> dict:
resp = httpx.get(
"https://api.screenshotrun.com/v1/screenshots/capture",
params={
"url": url,
"format": "webp",
"width": "1200",
"height": "630",
"block_cookies": "true",
"block_ads": "true",
"block_chats": "true",
"extract_metadata": "true",
"response_type": "json",
},
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=30,
)
data = resp.json()
return {
"thumbnail_url": data["screenshot_url"],
"title": data.get("metadata", {}).get("title", ""),
"description": data.get("metadata", {}).get("description", ""),
}
The 1200x630 dimensions match the OG image standard. extract_metadata pulls the page title and description alongside the screenshot, so your preview card has text without a separate scraping call. Cache results with cache_ttl to avoid re-capturing the same URL for every user who views it.
For your own marketing pages, the same approach generates dynamic OG images - blog posts, documentation pages, product updates all get unique social sharing thumbnails without manual design work.
Monitoring competitor product pages
SaaS companies watch each other closely. Pricing page changes, new feature announcements, landing page redesigns - these inform your own product and marketing decisions. Price scrapers break when the DOM changes. RSS feeds miss visual updates. Screenshots capture everything the way a human would see it.
Set up weekly captures of competitor pages that matter:
import httpx, os
from datetime import date
API_KEY = os.environ["SCREENSHOTRUN_KEY"]
BASE = "https://api.screenshotrun.com/v1/screenshots/capture"
competitors = {
"competitor-a": [
"https://competitor-a.com/pricing",
"https://competitor-a.com/features",
"https://competitor-a.com/changelog",
],
"competitor-b": [
"https://competitor-b.com/pricing",
"https://competitor-b.com/product",
],
}
today = date.today().isoformat()
for name, urls in competitors.items():
for url in urls:
resp = httpx.get(BASE, params={
"url": url,
"format": "webp",
"full_page": "true",
"stealth": "true",
"block_cookies": "true",
"delay": "2000",
"response_type": "image",
}, headers={"Authorization": f"Bearer {API_KEY}"}, timeout=60)
slug = url.split("//")[1].replace("/", "_")
filename = f"competitors/{name}/{today}_{slug}.webp"
os.makedirs(f"competitors/{name}", exist_ok=True)
with open(filename, "wb") as f:
f.write(resp.content)
After a month you have a visual timeline of every competitor page. When their pricing changes or a feature disappears from their comparison table, you spot it in the weekly diff rather than hearing about it from a customer. The stealth parameter handles competitors behind Cloudflare or similar protection.
Deeper dive: competitor monitoring with screenshot API.
Product documentation screenshots
Documentation with outdated screenshots erodes trust. Users follow a guide, but the button they see does not match the screenshot in the docs. The settings page was redesigned two versions ago, but nobody updated the twelve screenshots embedded in the help center.
If your docs live at a known URL structure (like /docs/feature-name), you can re-capture every documentation screenshot in one script after each release. Use the selector parameter to capture specific UI components instead of full pages - just the settings panel, just the navigation bar, just the modal dialog:
# Capture just the settings panel
curl -G "https://api.screenshotrun.com/v1/screenshots/capture" -H "Authorization: Bearer $SCREENSHOTRUN_KEY" --data-urlencode "url=https://app.your-saas.com/settings" --data-urlencode "selector=.settings-panel" --data-urlencode "format=png" --data-urlencode "retina=true" --data-urlencode "block_cookies=true" --data-urlencode "response_type=image" -o docs/settings-panel.png
The retina=true doubles resolution so screenshots stay sharp in documentation viewed on high-DPI screens. Run this as a post-deploy step and your docs always show the current UI. No more "screenshot update sprint" every quarter.
Customer website captures for social proof
Your marketing site shows logos of companies using your product. But logos alone are weak social proof. A screenshot of the customer actually using your product - your widget on their site, your analytics dashboard in their workflow, your integration in their stack - tells a stronger story.
Capture customer websites that feature your product visibly. Use these in case studies, testimonial sections, landing page social proof blocks. full_page=true for case study deep dives, viewport capture at 1280x800 for social proof thumbnails. Schedule monthly re-captures so the screenshots stay current as customers update their sites.
For SaaS products embedded on customer sites (chat widgets, analytics scripts, review badges), inject CSS to highlight your component with css parameter - add a subtle border or background to draw attention to your product in the screenshot.
Serverless screenshot generation
SaaS products built on serverless stacks cannot run headless Chrome in a Lambda function. The binary is too large, cold starts take too long, memory limits are too tight. If your product generates screenshots as part of its workflow - PDF reports, thumbnail generation, visual diffs - offloading the browser to an API removes that infrastructure constraint entirely.
Call the API from your Lambda function, Cloudflare Worker, Vercel edge function, or any serverless runtime. You skip the browser binary and the Puppeteer dependency entirely. Memory spikes disappear. The response comes back as an image or a JSON payload with the screenshot URL - either works in a serverless context.
More on this architecture: serverless screenshot generation.
Developer-first integration
SaaS teams are developers. The API is a single GET endpoint with query parameters - no SDK required, no client library to maintain, no breaking changes on major version bumps. Test it with curl, integrate it in Python or Node.js, run it in CI. Same call structure everywhere.
For high-volume product features (generating thumbnails, rendering link previews), the webhook parameter processes captures asynchronously. Fire the request, receive a callback at your endpoint when the screenshot is ready. No long-polling, no babysitting timeouts in your application code.
The free tier gives you 200 screenshots per month - enough to build the integration, test it in staging, and ship it to a subset of users before scaling up. Add cache_ttl to avoid re-capturing unchanged URLs and stretch your quota further.
Same API, every screenshot workflow
Product thumbnails, visual regression tests, changelog images, link previews, competitor captures, documentation screenshots. Different teams inside the same SaaS company need screenshots for completely different reasons, but the underlying call is identical. One API key, one endpoint, one set of parameters you already know.
Start with the use case that hurts most - usually visual testing or product-embedded thumbnails. The second integration takes fifteen minutes because the hard part (setting up the API key and wiring auth) is already done. Everything after that is just a new URL and maybe a different viewport size.
FAQ#
Yes. Call the API server-side when a user adds a website, store the returned image in your storage, and serve it as a thumbnail. The response_type=image option returns raw bytes you can upload directly to S3 or any object store. For JSON workflows, response_type=json returns a hosted screenshot URL you can reference without storing the file yourself.
Capture your app at key viewports after each deploy. Compare the new screenshots against stored baselines using pixel-diff tools like Pixelmatch or reg-suit. If the difference exceeds your threshold, fail the build. The API handles the browser rendering - you handle the comparison logic in your CI pipeline.
Most captures finish in 2-5 seconds depending on page complexity and the delay parameter you set. For product features where latency matters (link previews, thumbnail generation), set a shorter delay and use cache_ttl to serve cached results for repeated URLs. The webhook parameter handles async workflows where you fire the request and receive a callback when done.
The API is designed for serverless. No browser binary to bundle, no Chromium dependency. Call it from Lambda, Cloudflare Workers, Vercel functions, or any environment that can make an HTTP GET request. Response sizes are typically under 200KB for WebP thumbnails.
Use the cache_ttl parameter. Set it to 86400 (24 hours) for pages that change daily, or 604800 (7 days) for static pages. The API returns a cached result if the same URL was captured within the TTL window. This reduces your usage count and speeds up response time for repeated URLs.
Yes. Pass session cookies via the cookies parameter or custom auth headers via the headers parameter. Set up a service account for your app, grab its session credentials, and include them in the API request. The API renders the page as an authenticated user would see it.