Use Cloudflare Browser Run’s screenshot Quick Action from a Worker binding: validate the requested URL, call env.BROWSER.quickAction("screenshot", options), and return its response as an image. This is a compact way to make a thumbnail endpoint without putting a Browser Run API token in the Worker’s request code. The guidance below follows Cloudflare’s documentation checked on October 3, 2026; it is not a report of independently tested or deployed code.
How the thumbnail endpoint works
Browser Run’s screenshot Quick Action loads a page, processes its HTML and JavaScript, then captures the rendered page. Cloudflare documents the endpoint as rendering the webpage before taking the screenshot. A Worker can invoke this action through a browser binding and return the resulting response to its caller. For a small thumbnail service, the flow is:
- Accept and validate a URL from the caller.
- Pass the URL and capture settings to
env.BROWSER.quickAction("screenshot", options). - Return the Quick Action response, preserving its output type and status.
The Quick Action accepts a URL or supplied HTML. A URL is appropriate for capturing an existing site; HTML is useful when the thumbnail should depict a custom preview card instead. See Cloudflare’s Browser Run documentation for the current options and service details.
Configure the Worker browser binding
Add a browser binding named BROWSER to the Worker’s Wrangler configuration. The current Quick Action method requires a Worker compatibility date of 2026-03-24 or later. For example, the relevant portion of wrangler.toml is:
#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.
compatibility_date = "2026-03-24"
[browser]
binding = "BROWSER"
Use your project’s existing configuration and a current compatibility date that meets this minimum. Cloudflare’s binding and Quick Action setup guidance is at Browser Run documentation.
Local development requirement
quickAction() is not supported by wrangler dev in local mode yet. Use wrangler dev --remote, or configure the browser binding with remote: true. This means a successful local-only preview is not an appropriate way to verify the Quick Action integration.
Build a URL-to-thumbnail Worker
This documentation-based example uses the Worker binding, rejects malformed or non-HTTP URLs, and returns the Quick Action response. It intentionally does not claim to bypass destination-site access controls.
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.
export default {
async fetch(request, env) {
const incoming = new URL(request.url);
const target = incoming.searchParams.get("url");
if (!target) {
return new Response("Missing required url parameter", { status: 400 });
}
let page;
try {
page = new URL(target);
} catch {
return new Response("Invalid URL", { status: 400 });
}
if (page.protocol !== "https:" && page.protocol !== "http:") {
return new Response("Only http and https URLs are supported", { status: 400 });
}
try {
return await env.BROWSER.quickAction("screenshot", {
url: page.href,
viewport: { width: 1200, height: 630 },
screenshotOptions: {
type: "jpeg",
quality: 80
},
gotoOptions: {
waitUntil: "networkidle2"
}
});
} catch (error) {
return new Response("Screenshot capture failed", { status: 502 });
}
}
};
The 1200 × 630 viewport and JPEG quality are example choices, not Cloudflare defaults. Cloudflare documents a default viewport of 1920 × 1080 and device scale factor of 1. Confirm the current screenshot-option names and accepted values in the Quick Action documentation before changing the capture settings. The quality option is incompatible with PNG; use a supported alternative such as JPEG when setting quality.
Outdated 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 matchWindows 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 reinstallValidate input for your deployment
The sample prevents missing, malformed, and non-HTTP(S) values, but public thumbnail endpoints need stricter controls. Otherwise, callers may use the Worker to request arbitrary destinations. Consider an allowlist of hostnames, authentication or quotas for callers, and limits on acceptable URL length. If you allow arbitrary hosts, assess the abuse and network-access risks for your own deployment rather than treating basic URL parsing as sufficient protection.
Choose framing and readiness settings
Viewport, full page, clipping, or one element
Use viewport to set the browser window dimensions. For a card thumbnail, a fixed landscape viewport usually gives predictable framing. If the target is a tall page, the screenshot options include full-page capture; use clipping when only a rectangle is needed, or the documented selector option to capture a particular element. These modes produce different image dimensions and framing, so select one based on the consumer’s display requirements.
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.
For higher pixel density, configure deviceScaleFactor. Cloudflare notes that a large viewport at the default scale factor of 1 may look blurry; increasing the scale factor can improve resolution. It also increases output dimensions, so check file size and downstream display behavior. Cloudflare documents related options such as viewport, full-page capture, clipping, waiting controls, and output format controls in its screenshot API reference.
Wait for client-rendered pages
The default page-load event can fire before a JavaScript-heavy page or single-page application has painted the content you want. Cloudflare recommends gotoOptions.waitUntil: "networkidle0" or "networkidle2" when waiting for network activity to settle. If the page has a stable, known element that marks readiness, a selector-based wait such as waitForSelector can be more targeted and may finish sooner than waiting for network activity to stop.
Network-idle is not always the best readiness signal: pages with ongoing analytics, polling, or other background requests may not become idle promptly. A selector wait is more precise when you know the element that signals useful content has appeared. The documented default browser timeout is 60 seconds; treat that as a service default, not a promise that every page will render within that time.
Rank #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
Understand the binding and REST choices
| Approach | When it fits | Credentials and setup |
|---|---|---|
Worker binding with env.BROWSER.quickAction() |
The screenshot endpoint runs inside a Cloudflare Worker. | Configure the binding and compatibility date. The binding avoids putting a Browser Run API token in the Worker request code. |
| Browser Run REST screenshot endpoint | An external service or one-off request needs to call Browser Run directly. | The endpoint is POST https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-run/screenshot; access requires a custom API token with Browser Rendering - Edit permission. |
The REST endpoint is not necessary for the Worker-centered implementation above. Keep its token out of browser-facing code if you choose REST for a separate integration. Cloudflare also documents a related snapshot endpoint that can return HTML and a screenshot together; it is more relevant when a client needs extracted page content as well as an image, rather than a thumbnail alone.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Plan around Browser Run limits
Cloudflare’s limits documentation checked on October 3, 2026 lists these Browser Run allowances. They are service limits, not throughput benchmarks or performance guarantees; check the current limits and pricing before production capacity planning.
| Plan or setting | Documented limit | What it means for a thumbnail endpoint |
|---|---|---|
| Free plan | 10 minutes of Browser Run usage per day | Daily browser time can constrain the number and complexity of captures. |
| Free plan | 1 Quick Actions request every 10 seconds | Requests arriving more frequently may be rate-limited. |
| Workers Paid default | 30 Quick Actions requests per second | This is the documented default request rate, not a guarantee of page-rendering speed. |
| Workers Paid browser time | No browser-hours cap | The limits page lists no browser-hours cap for Workers Paid. |
Cloudflare documents HTTP 429 responses when rate or browser-time limits are exceeded. Your endpoint should handle unsuccessful captures without treating them as images: preserve or map error status codes deliberately, return a useful message to your caller, and avoid retry loops that add more load while a limit is active.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsBest 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.
Troubleshoot common capture failures
- Binding or method unavailable: Check that the binding is named
BROWSER, that the Worker has a compatibility date of at least2026-03-24, and that local development is usingwrangler dev --remoteor a remote browser binding. - Blank or incomplete thumbnail: The page may render important content after the default load event. Try the documented network-idle wait or wait for a selector associated with the content.
- Capture times out: The documented default browser timeout is 60 seconds. The page may be slow or may keep network activity open; use a more targeted readiness signal where appropriate and review current capture limits.
- 429 response: Cloudflare documents this for rate or browser-time limit conditions. Check the plan’s current limits, reduce request pressure, and return a controlled error to the caller instead of repeatedly retrying immediately.
- Low-resolution or blurry output: The documented default device scale factor is 1. Increase it when higher pixel density matters, while accounting for larger images.
- Quality setting rejected: The
qualityparameter is incompatible with PNG. Select a supported format such as JPEG when using quality. - Destination blocks or challenges the capture: A configurable user agent does not bypass bot protection. Cloudflare says Browser Run requests remain identifiable as bots; do not present a user-agent override as a way to defeat a site’s access controls.
Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. Its one-call API can return an image or PDF, and its clean-shot processing accepts cookie or consent banners like a visitor before removing more than 60 known consent platforms, newsletter popups, and chat widgets. Those cleanup steps can be turned off individually. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; responses identify the page verdict and billing status in headers. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.
For a simple screenshot call, use cURL:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Replace the example target with the page you need to capture and supply your access key. See the ScreenshotNeo API documentation for request options. One thousand screenshots per month are free with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Can a Cloudflare Worker accept HTML instead of a page URL?
Yes. Browser Run’s screenshot Quick Action accepts either a URL or supplied HTML, which is useful for rendering a custom preview card rather than capturing an existing site.
Does changing the browser user agent get past a site’s bot protection?
No. Cloudflare says Browser Run requests remain identifiable as bots; a configurable user agent is not a way to bypass destination-site protections.
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 →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.

