← Back to Guides

Antidetect Browser Automation: API & Code Examples by Platform

15 min readβ€’May 5, 2026

Why Automate Antidetect Browsers?

Automation allows you to scale from managing a few accounts to hundreds or thousands:

  • Scale operations β€” create, launch, and manage profiles programmatically
  • Save time β€” automate repetitive tasks like login, posting, data collection
  • Reduce errors β€” eliminate human mistakes in multi-account workflows
  • Run 24/7 β€” schedule tasks to run automatically

All major antidetect browsers expose a Local API that lets you control profiles programmatically and connect automation frameworks (Playwright, Selenium, Puppeteer) to launched browser instances.


MoreLogin

API Base URL: http://127.0.0.1:40000

API Docs: guide.morelogin.com

MoreLogin's Local API lets you create, start, stop profiles and connects seamlessly with Puppeteer, Selenium, and Playwright.

Node.js + Puppeteer

const axios = require('axios');
const puppeteer = require('puppeteer');
const BASE = 'http://127.0.0.1:40000';

async function main() {
  // 1. Create a browser profile
  const createResp = await axios.post(BASE + '/api/env/create/quick', {
    name: 'automation-profile'
  });
  const envId = createResp.data.data.envId;
  console.log('Created profile:', envId);

  // 2. Start the profile
  const startResp = await axios.post(BASE + '/api/env/start', {
    envId: envId
  });
  const { debugPort } = startResp.data.data;
  console.log('Debug port:', debugPort);

  // 3. Connect Puppeteer
  const browser = await puppeteer.connect({
    browserWSEndpoint: 'ws://127.0.0.1:' + debugPort,
    defaultViewport: null
  });

  // 4. Automate
  const page = await browser.newPage();
  await page.goto('https://www.google.com');
  console.log('Page title:', await page.title());

  // 5. Cleanup
  await browser.disconnect();
  await axios.post(BASE + '/api/env/close', { envId });
  console.log('Profile closed.');
}

main().catch(console.error);

Python + Selenium

import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service

BASE = "http://127.0.0.1:40000"

# 1. Create a browser profile
resp = requests.post(f"{BASE}/api/env/create/quick", json={
    "name": "automation-profile"
})
env_id = resp.json()["data"]["envId"]
print(f"Created profile: {env_id}")

# 2. Start the profile
resp = requests.post(f"{BASE}/api/env/start", json={
    "envId": env_id
})
data = resp.json()["data"]
debug_port = data["debugPort"]
webdriver_path = data["webdriver"]
print(f"Debug port: {debug_port}, WebDriver: {webdriver_path}")

# 3. Connect Selenium
options = Options()
options.debugger_address = f"127.0.0.1:{debug_port}"
service = Service(executable_path=webdriver_path)
driver = webdriver.Chrome(service=service, options=options)

# 4. Automate
driver.get("https://www.google.com")
print(f"Page title: {driver.title}")

# 5. Cleanup
driver.quit()
requests.post(f"{BASE}/api/env/close", json={"envId": env_id})
print("Profile closed.")

Key API Endpoints

EndpointMethodDescription
/api/env/create/quickPOSTQuick create a profile
/api/env/startPOSTStart a profile (returns debugPort)
/api/env/closePOSTClose a profile
/api/env/pagePOSTList all profiles
/api/env/updateProxy/batchPOSTBatch update proxy settings

AdsPower

API Base URL: http://local.adspower.com:50325

API Docs: localapi-doc-en.adspower.com

AdsPower uses a Local API that runs alongside the desktop application.

Node.js + Puppeteer

const axios = require('axios');
const puppeteer = require('puppeteer');
const BASE = 'http://local.adspower.com:50325';

async function main() {
  // 1. Create a profile
  const createResp = await axios.post(BASE + '/api/v1/user/create', {
    group_id: '0',
    user_proxy_config: {
      proxy_soft: 'no_proxy'
    }
  });
  const profileId = createResp.data.data.id;
  console.log('Created profile:', profileId);

  // 2. Start the profile
  const startResp = await axios.get(
    BASE + '/api/v1/browser/start?user_id=' + profileId
  );
  const { ws } = startResp.data.data;
  console.log('WebSocket endpoint:', ws.puppeteer);

  // 3. Connect Puppeteer
  const browser = await puppeteer.connect({
    browserWSEndpoint: ws.puppeteer,
    defaultViewport: null
  });

  // 4. Automate
  const page = (await browser.pages())[0];
  await page.goto('https://www.google.com');
  console.log('Page title:', await page.title());

  // 5. Cleanup
  await browser.disconnect();
  await axios.get(BASE + '/api/v1/browser/stop?user_id=' + profileId);
  console.log('Profile closed.');
}

main().catch(console.error);

Python + Selenium

import requests
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service

BASE = "http://local.adspower.com:50325"

# 1. Start the profile
resp = requests.get(f"{BASE}/api/v1/browser/start?user_id=YOUR_PROFILE_ID")
data = resp.json()["data"]
selenium_address = data["ws"]["selenium"]
webdriver_path = data["webdriver"]

# 2. Connect Selenium
options = Options()
options.debugger_address = selenium_address
service = Service(executable_path=webdriver_path)
driver = webdriver.Chrome(service=service, options=options)

# 3. Automate
driver.get("https://www.google.com")
print(f"Page title: {driver.title}")

# 4. Cleanup
driver.quit()
requests.get(f"{BASE}/api/v1/browser/stop?user_id=YOUR_PROFILE_ID")

Key API Endpoints

EndpointMethodDescription
/api/v1/user/createPOSTCreate a new profile
/api/v1/browser/startGETStart a profile (returns WS endpoint)
/api/v1/browser/stopGETStop a profile
/api/v1/browser/activeGETCheck browser status
/api/v1/user/listGETList all profiles
/api/v1/user/deletePOSTDelete a profile

GoLogin

API Base URL: https://api.gologin.com

Automation Port: Profile-specific debugging port

GoLogin provides both a cloud REST API and local debugging ports.

Node.js + Playwright

const { chromium } = require('playwright');
const axios = require('axios');

const API_TOKEN = 'YOUR_API_TOKEN';
const BASE = 'https://api.gologin.com';

async function main() {
  // 1. Start profile via API
  const startResp = await axios.post(
    BASE + '/browser/start-profile',
    { profileId: 'YOUR_PROFILE_ID' },
    { headers: { Authorization: 'Bearer ' + API_TOKEN } }
  );
  const { wsUrl } = startResp.data;
  console.log('WebSocket URL:', wsUrl);

  // 2. Connect Playwright
  const browser = await chromium.connectOverCDP(wsUrl);
  const context = browser.contexts()[0];
  const page = context.pages()[0] || await context.newPage();

  // 3. Automate
  await page.goto('https://www.google.com');
  console.log('Page title:', await page.title());
  await page.screenshot({ path: 'screenshot.png' });

  // 4. Cleanup
  await browser.close();
}

main().catch(console.error);

Key API Endpoints

EndpointMethodDescription
/browser/profilesGETList all profiles
/browser/start-profilePOSTStart a profile
/browser/stop-profilePOSTStop a profile
/browser/fingerprintGETGet fingerprint settings
/browser/proxyPUTUpdate proxy settings

Multilogin

API Base URL: https://api.multilogin.com / http://127.0.0.1:35000

Requires: Active subscription + API token

Multilogin provides both a cloud API and local automation interface.

Node.js + Playwright

const { chromium } = require('playwright');
const axios = require('axios');

const MLX_BASE = 'https://api.multilogin.com';
const TOKEN = 'YOUR_API_TOKEN';

async function main() {
  // 1. Start a profile
  const resp = await axios.post(
    MLX_BASE + '/profile/start',
    {
      profileId: 'YOUR_PROFILE_ID',
      browserType: 'mimic'  // or 'stealthfox'
    },
    { headers: { Authorization: 'Bearer ' + TOKEN } }
  );
  const { port } = resp.data;

  // 2. Connect Playwright via CDP
  const browser = await chromium.connectOverCDP(
    'http://127.0.0.1:' + port
  );
  const context = browser.contexts()[0];
  const page = context.pages()[0] || await context.newPage();

  // 3. Automate
  await page.goto('https://www.google.com');
  console.log('Title:', await page.title());

  // 4. Cleanup
  await browser.close();
}

main().catch(console.error);

Key API Endpoints

EndpointMethodDescription
/profile/startPOSTStart a profile
/profile/stopPOSTStop a profile
/profile/createPOSTCreate a new profile
/profile/removeDELETEDelete a profile

Dolphin Anty

API Base URL: http://localhost:3001

API Docs: Dolphin Anty Documentation

Dolphin Anty exposes a local API for profile automation.

Node.js + Puppeteer

const axios = require('axios');
const puppeteer = require('puppeteer');
const BASE = 'http://localhost:3001';

async function main() {
  // 1. Start the profile
  const startResp = await axios.get(
    BASE + '/v1.0/browser_profiles/' + 'YOUR_PROFILE_ID' + '/start?automation=1'
  );
  const { wsEndpoint, port } = startResp.data.automation;
  console.log('WS Endpoint:', wsEndpoint);

  // 2. Connect Puppeteer
  const browser = await puppeteer.connect({
    browserWSEndpoint: wsEndpoint,
    defaultViewport: null
  });

  // 3. Automate
  const page = (await browser.pages())[0];
  await page.goto('https://www.google.com');
  console.log('Title:', await page.title());

  // 4. Cleanup
  await browser.disconnect();
  await axios.get(
    BASE + '/v1.0/browser_profiles/' + 'YOUR_PROFILE_ID' + '/stop'
  );
}

main().catch(console.error);

Key API Endpoints

EndpointMethodDescription
/v1.0/browser_profilesGETList profiles
/v1.0/browser_profiles/:id/startGETStart a profile
/v1.0/browser_profiles/:id/stopGETStop a profile
/v1.0/browser_profilesPOSTCreate a profile
/v1.0/browser_profiles/:idPATCHUpdate a profile

Octo Browser

API Base URL: http://localhost:58888

API Docs: Octo Browser Documentation

Octo Browser provides a local REST API for automation integration.

Node.js + Puppeteer

const axios = require('axios');
const puppeteer = require('puppeteer');
const BASE = 'http://localhost:58888';

async function main() {
  // 1. Start the profile
  const startResp = await axios.post(BASE + '/api/profiles/start', {
    uuid: 'YOUR_PROFILE_UUID',
    headless: false,
    debug_port: true
  });
  const { ws_endpoint } = startResp.data;

  // 2. Connect Puppeteer
  const browser = await puppeteer.connect({
    browserWSEndpoint: ws_endpoint,
    defaultViewport: null
  });

  // 3. Automate
  const page = (await browser.pages())[0];
  await page.goto('https://www.google.com');
  console.log('Title:', await page.title());

  // 4. Cleanup
  await browser.disconnect();
  await axios.post(BASE + '/api/profiles/stop', {
    uuid: 'YOUR_PROFILE_UUID'
  });
}

main().catch(console.error);

Key API Endpoints

EndpointMethodDescription
/api/profiles/startPOSTStart a profile
/api/profiles/stopPOSTStop a profile
/api/profilesGETList profiles
/api/profilesPOSTCreate a profile

Automation Comparison

FeatureMoreLoginAdsPowerGoLoginMultiloginDolphin AntyOcto Browser
API TypeLocal RESTLocal RESTCloud RESTCloud + LocalLocal RESTLocal REST
Default Port4000050325Cloud35000300158888
Puppeteerβœ“βœ“βœ“βœ“βœ“βœ“
Seleniumβœ“βœ“βœ“βœ“βœ“βœ“
Playwrightβœ“βœ“βœ“βœ“βœ“βœ“
CLI Toolβœ“βœ—βœ—βœ—βœ—βœ—
MCP Supportβœ“βœ“βœ—βœ—βœ—βœ—
RPA Builderβœ“βœ“βœ—βœ—βœ“βœ—

Best Practices

  • Add random delays between actions (500-3000ms) to mimic human behavior
  • Use page.waitForSelector() instead of fixed timeouts
  • Handle errors gracefully β€” profiles can disconnect unexpectedly
  • Always close profiles after automation to free resources
  • Batch operations β€” when managing many profiles, use batch APIs where available
  • Save session data β€” export cookies after successful logins for reuse

Ready to choose your antidetect browser?

Compare features, pricing, and performance side by side.

Compare All Browsers β†’