DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
Automation

How to Use a Screenshot API: Capture Full-Page, Mobile and JavaScript-Rendered Websites

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A screenshot API takes a URL, opens it in a browser-controlled renderer, waits for the page to be ready, and returns an image, PDF, redirect, or JSON link. A reliable first request needs four things: an API key, the provider endpoint, the target URL, and code that handles the documented response type. Start with a small viewport capture, then add full-page, mobile, readiness, authentication and blocking options as your page requires.

What a screenshot API actually does

Unlike a browser extension, an API renders a page on a remote browser and sends the result to your application. The renderer can execute HTML, CSS and JavaScript, so it can capture pages that do not contain their final content in the initial response. Depending on the service, the response is either image/PDF bytes, JSON containing a hosted file URL, or an HTTP redirect to the file.

The minimum contract is usually:

  • Target: a public URL, and sometimes raw HTML.
  • Authentication: an API key, preferably in a server-side header.
  • Rendering settings: output format and viewport; optional full-page and wait controls.
  • Response handling: save bytes, follow a redirect, or parse JSON and download the returned URL.

Your first screenshot request

POST with a Bearer token

Screenshot API’s documented example uses POST, JSON and a Bearer key:

curl -X POST "https://api.screenshot-api.org/api/v1/screenshot" 
  -H "Authorization: Bearer YOUR_API_KEY" 
  -H "Content-Type: application/json" 
  -d '{"url":"https://example.com","format":"png","fullPage":false}'

That service documents both GET and POST. Its default response is JSON containing a CDN URL; adding redirect=1 returns a 302 redirect to the image or PDF. Parse JSON unless you deliberately request a redirect.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

POST that writes image bytes

ScreenshotEngine documents a binary response for successful requests and JSON for errors:

curl --fail-with-body --request POST 'https://api.screenshotengine.com/v1/screenshot' 
  --header "Authorization: Bearer $SCREENSHOTENGINE_API_KEY" 
  --header 'Content-Type: application/json' 
  --data '{"url":"https://example.com","format":"png","height":"full"}' 
  --output screenshot.png

--fail-with-body prevents an error document from being saved as if it were a PNG. Always check the HTTP status and content type before opening a response as an image.

GET versus POST

GET is convenient when the URL and a few simple options fit in a query string. POST is preferable for complex settings and keeps a key out of the URL when the provider supports header authentication. Parameter names can differ by method: ScreenshotEngine documents case-sensitive GET and POST names, so do not copy snake_case GET parameters into a camelCase JSON body without checking its reference.

Capture full-page and JavaScript content

Full-page mode

A normal capture is the initial viewport. Full-page mode grows the capture to the document’s scrollable height. Set it explicitly and choose a viewport that represents the layout you want. Very long pages can exceed provider height or file-size limits, so split them or use PDF output when the service supports it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wait for the page to be ready

Modern sites often render after navigation. Use the provider’s readiness controls in this order:

  1. Navigation condition: choose a documented waitUntil such as DOM-ready or network-idle.
  2. Selector wait: wait for a distinctive element that proves the application rendered.
  3. Bounded delay: add a short delay for animations or late data, but keep a maximum timeout.

Screenshot API documents waitUntil, waitForSelector and delayMs. A selector wait is usually more deterministic than sleeping for an arbitrary number of seconds. If a page polls forever, network-idle may never occur; use a selector plus a bounded timeout instead.

Viewport, mobile and visual controls

Viewport dimensions

Width and height are CSS pixels and affect responsive breakpoints. Use a desktop width for desktop output and a narrow width for mobile layout. A mobile screenshot is not merely a resized desktop image; the viewport can change navigation, typography and content.

Device scale and format

deviceScaleFactor (also called device scale or retina scale) increases physical pixel density without changing CSS layout. PNG preserves sharp text and transparency; JPEG is smaller for photographs; WebP often reduces size while retaining quality. Confirm that your chosen provider supports the format you need.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Useful rendering options

  • Dark-mode emulation for themes selected through media queries.
  • CSS selector capture for one component instead of the whole page.
  • Ad, tracker, cookie-banner and resource blocking where supported.
  • Custom headers, cookies and HTTP authentication for protected pages.
  • Custom user agent, timezone and geolocation for localized rendering.

Authenticated pages and HTML input

Never put a production key in browser JavaScript, a public repository or a client-visible URL. Keep calls on your server and store secrets in environment variables. For a protected page, send the provider the required cookies, headers or authorization settings through its documented server-side options.

Cloudflare Browser Run documents an endpoint that accepts either a URL or raw HTML. That is useful when your application generates markup itself or when you need to render a controlled HTML string rather than navigate to a public address. The same endpoint documents navigation wait settings and full-page screenshot options.

Use ScreenshotNeo instead of managing a browser

ScreenshotNeo is the first service to try when you want a hosted screenshot API: it removes consent banners, newsletter popups and chat widgets before capture, bills only clean shots, and its paid entry plan is $5 for 3,000 shots.

One-call cURL example

See the complete parameter reference in the ScreenshotNeo documentation. The API returns the selected image or PDF directly:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

What ScreenshotNeo adds

  • Cookie and consent banners, newsletter popups and chat widgets are removed before the shot; each cleanup step can be disabled.
  • Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing. Response headers identify the page verdict and whether it was billed.
  • It supports full-page lazy-image loading, CSS-selector capture, dark mode, 12 device presets or custom viewports, retina scale, PDF settings, custom CSS and JavaScript, click-before-capture, selector or network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed image links, asynchronous jobs with signed webhooks, bulk capture for 100 URLs per call, usage reporting and an OpenAPI specification.
  • An MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

Plans

Plan Allowance Price
Free 1,000 shots/month No card
Starter 3,000 shots $5
Growth 15,000 shots $15
Pro 60,000 shots $39
Scale 250,000 shots $99
Business 1,000,000 shots $249

Yearly billing gives two months free, and every feature is included on every plan. Sign up for 1,000 free screenshots a month with no card.

Performance, reliability and cost decisions

Reduce latency and bytes

  • Request only the required format and dimensions.
  • Use a selector capture instead of a full page when you need one component.
  • Cache stable URLs with a provider TTL rather than rendering identical pages repeatedly.
  • Use asynchronous jobs and webhooks for slow, long or bulk captures.
  • Batch independent URLs when the service offers bulk requests.

Make automation reliable

Set an explicit timeout, retry only transient failures with exponential backoff, and record the provider’s status, verdict and request identifier. Do not retry authentication errors or invalid URLs. For scheduled jobs, store the original URL and rendering options alongside the output so a later comparison is reproducible.

Troubleshooting

The file is JSON, not an image

You likely received an error or a JSON-link response. Check the status code and content type, then parse JSON before saving bytes. With a binary provider, use --fail-with-body and inspect the error body.

The screenshot is blank

Verify the URL is reachable from the provider, increase the timeout, wait for a meaningful selector, and check whether a bot challenge or login blocks rendering. A page that needs credentials must receive its cookies or authorization settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Content is missing

Use full-page mode for below-the-fold material, network-idle or selector waits for client-rendered data, and a delay for animation-driven content. Lazy images may require scrolling support or a provider option that loads them.

Desktop layout appears on mobile

Set the viewport width explicitly and use a documented mobile preset when available. Device scale changes pixel density, not responsive CSS breakpoints.

Requests time out

Replace an unbounded network-idle wait with a selector and maximum delay, block unnecessary resources, and capture a smaller target. Check the destination’s own response time and redirect chain.

GET works but POST fails

Compare the method-specific parameter names, casing and content type. Keep authentication in the method’s documented header format and validate the JSON body before sending it.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choosing an API checklist

  • Does it return bytes, JSON or a redirect, and can your client handle errors safely?
  • Can it capture full pages, mobile widths and high-density output?
  • Does it wait for selectors, network idle or a bounded delay?
  • Can it accept HTML as well as URLs?
  • Are cookies, headers, authorization, geolocation and user-agent controls available?
  • What are the height, timeout, concurrency, quota and caching rules?
  • Can it produce PDFs, batch requests and asynchronous webhook jobs?
  • Are secrets kept in headers or server-side configuration rather than public query strings?

FAQ

Can I screenshot a page that requires login?

Yes, if the provider supports authenticated navigation and you supply valid cookies, headers or authorization from a secure server. A client-only key cannot safely provide this access.

Should I use PNG or WebP?

Choose PNG for lossless text or transparency, JPEG for photographic pages, and WebP when you want a smaller modern image and your consumers support it.

Is a screenshot API suitable for continuous monitoring?

Yes, provided you control retries, cache policy, timeouts and storage. Record rendering settings with each capture so visual changes can be diagnosed rather than mistaken for renderer differences.

Frequently Asked Questions

Can I screenshot a page that requires login?

Yes, if the provider supports authenticated navigation and you supply valid cookies, headers or authorization from a secure server. A client-only key cannot safely provide this access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Should I use PNG or WebP?

Choose PNG for lossless text or transparency, JPEG for photographic pages, and WebP when you want a smaller modern image and your consumers support it.

Is a screenshot API suitable for continuous monitoring?

Yes, provided you control retries, cache policy, timeouts and storage. Record rendering settings with each capture so visual changes can be diagnosed rather than mistaken for renderer differences.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.