LogoLogo
SupportDashboard
  • Community
  • Welcome to Hyperbrowser
  • Get Started
    • Quickstart
      • AI Agents
        • Browser Use
        • Claude Computer Use
        • OpenAI CUA
      • Web Scraping
        • Scrape
        • Crawl
        • Extract
      • Browser Automation
        • Puppeteer
        • Playwright
        • Selenium
  • Agents
    • Browser Use
    • Claude Computer Use
    • OpenAI CUA
  • HyperAgent
    • About HyperAgent
      • HyperAgent SDK
      • HyperAgent Types
  • Quickstart
  • Multi-Page actions
  • Custom Actions
  • MCP Support
    • Tutorial
  • Examples
    • Custom Actions
    • LLM support
    • Cloud Support
      • Setting Up
      • Proxies
      • Profiles
    • MCP Examples
      • Google Sheets
      • Weather
        • Weather Server
    • Output to Schema
  • Web Scraping
    • Scrape
    • Crawl
    • Extract
  • Sessions
    • Overview
      • Session Parameters
    • Advanced Privacy & Anti-Detection
      • Stealth Mode
      • Proxies
      • Static IPs
      • CAPTCHA Solving
      • Ad Blocking
    • Profiles
    • Recordings
    • Live View
    • Extensions
    • Downloads
  • Guides
    • Model Context Protocol
    • Scraping
    • AI Function Calling
    • Extract Information with an LLM
    • Using Hyperbrowser Session
    • CAPTCHA Solving
  • Integrations
    • ⛓️LangChain
    • 🦙LlamaIndex
  • reference
    • Pricing
    • SDKs
      • Node
        • Sessions
        • Profiles
        • Scrape
        • Crawl
        • Extensions
      • Python
        • Sessions
        • Profiles
        • Scrape
        • Crawl
        • Extensions
    • API Reference
      • Sessions
      • Scrape
      • Crawl
      • Extract
      • Agents
        • Browser Use
        • Claude Computer Use
        • OpenAI CUA
      • Profiles
      • Extensions
Powered by GitBook
On this page
  • Uploading an Extension
  • Using an Extension
Export as PDF
  1. Sessions

Extensions

Using Extensions with Hyperbrowser

Hyperbrowser allows you to enhance your browser sessions with custom Chrome extensions.

Uploading an Extension

To use a custom extension with Hyperbrowser:

  1. Create your extension as a directory containing at least a manifest.json file

  2. Compress the directory into a ZIP archive, make sure to zip all the files and not the directory itself

  3. Upload the ZIP file using the Extensions API:

import { Hyperbrowser } from "@hyperbrowser/sdk";
import { config } from "dotenv";
config();

const hbClient = new Hyperbrowser({ apiKey: process.env.HYPERBROWSER_API_KEY });

const uploadExtension = async () => {
  const resp = await hbClient.extensions.create({
    name: "new-extension",
    filePath: "custom-extension.zip",
  });
  console.log(resp);
};

uploadExtension();
import asyncio
import os
from hyperbrowser import AsyncHyperbrowser
from hyperbrowser.models.extension import CreateExtensionParams
from dotenv import load_dotenv

load_dotenv()

hb_client = AsyncHyperbrowser(api_key=os.getenv("HYPERBROWSER_API_KEY"))


async def upload_extension():
    res = await hb_client.extensions.create(
        CreateExtensionParams(name="new-extension", file_path="custom-extension.zip")
    )
    print(res)


if __name__ == "__main__":
    asyncio.run(upload_extension())

The API will return an id that you'll use to attach the extension to a session.

Using an Extension

To use your uploaded extension in a Hyperbrowser session, simply add it in the extensionIds field of the Create Session params:

import { Hyperbrowser } from "@hyperbrowser/sdk";
import { config } from "dotenv";
config();

const hbClient = new Hyperbrowser({ apiKey: process.env.HYPERBROWSER_API_KEY });


const useExtensionInSession = async () => {
  const resp = await hbClient.sessions.create({
    extensionIds: ["<EXTENSION_ID>"],
  });
  console.log(resp);
};

useExtensionInSession();
import asyncio
import os
from hyperbrowser import AsyncHyperbrowser
from hyperbrowser.models.session import CreateSessionParams
from dotenv import load_dotenv

load_dotenv()

hb_client = AsyncHyperbrowser(api_key=os.getenv("HYPERBROWSER_API_KEY"))


async def use_extension_in_session():
    res = await hb_client.sessions.create(
        CreateSessionParams(extension_ids=["<EXTENSION_ID>"])
    )
    print(res)


if __name__ == "__main__":
    asyncio.run(use_extensionin_session())

Once added to a session, these extension behave exactly as they would in a real browser.

PreviousLive ViewNextDownloads

Last updated 2 months ago

Refer to the for more details on uploading and managing extensions.

Extensions API Reference