
Why Do Screenshot APIs Take 21 Seconds? I Built One That Does It in 2
I benchmarked screenshot APIs on RapidAPI. The fastest took 6 seconds. Most took 14-21 seconds. Some had 74% uptime. So I built my own. It does screenshots in 2.1 seconds and PDFs in 1.2 seconds. The Problem If you've ever tried to programmatically capture a webpage, you know the pain: Self-hosted Puppeteer = server maintenance, memory leaks, Chrome crashes Screenshot-as-a-service APIs = slow (6-21 seconds), expensive ($50-300/month), unreliable (74-94% uptime) Playwright in CI = fine for tests, terrible for production APIs I needed something fast, reliable, and cheap. So I built it on Apify's Standby infrastructure. The Architecture The secret to sub-3-second delivery is browser pre-warming : On startup, launch Chromium via Puppeteer and keep it running For each request, create a new page (not a new browser) Navigate, wait for network idle, capture Close the page, return the result Cache results for 10 minutes (same URL + same params = instant) This avoids the 3-5 second cold start th
Continue reading on Dev.to Webdev
Opens in a new tab



