Headless Browser Quick Actions, Content Extraction, and Worker Bindings
How Cloudflare Browser Run Quick Actions and REST endpoints extract JSON, Markdown, and links, and how Workers bindings and CDP fit together.
This page summarizes Cloudflare Browser Run documentation (the product formerly called Browser Rendering). Browser Run runs managed headless browser workloads on Cloudflare’s network so you can capture pages, extract content, automate with Puppeteer or Playwright, and feed agent workflows—without operating your own browser fleet.
Browser Run lets you run full browser sessions on Cloudflare’s global network, drive them with code or AI, record and replay sessions, crawl pages for content, debug in real time, and let humans intervene when your agent needs help.
— Cloudflare, Browser Rendering is now Browser Run
Browser Run: when to use Quick Actions, sessions, or crawl
Section titled “Browser Run: when to use Quick Actions, sessions, or crawl”Browser Run offers three common shapes of work. Quick Actions are one-shot HTTP or binding calls: pass a URL (or HTML) and get a screenshot, PDF, rendered HTML, Markdown, links, structured JSON, an accessibility tree, or several formats at once. Browser sessions connect over the Chrome DevTools Protocol (CDP) with @cloudflare/puppeteer, @cloudflare/playwright, or any CDP client—best for multi-step automation, Live View, Human in the Loop, and session recordings. The /crawl endpoint discovers and renders many pages asynchronously for RAG, monitoring, or site-wide extraction, with robots.txt respected by default.
| Approach | Best for | Auth typical path |
|---|---|---|
| REST Quick Actions | Single URL, no Worker deployed | API token on api.cloudflare.com |
quickAction() on browser binding |
Same actions inside a Worker, lower latency | Browser binding in Wrangler |
| CDP WebSocket | Full automation, agents, MCP clients | API token in WebSocket headers |
/crawl |
Many pages, job polling | API token |
The Browser Rendering REST API is Generally Available on Workers Free and Paid plans, so you can prototype Quick Actions without a paid Workers plan, subject to product limits.
Quick Actions REST API: extract Markdown, links, and structured JSON
Section titled “Quick Actions REST API: extract Markdown, links, and structured JSON”Quick Actions use POST under https://api.cloudflare.com/client/v4/accounts/<accountId>/browser-run/ (older docs still show browser-rendering in paths; new examples use browser-run). Each call loads the page in a managed browser and returns JSON (or binary for screenshots/PDFs).
/markdown: convert a rendered page to Markdown
Section titled “/markdown: convert a rendered page to Markdown”The Markdown endpoint is the straightforward way to turn a live URL into text suitable for pipelines or models.
This example fetches the Markdown representation of a webpage.
— Cloudflare, Extract Markdown from a webpage
You send url in the JSON body with a Bearer API token. The response wraps the Markdown string in result.
/links: get all links from a page (including hidden anchors)
Section titled “/links: get all links from a page (including hidden anchors)”The links endpoint returns a JSON array of absolute URLs found in the DOM.
This example grabs all links from the Cloudflare Doc’s homepage ↗︎. The response will be a JSON array containing the links found on the page.
— Cloudflare, Retrieve links from a webpage
Set visibleLinksOnly to true when you only want links that are visible on the page; the default is false, which includes links that are not visibly rendered.
/json: capture structured data with a prompt, JSON Schema, or both
Section titled “/json: capture structured data with a prompt, JSON Schema, or both”The /json endpoint uses on-platform extraction to turn page content into structured data—optionally guided by natural language and constrained by a schema.
Prompt plus JSON Schema gives the steadiest shape for downstream code:
This example captures webpage data by providing both a prompt and a JSON schema. The prompt guides the extraction process, while the JSON schema defines the expected structure of the output.
— Cloudflare, Capture structured data using AI
The request uses response_format.type of json_schema and embeds a JSON Schema under response_format.json_schema. Required fields in the schema (for example name on product objects) enforce minimum structure in result.
Prompt only is useful for quick experiments; Cloudflare notes the response is not guaranteed to match a fixed schema:
In this example, only a prompt is provided. The endpoint will use the prompt to extract the data, but the response will not be structured according to a JSON schema. This is useful for simple extractions where you do not need a specific format.
— Cloudflare, Capture structured data using AI
Schema only still returns structured JSON, with the schema alone defining fields to fill—for example product name and link properties.
/snapshot, /accessibilityTree, and multi-format capture
Section titled “/snapshot, /accessibilityTree, and multi-format capture”If you need more than one representation in a single round trip, use /snapshot with a formats array. Cloudflare expanded /snapshot so it is not limited to HTML plus screenshot:
Browser Run’s /snapshot endpoint now supports a formats parameter that lets you return multiple page formats in a single API call. Previously, /snapshot returned only HTML content and a screenshot. You can now also include Markdown and the accessibility tree in the same response.
— Cloudflare, New formats parameter for the Browser Run /snapshot endpoint
You must request at least two formats; for one format alone, Cloudflare directs you to the dedicated endpoint (such as /markdown or /screenshot).
For agent navigation without screenshots or raw HTML, /accessibilityTree returns roles, names, states, values, and hierarchy:
An accessibility tree is the browser’s structured view of a rendered page: roles, names, states, values, and hierarchy.
— Cloudflare, New Browser Run endpoint for accessibility trees
Options such as interestingOnly and root trim noise or scope a subtree—see the linked changelog for parameters.
REST responses can include an X-Browser-Ms-Used header reporting browser milliseconds for that request (changelog).
Workers quickAction(): same Quick Actions without REST tokens
Section titled “Workers quickAction(): same Quick Actions without REST tokens”From a Worker, the browser binding’s quickAction() method calls Browser Run over Cloudflare’s network—no separate API token or outbound REST hop.
You can now call Browser Run Quick Actions directly from a Cloudflare Worker using the quickAction() method on the browser binding. This simplifies how Workers interact with Browser Run by removing the need for API tokens or external HTTP requests.
— Cloudflare, Use Browser Run Quick Actions directly from Workers
Supported actions include screenshot, pdf, content, markdown, json, scrape, links, and snapshot (Quick Actions).
Wrangler browser binding setup
Section titled “Wrangler browser binding setup”Declare a binding in Wrangler—name it as you like (BROWSER, MYBROWSER, etc.):
A browser binding will provide your Worker with an authenticated endpoint to interact with a dedicated Chromium browser instance.
— Cloudflare, Wrangler
Example pattern from Get started:
{ "compatibility_date": "2026-10-29", "browser": { "binding": "BROWSER" }}quickAction() requires compatibility_date of 2026-03-24 or later (Quick Actions, Get started).
Local development and quickAction()
Section titled “Local development and quickAction()”quickAction() is not supported in vanilla local wrangler dev without remote execution:
When developing locally with wrangler dev, you must use npx wrangler dev –remote or set “remote”: true in your browser binding configuration. Without remote mode, you will receive the error: The RPC receiver does not implement the method “quickAction”.
— Cloudflare, Quick Actions
Puppeteer-, Playwright-, and CDP-based Workers can still use local wrangler dev per Wrangler.
Typed session helpers (acquire(), launch(), Live View, DevTools targets, outboundByHost) live on the binding—see Browser binding API and the session and DevTools methods changelog.
CDP sessions, Playwright, and MCP clients
Section titled “CDP sessions, Playwright, and MCP clients”For full control, connect to the CDP WebSocket endpoint with Puppeteer Core, @cloudflare/playwright, or chrome-devtools-mcp:
Browser Rendering now exposes the Chrome DevTools Protocol (CDP), the low-level protocol that powers browser automation.
— Cloudflare, Browser Rendering adds Chrome DevTools Protocol (CDP) and MCP client support
Playwright on Workers is GA and synced with upstream versions per Playwright and the Playwright GA changelog. Stagehand (beta) combines code with natural-language steps using Workers AI—see Stagehand.
MCP setup for Claude Desktop, Cursor, OpenCode, and similar clients is documented in Using with MCP clients (CDP). You can also deploy @cloudflare/playwright-mcp as a Worker (Playwright MCP).
Sessions can accept multiple concurrent CDP connections if each client uses its own browser context (Connect multiple clients to one Browser Run session).
Kitesurf vs default Chromium for Quick Actions
Section titled “Kitesurf vs default Chromium for Quick Actions”Kitesurf is Cloudflare’s stateless, agent-oriented browser engine—lighter on CPU and memory for tasks like screenshots and HTML extraction, with trade-offs on pixel-perfect rendering and some site types (Kitesurf).
Compared to Chromium, Kitesurf uses 3–7× less CPU and memory for common agentic tasks like screenshots and HTML extraction, so you can run more sessions and scale better for bursty, AI-driven workloads.
— Cloudflare, Introducing Kitesurf, an agent-first browser on Browser Run
Opt in with browser=kitesurf on Quick Action URLs or CDP query parameters. In agent tooling, Kitesurf is scoped to its CDP WebSocket and does not support session reuse, pause/resume, Live View, recording, keepAliveMs, or Kitesurf-backed Quick Actions in some session modes (Browser tools – Kitesurf). Leave browser unset for full Chromium behavior (video, WebGL, bot challenges, long-lived auth)—see When to use Kitesurf.
Limits, dashboard, and guardrails
Section titled “Limits, dashboard, and guardrails”Paid-plan limits were raised with the Browser Run rename—for example concurrent browsers per account 30 → 120, new instances 30/minute → 1/second, and REST API rate 3 → 10 requests per second (Browser Rendering is now Browser Run). The dashboard Runs tab lists Quick Actions and sessions together (same changelog).
Guardrails restrict which hostnames a session may request—useful when rendering untrusted HTML or keeping automation on approved domains (Control which hostnames Browser Run sessions can access).
For multi-page extraction, /crawl runs async jobs, honors robots.txt, and cannot bypass bot detection or captchas (Crawl entire websites). It supports a contentUse parameter aligned with Content Signals use in robots.txt (Crawl contentUse).
Human workflows can pause for login or confirmation via structured Human in the Loop CDP commands (Cloudflare.handoff, Cloudflare.handoffComplete)—see Human in the Loop. Browser Run requests are still identified as bot traffic even when a human uses Live View.
WebMCP lets sites expose callable tools to agents; Browser Run supports it on lab Chrome (lab=true) and Kitesurf via document.modelContext (WebMCP).
Common mistakes when using Quick Actions
Section titled “Common mistakes when using Quick Actions”- Calling
env.BROWSER.quickAction()locally withoutwrangler dev --remoteor"remote": trueon the browser binding (Quick Actions). - Using a
compatibility_datebefore2026-03-24while relying onquickAction()(Use Browser Run Quick Actions directly from Workers). - Expecting
/jsonwith prompt only to match a strict schema—useresponse_formatwithjson_schemafor production-shaped output (json endpoint). - Requesting a single format via
/snapshotinstead of/markdown,/screenshot, or/accessibilityTree(snapshot formats changelog). - Choosing Kitesurf for video, WebGL, or strict TLS fingerprinting needs that require Chromium (Kitesurf limitations).
- Assuming
/crawlcan defeat captchas or arbitrary bot walls (crawl endpoint changelog).
How to check this on your site
Section titled “How to check this on your site”-
In the Cloudflare dashboard, open Browser Run and use Playground to run a Quick Action against your URL; confirm output and copy generated cURL or binding code (Playground changelog).
-
From your machine,
POSTthe same action to the REST path (for example/markdownor/json) with a token that has Browser Rendering edit permission; compareresultto what you see in a normal browser (Markdown endpoint, json endpoint). -
If you use Workers, deploy with a browser binding per Get started and log responses from
quickAction("markdown", { url })orquickAction("links", { url }). -
Inspect the
X-Browser-Ms-Usedresponse header on REST Quick Actions and correlate with the Browser Run usage view described in Quick Actions. -
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page does not match the official Browser Run docs, email yimasynthetic@gmail.com with the page URL and the exact statement you believe is wrong or unclear.