Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To capture a rendered website with Cloudflare, send a POST request to https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/screenshot with a URL (or supplied HTML) and a token that has browser-rendering write access. Cloudflare’s 2026 documentation now calls the product Browser Run; the account-scoped route is still documented under browser-rendering. The response is an image file containing the page after its HTML and JavaScript have been processed.
What Cloudflare’s screenshot action does
The screenshot quick action is a stateless, single-request browser task. It accepts exactly one primary input: url for a remotely reachable page or html for markup you provide. Cloudflare renders the document, runs its JavaScript, and captures the resulting page. Use the REST endpoint for an external service or script; use the Workers browser binding when the capture belongs inside a Worker request.
Cloudflare announced the Browser Run name on April 15, 2026, while current API reference examples retain the /browser-rendering/screenshot path. That naming difference is expected, not a second endpoint.
Prerequisites and permissions
- A Cloudflare account with Browser Rendering available.
- Your account ID.
- An API token scoped to browser rendering. The quick-action guide labels the permission
Browser Rendering - Edit; the API reference calls the accepted permissionBrowser Rendering Write. - A target URL reachable by Cloudflare’s browser, unless you send HTML instead.
Create a narrowly scoped token and keep it in an environment variable or secret manager. Never commit it to a repository or place it in client-side JavaScript.
#1 Best Overall
- Easily record quick videos of your screen and camera that offer the same connection as a meeting without the calendar wrangling
- Draw on your screen as you record video with customizable arrows, squares, and step numbers to emphasize important information
- Provide clear feedback and explain complex concepts with easy-to-use professional mark-up tools and templates
- Instantly create a shareable link where your viewers can leave comments and annotations or upload directly to the apps you use every day
- Version Note: This listing is for Snagit 2024. Please note that official technical support and software updates for this version are scheduled to conclude on December 31, 2026.
Capture a URL with the REST API
The following is the smallest practical request. Replace both placeholders and save the binary response as a PNG.
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/screenshot'
-H 'Authorization: Bearer <apiToken>'
-H 'Content-Type: application/json'
-d '{"url":"https://example.com"}'
--output screenshot.png
The endpoint returns image bytes by default. The API reference also documents binary and base64 encoding choices when your application needs JSON-safe data instead of a file stream. Treat the command as a template: substitute your real account ID, token, URL, and capture options.
Send HTML instead of a URL
For generated markup, send html rather than url. Do not send both in the same request.
Free tools Windows power users keep installed
One-click scans. No signup required.
curl -X POST 'https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-rendering/screenshot'
-H 'Authorization: Bearer <apiToken>'
-H 'Content-Type: application/json'
-d '{"html":"<!doctype html><html><body><h1>Invoice</h1></body></html>"}'
--output invoice.png
Choose viewport, page extent and output
Viewport versus full page
A normal viewport capture uses viewport width and height. The quick-action guide documents a default of 1920×1080. To capture the entire document, set screenshotOptions.fullPage to true; this is different from making a very tall viewport because the browser calculates the document’s scrollable height.
{
"url": "https://example.com/docs",
"viewport": {"width": 1440, "height": 900},
"screenshotOptions": {"fullPage": true}
}
One element or a rectangle
Use selector with a valid CSS selector when you need one component, such as #pricing or .hero. Use clip for a rectangular crop with x, y, width, and height coordinates.
Rank #2
- Record videos and take screenshots of your computer screen including sound
- Highlight the movement of your mouse
- Record your webcam and insert it into your screen video
- Edit your recording easily
- Perfect for video tutorials, gaming videos, online classes and more
Format, quality and transparency
PNG, JPEG and WebP are supported. If you set quality, also choose a non-PNG type: Cloudflare states that quality with the default PNG format returns HTTP 400. For custom HTML that should retain transparency, set omitBackground so the default white background is removed.
Pixel density
Increase deviceScaleFactor when a large viewport appears soft. Cloudflare’s guide shows 2 for a 3600×2400 example; it is an example rather than a universal quality setting. Higher density increases image dimensions and processing cost in your own storage and transfer pipeline.
Wait for JavaScript applications
“Navigation finished” does not always mean a single-page application has finished drawing. An early capture can be blank or missing data. Start with a readiness condition tied to the content you need:
gotoOptions.waitUntil: "networkidle0"waits for a quiet network.gotoOptions.waitUntil: "networkidle2"allows limited ongoing connections.waitForSelectorwaits for a known element, such as[data-rendered="true"].waitForTimeoutprovides a fixed delay when no reliable selector exists, but it is less robust than a content condition.
The API schema lists maximum values of 60,000 milliseconds for navigation timeout and 120,000 milliseconds for action and selector timeouts. These are accepted maxima, not a promise that every site will finish within those periods.
{
"url": "https://app.example.com/dashboard",
"gotoOptions": {"waitUntil": "networkidle2", "timeout": 60000},
"waitForSelector": {"selector": "main[data-loaded]", "timeout": 120000}
}
Authenticated and controlled captures
For protected pages, the current guide demonstrates session cookies, HTTP Basic Authentication through authenticate, and token authentication through setExtraHTTPHeaders. Use test credentials with the minimum access required, and keep secrets out of request logs and examples.
Rank #3
- Screen capture software records all your screens, a desktop, a single program or any selected portion
- Capture video from a webcam, network IP camera or video input device
- Use video overlay to record your screen and webcamsimultaneously
- Intuitive user interface to allow you to get right to video recording
- Save your recordings to ASF, AVI, and WMV
Other documented controls include a custom user agent, JavaScript enablement, request and resource allow/reject filters, and injected scripts or styles. These are useful for removing analytics traffic, applying print CSS, or reproducing the conditions under which your application is tested. A URL still must be reachable from the remote browser; private localhost addresses are not automatically accessible.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →REST API or Workers binding?
| Route | Best fit | Authentication in the example | Control model |
|---|---|---|---|
| REST quick action | CI jobs, backend services and external scripts | Bearer token with browser-rendering permission | One HTTP request returning an image |
| Workers binding | A capture embedded in a Cloudflare Worker flow | Uses the Worker binding; no separate API token in the binding example | Call env.BROWSER.quickAction("screenshot", ...) |
Quick actions are intentionally stateless. If you need multiple interactions, persistent browser state, or direct control for existing Playwright, Puppeteer, CDP or Stagehand scripts, use browser sessions instead. A session is a better fit for clicking through a workflow than a single screenshot action.
Workers example
Inside a Worker configured with a Browser Rendering binding, invoke the quick action in your request handler. The exact binding configuration belongs in your Worker project; the important distinction is that the call stays inside Cloudflare’s execution flow.
export default {
async fetch(request, env) {
const result = await env.BROWSER.quickAction("screenshot", {
url: "https://example.com",
screenshotOptions: { type: "png", fullPage: true }
});
return new Response(result, {
headers: { "Content-Type": "image/png" }
});
}
};
Common errors and fixes
401 or 403 authorization errors
Check the account ID, token spelling and scope. REST requires the browser-rendering permission; a general-purpose token without that permission is insufficient. Rotate a token that may have leaked.
Invalid input or a request rejected for both inputs
Send exactly one of url or html. Validate JSON quoting and ensure the URL includes its scheme, such as https://.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchRank #4
- Capture video directly to your hard drive
- Record video in many video file formats including avi, wmv, flv, mpg, 3gp, mp4, mov and more
- Capture video from a webcam, network IP camera or a video input device (e.g.: VHS recorder)
- Screen capture software records the entire screen, a single window or any selected portion
- Digital zoom with the mouse scroll wheel, and drag to scroll the recording window
Blank or incomplete image
The page probably needed client-side rendering. Add networkidle0 or networkidle2, preferably alongside waitForSelector for the element that proves the page is ready. Confirm that the selector exists in the rendered DOM, not only in server-side source.
HTTP 400 after adding quality
Set a supported non-PNG output type, such as JPEG or WebP, before using quality. Cloudflare explicitly documents that quality is incompatible with default PNG.
Timeout
Reduce unnecessary resources with request filters, choose a realistic readiness selector, and increase the relevant timeout only up to the documented schema maximum. A longer timeout cannot fix a page that never reaches the requested condition.
HTTP 429
The API reference shows a 429 example with code 2001 and the message “Rate limit exceeded.” Treat it as a rate-limit response, back off and retry according to your application’s policy. The example does not establish a universal quota for every account.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP or PDF, with options for full-page and element captures, device presets, custom waits, authentication headers, cookies, geolocation, JavaScript, blocking rules, caching, signed links, async webhooks and bulk capture.
Best Value
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
It removes cookie-consent banners, newsletter popups and chat widgets before capture. Bot checks, blank pages, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.
See the ScreenshotNeo API documentation for all options. cURL:
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)
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}`);
The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Operational checklist
- Use a least-privilege token and secret storage.
- Choose viewport, full-page, selector or clip deliberately.
- Pair dynamic pages with a selector or network-idle condition.
- Choose JPEG or WebP before setting quality.
- Log HTTP status and response headers, and retry 429s with backoff.
- Use browser sessions rather than quick actions for multi-step automation.
Frequently Asked Questions
Can I capture a page without hosting HTML publicly?
Yes. Send the page as the request’s html input instead of url; provide exactly one of those inputs.
Does fullPage mean an unlimited-length screenshot?
It requests the document’s full scrollable page, but practical limits still come from browser, timeout and response-size constraints.
Which wait strategy should I choose first?
Prefer waitForSelector for a known, content-specific readiness signal; use networkidle0 or networkidle2 when no reliable selector exists.
The Bottom Line
Use Cloudflare’s account-scoped screenshot endpoint for a straightforward rendered capture, add explicit readiness and output settings for real applications, and switch to a browser session when the job becomes interactive.
Quick Recap
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.

