For your own sites, a screenshot API is a headless browser behind a URL. An agent builds it in one sitting with Playwright and Fastify: viewport and full-page options, PNG, JPEG, WebP and PDF output, a disk cache and an ad and cookie-banner filter. Because it also fetches arbitrary URLs for you, it needs an SSRF guard that refuses private addresses, which is the part to review. What you cannot copy is the scale side: stealth against bot protection, residential IPs in chosen countries, and rendering thousands of pages without flaky failures.
Before you buildCheck the free plan first: ScreenshotOne gives 100 screenshots a month on every account, which covers occasional use.
Build me a screenshot API for my own sites to replace ScreenshotOne. Requirements: - Node.js 22 + TypeScript: a Fastify server, `npm start` serves http://localhost:4890. `GET /take?url=...&access_key=...` returns the image; `POST /take` takes the same options as JSON, plus `html` to render a string instead of a URL. - Rendering: Playwright Chromium with one warm browser and a pool of POOL_SIZE contexts (default 3). Options: viewport_width, viewport_height, device_scale_factor, full_page, selector, delay (ms), wait_until (load or networkidle), dark_mode, user_agent, timeout (30 s), format (png, jpeg, webp, pdf) and image_quality. - Cleanup: block ads and trackers with `@ghostery/adblocker-playwright` and hide cookie banners with an EasyList cookie list; `block_ads` and `block_cookie_banners` default to true. - Cache: SQLite (better-sqlite3) at ./data/cache.db with files in ./data/cache/, keyed by a hash of all options; `cache_ttl` in seconds (default 14 days) and `cache=false` to skip. Count only successful uncached renders in a monthly counter and answer 429 past MONTHLY_LIMIT. - Auth: API keys stored hashed, created with `npm run key -- add <name>`, with a per-key rate limit (@fastify/rate-limit). - Safety: resolve the host first and refuse 127.0.0.0/8, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, ::1 and fc00::/7; repeat the check on every redirect and sub-request through page.route, so the API cannot reach your internal network. - One operator. No accounts, no telemetry. Outbound calls: only the pages you ask for. - Out of scope: stealth mode, proxies and exit-country choice, scrolling videos, a dashboard, billing. - README: a Dockerfile on the Playwright base image, `npx playwright install-deps` for a bare Linux box, and a warning that sites with bot protection block datacentre IPs.
Opens your agent with the prompt filled in, you press enter. Or copy it and paste it into an empty folder.
The first prompt builds the core. Run these one at a time in the same folder to grow it into your own ScreenshotOne.
Add an OG image endpoint to the screenshot API in this folder. Requirements: - GET /og/<template>?title=...&subtitle=... renders an HTML template from ./templates/ at 1200x630 and returns PNG. - Escape every query value, and load fonts from ./fonts/ so renders do not wait on the network. - Cache by template and values, and add two example templates. - Update the README.
Add scheduled captures to the screenshot API in this folder. Requirements: - A schedules table (url, options, cron expression) managed with `npm run schedule -- add|list|remove`. - Run each schedule with node-cron, store the image and a pixelmatch difference ratio against the previous capture. - Write a line to ./data/changes.log when the ratio passes a per-schedule threshold. - Update the README.
Extend the screenshot API in this folder. Requirements: - With `store=s3` upload the render with @aws-sdk/client-s3 to the bucket, endpoint and credentials set in .env (works with R2 and MinIO) and return a JSON body with the object URL. - Support signed GET URLs with an expiry in seconds. - Fall back to local storage when the upload fails and say so in the response. - Update the README.
A product that takes thousands of screenshots a month does not want to run Chromium itself. Memory leaks, zombie processes, pages that hang and sites that block datacentre IPs are the cost of owning it, and the plan prices make that ops work someone else's.
Estimate · Free on your own machine; a small VPS runs roughly $5 to $6 a month. The build is token usage on your agent plan.
| Plan | Monthly | Annual, per month | What you get |
|---|---|---|---|
| Basic | $17 | $14.17 | 2,000 screenshots a month, 40 requests a minute, extra screenshots at $0.009 each. |
| Growth | $79 | $65.83 | 10,000 screenshots a month, 80 requests a minute, extra at $0.006; adds IP location choice, scrolling screenshots and video. |
| Scale | $259 | $215.83 | 50,000 screenshots a month, 150 requests a minute, extra at $0.004; adds GPU rendering, priority support and wire transfer. |
100 screenshots a month on every account, with no credit card.
Yes. An AI coding agent such as Claude Code, Codex or Cursor can build a usable personal version in one session with the prompt on this page, running on your own machine.
About $17 a month on the Basic plan, $204 a year (checked 2026-10-19).
Stealth mode and rendering of pages behind bot protection; Choosing the exit country or IP for geo-specific pages; Scrolling screenshots and screen-capture videos; A managed fleet with rate limits, a dashboard, S3 upload, webhooks and signed links; Maintained filter lists and heuristics for ads and cookie banners. If any of those matter to you, keep paying.
Yes: shot-scraper (open source), Gotenberg (open source), Browserless (free).