AnchorBrowser allows you to upload and use Chrome extensions in your browser sessions. This lets you add ad blockers, privacy tools, or any other extension to enhance your browsing automation.

For uploading, listing, and managing extensions, see the interactive API documentation.

Getting Extensions from Chrome Web Store

To use extensions from the Chrome Web Store, you’ll need to download and inspect their files:

Download Extension Files

  1. Install CRX Extractor/Downloader - Add this extension to your browser to download .crx files
  2. Navigate to the extension you want on the Chrome Web Store
  3. Click the CRX Extractor icon and download the .crx file
  4. Rename the file from .crx to .zip
  5. Extract the ZIP to inspect the contents

Inspect Extension Contents

Once extracted, you’ll see the extension’s files:

  • manifest.json - Contains extension metadata and permissions
  • background.js or service_worker.js - Background scripts
  • content_scripts/ - Scripts that run on web pages
  • popup.html - Extension popup interface
  • icons/ - Extension icons

Repackage for Upload

After inspecting (and optionally modifying) the files:

  1. Select all files and folders in the extracted directory
  2. Create a new ZIP file containing all the extension files
  3. Upload this ZIP to AnchorBrowser using the API

Extension Requirements

Your extension ZIP file must contain a valid manifest.json with basic extension information like name and version.

Example Manifest

{
  "manifest_version": 3,
  "name": "My Extension",
  "version": "1.0.0",
  "description": "Extension description",
  "permissions": ["activeTab", "storage"],
  "background": {
    "service_worker": "background.js"
  },
  "content_scripts": [{
    "matches": ["<all_urls>"],
    "js": ["content.js"]
  }]
}

Code Examples

JavaScript/Node.js

import fs from 'fs';
import FormData from 'form-data';

async function uploadExtension() {
  const form = new FormData();
  form.append('name', 'My Custom Extension');
  form.append('file', fs.createReadStream('./my-extension.zip'));
  
  const response = await fetch('https://api.anchorbrowser.io/api/v1/extensions', {
    method: 'POST',
    headers: {
      'anchor-api-key': 'your_api_key_here',
      ...form.getHeaders()
    },
    body: form
  });
  
  const result = await response.json();
  return result.data.id;
}

// Use the extension in a session
async function createSessionWithExtension(extensionId) {
  const response = await fetch('https://api.anchorbrowser.io/api/v1/sessions', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'anchor-api-key': 'your_api_key_here'
    },
    body: JSON.stringify({
      session: {
        extensions: [extensionId]
      }
    })
  });
  
  return response.json();
}

Limitations

  • Maximum extension size: 50MB per ZIP file
  • Extensions must be valid Chrome extensions