DEV Community

dlfmadldlfmaek
dlfmadldlfmaek

Posted on

I Built a Free Screenshot API Because I Was Tired of Wrestling With Puppeteer

Raise your hand if you've been here before.

You need to generate a screenshot of a URL. Simple enough, right? So you spin up Puppeteer. Then you spend three hours debugging why it won't launch in your Docker container. Then you discover your memory usage tripled. Then you learn that headless Chrome crashes on your cheapest VPS tier.

All you wanted was a PNG.

I went through this loop more times than I care to admit — for OG image generation, PDF invoice exports, uptime monitoring screenshots, thumbnail generation. The problem is always the same: running a headless browser is painful infrastructure that has nothing to do with your actual product.

So I built SnapAPI — a dead-simple screenshot and PDF API. One HTTP call, one image or PDF back. That's it.


What SnapAPI Does

  • A screenshot (PNG/JPEG) of any URL
  • A PDF generated from any URL
  • Configurable viewport, full-page capture, custom dimensions

No SDK to install. No Puppeteer dependency. Just a REST API.


See It In Action

cURL

curl "https://api.snapapi.dev/v1/screenshot?url=https://example.com&format=png&width=1280&height=720" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o screenshot.png
Enter fullscreen mode Exit fullscreen mode

JavaScript

const response = await fetch(
  "https://api.snapapi.dev/v1/screenshot?" + new URLSearchParams({
    url: "https://example.com",
    format: "png",
    width: "1280",
    height: "720",
  }),
  {
    headers: { Authorization: "Bearer YOUR_API_KEY" },
  }
);
const blob = await response.blob();
Enter fullscreen mode Exit fullscreen mode

Python

import requests

response = requests.get(
    "https://api.snapapi.dev/v1/screenshot",
    params={"url": "https://example.com", "format": "png", "width": 1280, "height": 720},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
)

with open("screenshot.png", "wb") as f:
    f.write(response.content)
Enter fullscreen mode Exit fullscreen mode

Real Use Cases

  1. OG Image Generation — Dynamic social previews with one POST request
  2. PDF Invoices — Design in HTML/CSS, convert server-side
  3. Uptime Monitoring — Screenshot evidence when sites go down
  4. Link Preview Thumbnails — Notion-style link cards

Pricing vs. Competitors

SnapAPI ScreenshotOne ScreenshotAPI
Free tier 100/mo Limited trial Limited trial
Pro plan $9/mo $19/mo $19/mo
Business $29/mo $79/mo $49/mo
PDF export Yes Yes Partial

Same core capabilities at a fraction of the cost.


Get Started Free

snapshot-api-gamma.vercel.app — 100 screenshots/month, no credit card required.

Stop fighting your browser infrastructure. Ship the thing you actually want to build.

Top comments (0)