Introduction
MetaDock provides four ways to automate browsers: REST API, WebSocket API, Selenium WebDriver (W3C), and MCP integration. Unlike headless tools like Playwright or Puppeteer, MetaDock shows all browsers running in a visual grid — you can watch your automation execute in real-time.
REST API
HTTP endpoints for browser control. Works with any language.
MetaDock Pro
WebSocket API
Real-time bidirectional communication and event subscriptions.
MetaDock Pro
Selenium WebDriver
W3C WebDriver protocol. Use existing scripts with minimal changes.
MetaDock Pro
MCP Integration
Control browsers with AI assistants using natural language.
Authentication
All MetaDock APIs share a single API key (UUID). Find it in the MetaDock app under Settings → API. This key works for REST API, WebSocket, Selenium WebDriver, and MCP.
Authentication Methods
Recommended. Standard Bearer token in Authorization header.
Alternative header-based authentication.
Query parameter. Useful for quick testing.
import requests
API_KEY = "your-uuid-from-metadock-settings"
BASE_URL = "http://127.0.0.1:8080"
# Method 1: Bearer Token (Recommended)
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.get(f"{BASE_URL}/api/browsers", headers=headers)
# Method 2: X-Api-Key Header
headers = {"X-Api-Key": API_KEY}
response = requests.get(f"{BASE_URL}/api/browsers", headers=headers)
# Method 3: Query Parameter
response = requests.get(f"{BASE_URL}/api/browsers?apiKey={API_KEY}")Base URLs
REST API
http://127.0.0.1:8080All REST endpoints are prefixed with /api/
WebSocket API
ws://127.0.0.1:8080/wsSingle WebSocket endpoint for all operations
Selenium WebDriver
http://127.0.0.1:8080/wd/hubW3C WebDriver protocol endpoint
Response Formats
REST API Success Response
{
"success": true,
"data": {
"uuid": "browser-abc-123",
"url": "https://example.com",
"title": "Example Domain"
},
"timestamp": "2025-01-04T12:00:00Z"
}REST API Error Response
{
"success": false,
"error": "Browser not found",
"timestamp": "2025-01-04T12:00:00Z"
}WebSocket Response
{
"type": "response",
"success": true,
"data": { ... },
"id": 1,
"timestamp": "2025-01-04T12:00:00Z"
}WebDriver Response (W3C)
{
"value": {
"sessionId": "session-xyz-789",
"capabilities": { ... }
}
}