SDK Documentation
AntiBrow runs on Windows and Linux (macOS coming soon), backed by the Engine runtime. You launch a profile and receive standard Playwright objects over CDP. Local profiles are unlimited; paid plans add cloud sync and higher concurrency.
import { AntiDetectBrowser } from 'anti-detect-browser'
const ab = new AntiDetectBrowser({
key: 'your-api-key',
})
const { browser, page } = await ab.launch({
profile: 'account-01',
label: 'account-01',
proxyId: 'managed-proxy-id',
})
await page.goto('https://example.com')
await browser.close() launch()
Use ab.launch() for the managed SDK flow. It creates or loads profile metadata, downloads the Engine runtime package when needed, restores the profile archive, launches the browser, and returns browser, context, page, and profileDir.
Supported options: profile, label, color, tags, proxy, proxyId, headless, userDataDir, and liveView.
Profiles
Profiles are local by default and unlimited — created on disk on first launch with no server round-trip. On paid plans a profile can also be synced to the cloud (fingerprint identity + browser-state archive) so it continues on another machine. Concurrency (how many run at once) is capped per plan.
Each profile gets its own virtual authenticator: passkeys (WebAuthn / FIDO2) enrolled inside a profile are captured and replayed automatically — on by default — so passwordless logins persist with the profile like its cookies, and travel with it when the profile is synced.
import { openProfile } from 'anti-detect-browser'
const session = await openProfile({
key: 'your-api-key',
profileName: 'account-01',
})
const page = session.context.pages()[0] ?? await session.context.newPage()
await page.goto('https://example.com')
await session.close() Server API
All endpoints require Authorization: Bearer <api-key>. The SDK calls these for you.
/api/v1/engine/sessionReturns a signed Engine runtime license token. Available on every plan; the response also carries the concurrency cap (mi) and whether cloud sync is enabled. The SDK caches it in a local temp file and only refetches near expiry.
/api/v1/profilesRegisters a profile for cloud sync (paid plans). Local profiles need no server row; the fingerprint is generated locally by the engine launcher on first use.
/api/v1/profiles/:name/archiveReturns presigned download and upload URLs for the profile cache archive.
/api/v1/profiles/:nameReads profile metadata.
Configuration
Use ANTI_DETECT_BROWSER_KEY, ANTI_DETECT_BROWSER_SERVER, and ANTI_DETECT_BROWSER_CACHE_DIR for environment-based configuration. All license tokens are issued by the server; for local development, run the server locally and point ANTI_DETECT_BROWSER_SERVER at it.