Cloudflare Workers are a serverless compute platform that allows you to run your code in the cloud.

They are widely known for being extremely cost effective, scalable, and secure.

Most recently, Cloudflare’s fork of Puppeteer has allowed integration with Browserbase’s APIs and SDKs.

Using Cloudflare Workers, developers can leverage the full capabilities of the Puppeteer API as they would in a traditional environment, enhanced with additional developer tools from Browserbase.

Cloudflare Workers currently only supports JavaScript and TypeScript.

Below is a quick example of using Browserbase with Cloudflare Workers on Typescript.

Using Browserbase with Puppeteer on Cloudflare Workers (Browser Rendering and Pages Functions) requires you to be on Cloudflare’s Paid Plan.

Add Browserbase to your Cloudflare Workers