A custom Chrome Extension is necessary for some use cases to enable advanced browser features. Extension support with headless Chrome has always been limited, but with Browserbase, it’s easy.

1

Upload your custom Extension

First, upload an extension to get its id.

  • You must upload a valid Chrome Extension in a .zip file format containing a manifest.json at the root.
  • Starting a session with a Chrome Extension will increase session creation time slightly, as we have to load the extension and restart the browser.
2

Create a Session

Then, create a new session using the Session API create session endpoint. Make sure to include the extensionId parameter.

3

Verify that the extension is loaded

Finally, let’s connect to the session using the session id to confirm your extension is loaded by using the following snippet: