Automation in Octo Browser: slashing the time costs

APRIL 10, 2025 ANTI-DETECT BROWSERS TUTORIALS
How to become a popular streamer from scratch
Artur Hvalei
Technical Support Specialist, Octo Browser
Working with a large number of profiles in an anti-detect browser requires significant effort, time, and resources — even with the most well-thought-out UX. The more profiles you manage, the more repetitive actions take up your working hours. However, many of these processes can be automated, saving you a lot of time.

Clients who use our API say it's one of the best among competitors. Making clicks, following links, adding data — any standard operation can be significantly sped up. In this article, we’ll show you how.

Table of contents

Where is Browser Automation Needed Most?

Performing repetitive actions manually consumes time that could be spent on more important tasks. Besides saving your time and focus, automation also helps prevent mistakes. Repeating the same action hundreds of times makes errors almost inevitable, e.g., setting wrong tags or launching profiles without assigning the correct proxies. Unlike humans, algorithms don’t make such mistakes. With a well-tested script, you can be sure everything is executed correctly.
Apart from solving general tasks, automation is especially useful in the following areas:
  • Affiliate marketing: Automate mass profile creation and setup, including cookies, proxies, extensions, and starting pages.
  • Account farming: Quickly create accounts in required geos and prep them automatically. Export all profiles on the export list.
  • Web scraping: Adjust request frequency per IP to safe levels, rotate proxies, and modify fingerprints in case of blocks.
  • E-commerce: Develop scripts for automating labor-intensive tasks and safely parsing competitor data.
  • Betting and bonus hunting: Simplify profile creation with required geolocations and fingerprint parameters. Automate mass actions across accounts to bypass betting limits.

Getting started with API

We have analyzed our users’ API calls and noticed that many teams are actively implementing scripts to manage profiles, in so doing changing the common approaches to multi-accounting. Many leaders of major affiliate marketing teams highlight the convenience of our API as one of Octo’s key advantages over competitors.

Our current API allows you to create profiles with the digital fingerprints you need, add proxies, assign tags, as well as start and stop automatic scenarios using any browser automation framework. You can also work with your profiles in a hybrid mode, making the most of combining the benefits of automation with the fine-tweaking traditional manual control of your accounts allows.
You can find your API token in the Additional settings of your Octo Browser Master Account

You can find your API token in the Additional settings of your Octo Browser Master Account

Your API token

Octo Browser gives you access to your API token starting with the Base subscription and higher. Your API call limits are determined by your subscription. If you have an Advanced subscription, you can further increase your API limits to 1,000 requests per minute (RPM) and 50,000 requests per hour (RPH). For even higher limits contact Customer Service.

Choosing the programming language

The topic of programming language selection is too broad to cover all possible language and library combinations here. In our example, we’ll use Node.js + Axios, as we have experience with this stack. Other languages, such as C or C#, may be faster, but each has its own features, fine points, and use cases. You can choose any language based on your experience.

Using AI to rewrite code

We love automation ourselves and always strive to optimize our work, so we use AI to rewrite code into the needed language. It’s quite simple: you can ask ChatGPT to convert code for you using the following prompt:
Convert this script in Node.js with Axios into Python with the Requests library.
//modules
const axios = require('axios');
//here is config. Paste your Octo API Token here and you can modify this for your personal needs
const config = {
    octo_token: "OCTO_API_TOKEN",
    octo_api_base_url: "https://app.octobrowser.net/api/v2/automation/",
    data: {
    extensions: ['aapfglkgnhmiaabhiijkjpfmhllaodgp@4.2.3'],
    bookmarks: [{ "name": "google", "url": "https://google.com" }, { "name": "facebook", "url": "https://facebook.com" }],
    start_pages: ["https://google.com", "https://facebook.com"]
    }
}

const OCTO_REMOTE_API = axios.create({
    baseURL: config.octo_api_base_url,
    timeout: 10000,
    headers: {
        'X-Octo-Api-Token': config.octo_token,
        'Content-Type': "application/json"
    }
});

//functions
async function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms * 1000));
}

async function check_limits(response) {
    let rpm = response.headers['x-ratelimit-remaining'];
    let rph = response.headers['x-ratelimit-remaining-hour'];
    if (rpm < 10) {
        console.log("Waiting a minute...");
        await sleep(60);
    }
    if (rph < 10) {
        console.log("Waiting an hour...");
        await sleep(3600);
    }
}

async function get_total_profiles(){
    const response = await OCTO_REMOTE_API.get('/profiles?page=0&page_len=10');
    const total_profiles = response.data.total_count;
    const total_pages = Math.ceil(response.data.total_count/100);
    console.log(`Total Profiles: ${total_profiles}\nTotal Pages: ${total_pages}`);
    await check_limits(response);
    return total_pages;
}

async function get_all_profiles_uuids(total_pages){
    let profiles = [];
    for (let i = 0; i < total_pages; i++) {
    let response = await OCTO_REMOTE_API.get(`/profiles?page=${i}&page_len=100`);
    await check_limits(response);
    profiles.push(...response.data.data);
    }
    return profiles;
}

async function patch_all_profiles(profiles){
    let updated = [];
    let not_updated = [];
    for (let profile of profiles) {
        try{
        const response = await OCTO_REMOTE_API.patch(`/profiles/${profile.uuid}`, config.data);
        await check_limits(response);
        updated.push(profile);
        console.log(`Successfully updated ${profile.uuid}`);
        } catch (error) {
            not_updated.push(profile);
            console.error(`ERROR: Can't patch profile ${profile.uuid}`);
        }
    }
    return [updated, not_updated];
}

//main process
(async () => {
    const total = await get_total_profiles();
    const profiles = await get_all_profiles_uuids(total);
    const [updated, not_updated] = await patch_all_profiles(profiles);
    console.log(`Finished process:\nUpdated: ${updated.length}\nNot updated: ${not_updated.length}`);
})();
Prompt to convert the script to ChatGPT.

Let’s feed the snippets to ChatGPT

Sure, here's the equivalent Python script using the Requests library:
import requests
import math
import time

# Config
config = {
    "octo_token": "OCTO_API_TOKEN",
    "octo_api_base_url": "https://app.octobrowser.net/api/v2/automation/",
    "data": {
        "extensions": ["aapfglkgnhmiaabhiijkjpfmhllaodgp@4.2.3"],
        "bookmarks": [
            {"name": "google", "url": "https://google.com"},
            {"name": "facebook", "url": "https://facebook.com"}
        ],
        "start_pages": ["https://google.com", "https://facebook.com"]
    }
}

# Session setup
session = requests.Session()
session.headers.update({
    "X-Octo-Api-Token": config["octo_token"],
    "Content-Type": "application/json"
})
session.timeout = 10

# Helper functions
def sleep(seconds):
    time.sleep(seconds)

def check_limits(response):
    rpm = int(response.headers.get("x-ratelimit-remaining", 0))
    rph = int(response.headers.get("x-ratelimit-remaining-hour", 0))
    
    if rpm < 10:
        print("Waiting a minute...")
        sleep(60)
    if rph < 10:
        print("Waiting an hour...")
        sleep(3600)

# API functions
def get_total_profiles():
    response = session.get(f"{config['octo_api_base_url']}profiles?page=0&page_len=10")
    response.raise_for_status()
    
    total_profiles = response.json()["total_count"]
    total_pages = math.ceil(total_profiles / 100)
    print(f"Total Profiles: {total_profiles}\nTotal Pages: {total_pages}")
    
    check_limits(response)
    return total_pages

def get_all_profiles_uuids(total_pages):
    profiles = []
    for i in range(total_pages):
        response = session.get(f"{config['octo_api_base_url']}profiles?page={i}&page_len=100")
        response.raise_for_status()
        
        check_limits(response)
        profiles.extend(response.json()["data"])
    
    return profiles

def patch_all_profiles(profiles):
    updated = []
    not_updated = []
    
    for profile in profiles:
        try:
            response = session.patch(
                f"{config['octo_api_base_url']}profiles/{profile['uuid']}",
                json=config["data"]
            )
            response.raise_for_status()
            
            check_limits(response)
            updated.append(profile)
            print(f"Successfully updated {profile['uuid']}")
        except Exception as e:
            not_updated.append(profile)
            print(f"ERROR: Can't patch profile {profile['uuid']} - {str(e)}")
    
    return updated, not_updated

# Main process
if __name__ == "__main__":
    try:
        total = get_total_profiles()
        profiles = get_all_profiles_uuids(total)
        updated, not_updated = patch_all_profiles(profiles)
        print(f"Finished process:\nUpdated: {len(updated)}\nNot updated: {len(not_updated)}")
    except Exception as e:
        print(f"Fatal error: {str(e)}")
Please note that the "requests" library needs to be installed in your Python environment for this script to work. You can install it using pip:
pip install requests
Also, replace "OCTO_API_TOKEN" with your actual token to make API requests.
Using ChatGPT to convert scripts

Using ChatGPT to convert scripts

Working with Puppeteer, Selenium, and Playwright libraries

Browser automation frameworks are generally made to work well with Google Chrome, which is based on Chromium. As Octo Browser is built on the Chromium kernel too, it interacts with these frameworks seamlessly.

Automation with Selenium

Selenium is a popular tool for automating browser actions, as it allows to model user actions on a website.

Key features
  • Automation of web tasks.
  • Works with dynamic websites that use JavaScript and AJAX.
Advantages
  • Flexibility and support for many programming languages.
  • Free to use with a large and active community.
  • Open-source.
Disadvantages
  • Slow and resource-consuming.
  • You need a good understanding of programming concepts.

Browser automation with Selenium allows you to optimize different profile tasks ranging from simple automation scripts to web crawlers that search for, collect, and interact with data from different online resources.

Selenium is well-known by those who have experience managing several accounts at once. It can be deployed right in the browser, and it can be used to mimic actions of a real human. However, Selenium isn't always the perfect solution, and its masking can be detected by several platforms, CloudFlare among them.

Puppeteer automation

Puppeteer is a Node.js library that allows you to automate work with Chromium-based browsers using the DevTools protocol.

Features
  • Powerful and flexible web actions automation tool.
  • Can interact with webpages as a regular browser.
  • There is an unofficial Python port known as Pyppeteer, and we have created a guide on connecting it.
Advantages
  • A great choice for working with dynamic websites and executing JavaScript code.
  • An easy and intuitive API that is easy to use and configure.
  • A free tool with an active community.
Disadvantages
  • Only supports JavaScript (Node.js), but there are unofficial ports for other languages. For example, a port for Python called Pyppeteer.
  • Resource-heavy; slower than some other libraries.

Playwright Automation

Playwright is a Node.js library that facilitates secure, quick and effective automation for Chromium, Firefox and WebKit using the same API.

Features
  • A code generation tool, CodeGen, is available. You can use it to avoid writing large amounts of repetitive code, which saves a lot of time.
  • You can slow down the speed of completing actions on a webpage by using the slowMo parameter, which brings the speed of completing these actions closer to real human values.
  • Natively supports working with Shadow DOM.
Advantages
  • Open source.
  • Easy to install and configure.
  • Supports all necessary browser engines.
  • Supports all three major OSs (macOS, Windows, Linux).
  • Supports all necessary programming languages (Python, Golang, Java, JS, C#).
  • Supports test runners (Mocha, Jest, Jasmine).
  • Integration with CI/CD tools (Jenkins, CircleCI, Azure Pipeline, TravisCI).
  • Automatic delays, so you don’t have to hard-code explicit delays.
  • The auto-wait function.
  • Parallel execution when you need to open multiple tabs simultaneously.
  • A comfortable Reporter.

Disadvantages
  • A relatively new product.
  • A relatively limited community.
  • No Ruby support.

API: Setting up the Environment

  1. Install Visual Studio Code to get started. Choose your OS and its type (32 or 64 bits).
  2. Install Node.js. Hit Enter twice during the installation to download additional packages in the PowerShell window.
  3. Create a new working folder in a convenient location. Open VS Code and press Ctrl + K + O, then select the folder you’ve just created.
  4. Install the NPM extension. It allows you to install packages for Node.js and ASP.NET Core and to control them. To do so, press Ctrl + P, and in the search window type ext install npm. Choose the first extension from the list that appears.
Installing the NPM extension in Visual Studio Code

Installing the NPM extension in Visual Studio Code

5. Install the Code runner extension. To do so, press Ctrl + P, and in the search window type ext install code runner. Install the first extension from the list.
6. Open the VS Code terminal and generate package.json using the command npm init -y. You will see the package.json file in the explorer and a corresponding message in the terminal.
7. Install the libraries using the command npm i axios puppeteer playwright in the VS Code terminal. You should see a new subfolder, node-modules, and a new file package-lock.json.

Useful snippets for multi-accounting in Octo Browser

You can use ready-made snippets from the Octo Browser API Knowledge Base, e.g., a ready-made script for getting the names of all profiles on your account.
//connecting modules
const fs = require('fs').promises;
const axios = require('axios');
//here is config. Paste your Octo API Token here
const config = {
    octo_token: "OCTO_API_TOKEN",
    octo_api_base_url: "https://app.octobrowser.net/api/v2/automation/",
}

const OCTO_REMOTE_API = axios.create({
    baseURL: config.octo_api_base_url,
    timeout: 10000,
    headers: {
        'X-Octo-Api-Token': config.octo_token,
        'Content-Type': "application/json"
    }
});

//functions
async function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms * 1000));
}

async function check_limits(response) {
    let rpm = response.headers['x-ratelimit-remaining'];
    let rph = response.headers['x-ratelimit-remaining-hour'];
    if (rpm < 10) {
        console.log("Waiting a minute...");
        await sleep(60);
    }
    if (rph < 10) {
        console.log("Waiting an hour...");
        await sleep(3600);
    }
}

async function get_total_pages() {
    const response = await OCTO_REMOTE_API.get('/profiles?page=0&page_len=10');
    const total_profiles = response.data.total_count;
    const total_pages = Math.ceil(response.data.total_count / 100);
    console.log(`Total Profiles: ${total_profiles}\nTotal Pages: ${total_pages}`);
    await check_limits(response);
    return total_pages;
}

async function get_all_profiles_titles(total_pages) {
    let profiles = [];
    for (let i = 0; i < total_pages; i++) {
        let response = await OCTO_REMOTE_API.get(`/profiles?page=${i}&page_len=100&fields=title`);
        await check_limits(response);
        profiles.push(...response.data.data);
    }
    return profiles;
}

async function write_file(profiles) {
    const titles = profiles.map(item => item.title).filter(Boolean);
    try {
        await fs.writeFile('./profiles_titles.txt', titles.join('\n'), 'utf-8');
    } catch (error) {
        console.error(`ERROR: While trying writing the file some error occured:\n${error}`);
    }
}
//main process
(async () => {
    const total_pages = await get_total_pages();
    const profiles = await get_all_profiles_titles(total_pages);
    await write_file(profiles);
    console.log('Finished. Check profiles_titles.txt file...');
})()

Creating and running the script

Create a .js file. Right-clicking on the Explorer will show you the created files. Go to the API documentation and select Node.js — Axios (usually cURL is the default option). You can launch the created script by running the command node script_name.js‎ in the VS Code terminal.
Automation in Octo Browser

Should I use automation for my team?

Our surveys consistently show that more and more teams are turning to automation as it significantly reduces work time and enables independent, asynchronous processes within profiles. Even minor optimizations in routine workflows will yield noticeable results and significantly speed up your work in Octo Browser. Say goodbye to manually configuring proxies, adding starting pages, or installing extensions for each profile! You can use ready-made snippets from our Knowledge Base, or modify them for your precise needs to reach the new levels of multi-accounting.

FAQ:

I am worried that the script might steal my accounts, tokens, or passwords.
The code that we offer is both open and fully transparent. You can see for yourself that no requests to third-party resources are made, the script only uses official libraries, and is launched on your local machine.
Can I modify the script to better suit my needs?
Absolutely! This is open source, after all. We would be delighted if you use our scripts as the basic tweakable framework for your tasks.
Do Local API requests use up the available requests limit?
Of all the requests available in the Local API column, only the Start Profile requests count towards your limit. List Active Profiles, Stop Profile, Force Stop Profile, Login, Logout, Get Client Version, Update Client requests do not count towards your limit.
Snippet is a small code fragment that performs particular well-defined tasks. You can copy and paste it into your main code, and then configure it further according to your precise needs.
Node, or Node.js, is a programming platform that executes JavaScript code outside the browser. It is built on the Chrome V8 engine.
Axios is a JavaScript library that allows making HTTP requests from the browser or Node.js.
CloudFlare is a web security service vendor that offers secure content delivery network services, protection from DDoS attacks, and DNS servers. Websites use CloudFare solutions to detect queries initiated by Selenium.
Python is a high-level programming language that is known for its efficiency, simplicity, and versatility.
Requests is a Python module that you can use to send all kinds of HTTP requests.

Stay up to date with the latest Octo Browser news
By clicking the button you agree to our Privacy Policy.

Related articles
Join Octo Browser now
Or contact the support team in chat for any questions, at any time.