To capture a screenshot with Cloudflare Browser Rendering, create an API token with Browser Rendering permission, then POST a JSON request to the account’s /browser-rendering/screenshot endpoint. Save the binary response as an image. Set screenshotOptions.fullPage for a full-page capture, and use gotoOptions and authentication options when the page needs extra load time or access credentials.
What you need before making a screenshot request
- A Cloudflare account ID and an API token with the Browser Rendering Write permission for REST API use. Cloudflare’s API reference lists that permission for the endpoint: Browser Rendering documentation.
- A publicly reachable page URL, or HTML to render. The endpoint accepts
urlorhtml; supply at least one. - A way to save the HTTP response body as binary data. The screenshot response is image bytes, not JSON image data.
If the capture runs inside a Cloudflare Worker, you can instead use a Browser Run binding and call env.BROWSER.quickAction("screenshot", ...); that binding path does not require an API token. Use REST when an external application should call Cloudflare directly, and a binding when the capture belongs in a Worker.
Capture a basic screenshot with the REST API
Replace <accountId> and <apiToken> with your Cloudflare account ID and token. This request follows Cloudflare’s documented URL example and writes the returned image bytes to screenshot.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
Cloudflare describes the endpoint as processing the page’s HTML and JavaScript before capturing the rendered page. The documented default viewport is 1920 × 1080. For more control, include a viewport object and screenshotOptions in the JSON request.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
Full-page capture with a chosen viewport
Set fullPage to true to capture beyond the initial viewport. This example uses a 1280 × 720 viewport and waits for network activity to settle, with a 45-second navigation timeout.
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://cloudflare.com/",
"screenshotOptions":{"fullPage":true},
"viewport":{"width":1280,"height":720},
"gotoOptions":{"waitUntil":"networkidle0","timeout":45000}
}'
--output cloudflare-full.png
Full-page output can be much taller than a viewport screenshot. If a large capture appears blurry, increase deviceScaleFactor in the viewport configuration; the trade-off is a larger output image.
Choose the right screenshot and navigation options
Page extent and element targeting
screenshotOptions.fullPagecaptures the full page rather than just the current viewport.screenshotOptions.clipdefines a rectangular region to capture.screenshotOptions.selectortargets a specific CSS-selected element. Use it when the page contains a component or region you need without surrounding content.
Format, background, and fidelity
screenshotOptions.typeselects the output image type.screenshotOptions.omitBackgroundcan omit the background for transparency where the chosen output format supports it.qualityis not compatible with the default PNG format. Choose a supported JPEG or other format before supplying quality.viewportcontrols the browser viewport dimensions. The default is 1920 × 1080.deviceScaleFactorincreases pixel density; consider it for large viewports or sharper output, while accounting for increased image size.
Readiness and timeouts
Use gotoOptions to control navigation waiting and timeout. The advanced Cloudflare example uses waitUntil: "networkidle0", which is useful when a page’s content depends on network-loaded resources. Pages that continually poll or maintain open connections may not reach network idle, so choose a readiness condition appropriate to the site rather than assuming every page settles the same way. The API reference gives actionTimeout a maximum of 120,000 milliseconds.
Change what the browser loads or renders
Cloudflare documents addScriptTag and addStyleTag for injecting scripts or styles before capture. Request and resource allowlists can constrain what the browser loads. These controls can help tailor a capture, but blocking required scripts, stylesheets, fonts, or images can change the result or leave the page incomplete.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Capture a page that requires authentication
For REST requests, Cloudflare documents cookies, HTTP Basic Authentication through authenticate, and custom request headers through setExtraHTTPHeaders. Use only credentials intended for the target page, and avoid putting secrets directly into source code or logs. Store them in your application’s secret manager and construct the request body at runtime.
Authentication choices
- Cookies: supply the session cookies needed by the site. This is generally appropriate when a browser session has already been established.
- HTTP Basic Auth: use the documented
authenticateoption for pages protected by Basic Authentication. - Custom headers: use
setExtraHTTPHeadersfor authorization or other headers the site requires.
Authentication only grants access if the target site accepts the supplied credentials and permits the browser request. A login flow that depends on interactive steps may require additional handling beyond supplying a cookie or header.
Use the Workers Browser Run binding instead
When a Worker is the right place to run the capture, bind Browser Run and invoke env.BROWSER.quickAction("screenshot", ...). This path does not require the REST API token used by an external client. Use Cloudflare’s Browser Rendering documentation for the current binding setup and method parameters: Cloudflare Browser Rendering.
The choice is primarily about where the call runs and how it authenticates: REST is an external HTTP call with a Bearer token, while the binding is called from a Worker without an API token. Check the applicable operational limits for your plan and deployment before designing a high-volume capture workload.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Save and handle the response correctly
The screenshot endpoint returns image bytes. In curl, use --output rather than printing the response to the terminal. In application code, write the response body as binary data and check the HTTP status before treating it as an image; an error response should not be saved under a successful screenshot filename.
- Choose a file extension that matches the requested output type.
- For asynchronous application workflows, record the URL, options, HTTP status, and relevant error response so failures can be diagnosed.
- For large full-page captures, allow adequate memory and storage for the returned image and downstream processing.
Rate limits, reliability, and cost planning
Cloudflare documents a Browser Rendering REST API limit of 10 requests per second (600 per minute) for Workers Paid plans, following a change effective March 4, 2026. That figure is specific to the documented plan and REST API limit; do not assume it applies unchanged to other plans or the Workers binding workflow. See the Cloudflare changelog.
Handle HTTP 429 responses as rate limiting: back off before retrying, add jitter when coordinating multiple workers, and avoid immediate retry loops that increase load. Set a bounded retry policy so a persistently throttled request does not consume unbounded time or queue capacity. Capture duration and image size also affect your application’s throughput and storage, even when requests stay below the API rate limit.
The cited endpoint documentation does not establish a price for each screenshot or an all-in capture cost. Before estimating cost, confirm the current Cloudflare plan, Browser Rendering terms, and any related usage charges for your account. This also helps distinguish request-rate capacity from billing and other plan limits.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsRank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Troubleshooting common failures
401 or 403 responses
Check that the token is sent as Authorization: Bearer ..., belongs to the intended account, and has Browser Rendering Write permission. If running inside a Worker binding, verify the binding configuration rather than trying to reuse an external REST token.
The output file is JSON or not a valid image
The server may have returned an error body rather than screenshot bytes. Inspect the HTTP status and response body, then fix the request or access issue before saving the response as an image.
The page is blank or missing content
Increase the navigation timeout or adjust the wait condition in gotoOptions. Check whether required resources were excluded by allowlists, and whether the page needs cookies, Basic Auth, or custom headers. A page that never becomes network-idle may need a different readiness strategy.
Quality is rejected or output format is wrong
Do not send quality with the default PNG format. Select a supported JPEG or other format when using quality, and ensure the output filename extension matches the response type.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
429 rate-limit response
Reduce concurrency or queue requests and retry with a delay and bounded backoff. For Workers Paid REST traffic, the documented limit is 10 requests per second as of March 4, 2026; confirm the applicable limit for your plan rather than assuming that number applies universally.
Or skip the browser setup
If you want a screenshot API without managing a browser request and its rendering options yourself, ScreenshotNeo is an alternative. One GET request returns a screenshot or PDF, and its API accepts familiar parameter names used by other screenshot APIs. See the ScreenshotNeo API documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before the shot; each cleanup step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with response headers indicating the page verdict and billing status. Its MCP server provides screenshot and page-info tools for AI agents, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Frequently Asked Questions
Can the Cloudflare screenshot endpoint capture HTML instead of a URL?
Yes. The endpoint accepts either a URL or HTML as its rendering input; at least one is required.
Recommended Free Tools
Can I capture just one element on the page?
Yes. Set the screenshot selector option to a CSS selector for the element you want.
Does Cloudflare’s screenshot endpoint return JSON?
A successful screenshot request returns image bytes. Save the response body as a binary file and check the HTTP status to distinguish an error response.
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.

