Browser Run – Use Browser Run Quick Actions directly from Workers

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. Your Worker communicates with Browser Run directly over Cloudflare’s network, resulting in simpler code and lower latency.

With the quickAction() method you can:

To get started, add a browser binding to your Wrangler configuration:

  • wrangler.jsonc

    {
    "compatibility_date": "2026-03-24",
    "browser": {
    "binding": "BROWSER"
    }
    }
  • wrangler.toml

    compatibility_date = "2026-03-24"
    [browser]
    binding = "BROWSER"

Then call any Quick Action directly from your Worker. For example, to capture a screenshot:

  • JavaScript

    const screenshot = await env.BROWSER.quickAction("screenshot", {
    url: "https://www.cloudflare.com/",
    });
  • TypeScript

    const screenshot = await env.BROWSER.quickAction("screenshot", {
    url: "https://www.cloudflare.com/",
    });

The quickAction() method requires a compatibility date of 2026-03-24 or later.

For setup instructions and the full list of available actions, refer to Browser Run Quick Actions.

Comments

Leave a Reply

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