Skip to content

Quick Actions

Last updated View as MarkdownAgent setup

Quick Actions provide simple interfaces for common browser tasks like capturing screenshots, extracting HTML content, generating PDFs, and more. You can use Quick Actions in two ways:

  • REST API: HTTP endpoints for one-off requests or external integration.
  • Workers Bindings: Call Quick Actions directly from a Cloudflare Worker using env.BROWSER.quickAction().

The following are the available options:

/crawl is available via the REST API only.

Use Quick Actions when you need a fast, simple way to perform common browser tasks such as capturing screenshots, extracting HTML, or generating PDFs without writing complex scripts. For more advanced automation, custom workflows, or persistent browser sessions, use Puppeteer, Playwright, or CDP.

Before you begin

REST API

To use Quick Actions via the REST API, create a custom API Token with the following permissions:

  • Browser Run - Edit

Workers binding

To use Quick Actions from a Worker, configure a browser binding in your wrangler.json. No API token is needed when using the Workers binding.

{
  "browser": {
    "binding": "BROWSER"
  }
}

Test Quick Actions locally

Under npx wrangler dev, .quickAction() uses a Chrome instance on your machine. It returns the same responses and errors as Browser Run, with two exceptions:

  • The json action returns placeholder data, because Workers AI is not available locally. If a field in response_format.json_schema sets const, enum, or default, it gets that value, or the first enum entry. Other fields get an empty value, such as "", 0, false, or []. Wrangler also logs a warning.
  • The Kitesurf browser is not available. If you pass browser: "kitesurf", .quickAction() throws an error.

To get real json results or use Kitesurf during local development, set "remote": true in your browser binding configuration:

{
  "browser": {
    "binding": "BROWSER",
    "remote": true
  }
}

Was this helpful?