🔧 API Documentation

🔧 API Documentation

Complete REST API reference for integrating with the Anti-Detect Browser platform.

📋 API Overview

The Anti-Detect Browser API allows you to programmatically manage browser profiles, proxy configurations, and automated browsing sessions.

Base URL

https://api.antidetect-browser.com/v1

Content Type

All API requests should use application/json content type.

Response Format

All responses are returned in JSON format with the following structure:

{ "success": true, "data": { /* response data */ }, "message": "Operation completed successfully", "timestamp": "2024-01-15T10:30:00Z" }

🔐 Authentication

🔑 API Key Required: All API requests require a valid API key in the Authorization header.

Getting Your API Key

  1. Log in to your account dashboard
  2. Navigate to Settings > API Keys
  3. Generate a new API key
  4. Copy and securely store your key

Authentication Header

Authorization: Bearer YOUR_API_KEY_HERE
POST /auth/validate

Validate your API key and get account information.

200 OK
{ "success": true, "data": { "user_id": "user_123", "plan": "premium", "rate_limit": 1000, "expires_at": "2024-12-31T23:59:59Z" } }

👤 Browser Profiles

GET /profiles

Retrieve all browser profiles for your account.

Query Parameters

Parameter Type Required Description
page integer Optional Page number (default: 1)
limit integer Optional Items per page (default: 20, max: 100)
status string Optional Filter by status: active, inactive, archived
200 OK
{ "success": true, "data": { "profiles": [ { "id": "profile_123", "name": "Marketing Campaign", "os": "Windows 10", "browser": "Chrome 120", "status": "active", "created_at": "2024-01-10T14:30:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 45 } } }
POST /profiles

Create a new browser profile.

Request Body

Field Type Required Description
name string Required Profile name (max 100 characters)
os string Required Operating system (Windows, macOS, Linux)
browser string Required Browser type and version
screen_resolution string Optional Screen resolution (e.g., "1920x1080")
timezone string Optional Timezone identifier
language string Optional Browser language (e.g., "en-US")
{ "name": "E-commerce Testing", "os": "Windows 10", "browser": "Chrome 120", "screen_resolution": "1920x1080", "timezone": "America/New_York", "language": "en-US" }
201 Created
{ "success": true, "data": { "id": "profile_456", "name": "E-commerce Testing", "status": "active", "created_at": "2024-01-15T10:30:00Z" } }

🌐 Proxy Management

GET /proxies

List all configured proxy servers.

200 OK
{ "success": true, "data": { "proxies": [ { "id": "proxy_123", "name": "US East Coast", "type": "SOCKS5", "host": "proxy.example.com", "port": 1080, "country": "US", "status": "active" } ] } }
POST /proxies/test

Test proxy connection and speed.

{ "proxy_id": "proxy_123" }
200 OK
{ "success": true, "data": { "status": "connected", "response_time": 245, "ip_address": "192.168.1.100", "location": "New York, US" } }

🌍 Browser Sessions

POST /sessions/start

Start a new browser session with specified profile and proxy.

{ "profile_id": "profile_123", "proxy_id": "proxy_456", "headless": false, "automation_enabled": true }
200 OK
{ "success": true, "data": { "session_id": "session_789", "websocket_url": "ws://localhost:9222", "debug_port": 9222, "status": "running" } }
DELETE /sessions/{session_id}

Stop and cleanup a browser session.

200 OK
{ "success": true, "message": "Session stopped successfully" }

🤖 Automation

POST /automation/execute

Execute automation script in a browser session.

{ "session_id": "session_789", "script": "document.querySelector('#login').click()", "wait_for_completion": true }
200 OK
{ "success": true, "data": { "result": "Script executed successfully", "execution_time": 1250 } }

🔗 Webhooks

Configure webhooks to receive real-time notifications about session events, profile changes, and system alerts.

POST /webhooks

Create a new webhook endpoint.

{ "url": "https://your-app.com/webhook", "events": ["session.started", "session.ended", "profile.created"], "secret": "your_webhook_secret" }

📦 Official SDKs

🐍 Python SDK

pip install antidetect-browser-sdk from antidetect_browser import Client client = Client(api_key="your_api_key") # Create a profile profile = client.profiles.create( name="Test Profile", os="Windows 10", browser="Chrome 120" ) # Start a session session = client.sessions.start( profile_id=profile.id, proxy_id="proxy_123" )

📱 Node.js SDK

npm install antidetect-browser-sdk const { AntiDetectBrowser } = require('antidetect-browser-sdk'); const client = new AntiDetectBrowser({ apiKey: 'your_api_key' }); // Create a profile const profile = await client.profiles.create({ name: 'Test Profile', os: 'Windows 10', browser: 'Chrome 120' }); // Start a session const session = await client.sessions.start({ profileId: profile.id, proxyId: 'proxy_123' });

⚡ Rate Limits

Plan Requests/Hour Concurrent Sessions Burst Limit
Free 100 2 10
Basic 1,000 10 50
Premium 10,000 50 200
Enterprise Unlimited Unlimited Unlimited

Rate Limit Headers

X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1642248000