Limited lifetime deal. Grab it Now →

What is a Screenshot API?

A screenshot API is a web service that converts a URL or HTML into a hosted image with a single HTTP request. You send a URL, it renders the page in a real browser, captures the visual output, and returns a hosted image URL - typically in under two seconds. No browser to install, no infrastructure to maintain.


The one-sentence definition

A screenshot API lets your application capture any webpage as an image by making a single API call, instead of running and maintaining a headless browser yourself.

How it works

  1. You send a request - a POST or GET to the API endpoint containing the URL you want to capture, plus any options (viewport size, format, full-page vs cropped, device type).
  2. The API renders the page - a headless browser (Chromium) loads the URL, executes JavaScript, waits for dynamic content to finish loading, and applies any pre-capture instructions like hiding cookie banners or injecting CSS.
  3. You get an image back - the API returns a hosted CDN URL pointing to your screenshot, typically PNG, JPEG, or WebP. Some APIs also support PDF output.

A basic request looks like this:

POST https://api.peekshot.com/v1/screenshots
{
  "url": "https://example.com",
  "format": "png",
  "full_page": true
}

Response:

{
  "screenshot_url": "https://cdn.peekshot.com/sc_x8k2.png",
  "captured_at": "2026-04-01T09:12:44Z"
}

Why use a screenshot API instead of building it yourself?

Running headless Chrome yourself is straightforward - until it isn't. Here is what teams discover once they go down that path:

Problem What it means in practice
Memory leaks Chromium is RAM-hungry. Long-running processes accumulate and crash.
SPA rendering failures Single-page apps render blank if the browser doesn't wait for JavaScript to hydrate.
Cookie banners Screenshots capture GDPR popups unless you write logic to dismiss them.
Chrome update breakage Browser updates regularly break rendering in headless mode.
Scaling under load Each headless browser instance is a heavy process - traffic spikes cause timeouts.
3am incidents Puppeteer crashes are on-call incidents for your engineering team.

A screenshot API moves all of that to managed infrastructure. When Chrome updates, the API provider handles it. When a page needs a longer wait, you pass a parameter. When you need 500 screenshots at once, the API scales horizontally. Your engineering team does none of that work.


What screenshot APIs are used for

Link previews - When you paste a URL into Slack, Notion, or a CMS and a thumbnail appears, that thumbnail often comes from a screenshot API called at share time.

OG image generation - SaaS products and blogs use HTML-to-image APIs to generate dynamic Open Graph images for every page: personalized, branded, rendered from a template at request time.

Visual regression testing - QA teams capture screenshots of key pages before and after a deploy, then diff them to catch unintended UI changes.

Competitor monitoring - Marketing and SEO teams schedule weekly screenshots of competitor pricing pages, landing pages, or SERPs to track changes over time without manual visits.

Client reporting - Agencies generating monthly reports capture screenshots of client sites, ad placements, or analytics dashboards automatically and append them to the report.

Compliance archiving - Legal and compliance teams use timestamped screenshots to document the state of a webpage: terms of service, pricing, cookie notices, at a specific moment in time.

AI agent tooling - Autonomous AI agents increasingly need to "see" what a webpage looks like. Screenshot APIs give agents a visual representation of any URL without requiring a browser.


Screenshot API vs HTML to Image API - what's the difference?

These are two related but distinct capabilities:

URL to screenshot - You provide a live URL. The API fetches and renders the live page, including all its current content, dynamic elements, and third-party assets. Best for capturing real websites.

HTML to image - You POST raw HTML and CSS directly to the API. The API renders exactly what you send, with no network requests to external resources. Best for generating images from templates: OG images, certificates, social cards, PDFs.

PeekShot supports both in the same platform, under the same account and pricing.


What to look for in a screenshot API

Not all screenshot APIs are equivalent. These are the factors that matter most:

Rendering engine - The API should use a real Chromium-based browser. Lighter engines miss JavaScript-rendered content and produce broken screenshots of modern sites.

SPA and dynamic content support - Single-page apps built with React, Vue, or Next.js need the browser to wait for JavaScript to finish running before capture. Look for configurable wait conditions.

Clean screenshots - Cookie banners, GDPR consent modals, and ad overlays ruin screenshots. A good API removes them automatically or lets you inject CSS to hide specific elements.

Full-page capture - Some pages require scrolling to see all content. Full-page capture auto-scrolls and stitches the result into a single image.

CDN hosting - Every screenshot should return a hosted URL, not raw bytes you have to store yourself. Global CDN delivery means the image loads fast wherever it's embedded.

Supported outputs - PNG, JPEG, WebP, and PDF are the standard formats. Retina (2x/3x) output matters for high-DPI displays and marketing materials.

No-code access - Developer APIs are table stakes. Platforms that also offer a dashboard let non-technical team members, marketers, agencies, operations, use the same tool without writing code.


How much does a screenshot API cost?

Pricing models vary across providers:

  • Credit-based - Each screenshot consumes one credit. Plans are priced by credit volume per month. Most common model.
  • Pay-as-you-go - You pay per screenshot with no monthly commitment. Better for low or unpredictable volume.
  • Flat monthly - Fixed price for a fixed number of screenshots per month. Easier to budget.

As a reference point, PeekShot starts at $9/month for 2,000 screenshots (roughly $0.0045 per capture) with all four products (URL to image, HTML to image, scheduled, and bulk) included in every plan. A 100-screenshot free trial requires no credit card.

Building and maintaining equivalent headless Chrome infrastructure typically costs more than $150/month once you account for EC2 instances, S3 storage, engineering time, and on-call overhead.


Frequently asked questions

What image formats does a screenshot API support?

Most screenshot APIs return PNG, JPEG, and WebP. Some also support PDF output for full-page documents. PeekShot supports all four formats on every plan.

Can a screenshot API capture pages that require login?

Yes. You can pass session cookies or authentication headers with the request so the API captures the authenticated state of a page, not the login screen.

How does a screenshot API handle single-page apps?

Good screenshot APIs wait for JavaScript to finish executing before capturing. This means React, Vue, Next.js, and other SPA frameworks render correctly instead of producing a blank or partially loaded screenshot.

How long does a screenshot API call take?

Most requests complete in one to three seconds for standard pages. Pages with heavy JavaScript or large assets may take longer. APIs like PeekShot support async capture with webhook delivery for workflows where you don't want to wait synchronously.

What's the difference between a screenshot API and Puppeteer?

Puppeteer is a Node.js library for controlling a headless Chrome browser directly. It gives you full control but requires you to run, maintain, and scale the browser infrastructure yourself. A screenshot API is a managed service: you call an endpoint and get an image back, with no browser to operate.

Can I schedule recurring screenshots without writing code?

PeekShot includes a no-code scheduling dashboard. You configure a URL, pick a frequency (daily, weekly, or monthly), and screenshots run automatically. No cron jobs, no scripts.

What is bulk screenshot capture?

Bulk capture lets you upload a CSV of URLs and receive a screenshot for every row. PeekShot processes the list in parallel and emails you the original CSV back with a new column of hosted screenshot URLs appended.


Related