DocsContext Managementbrowser_create_context

browser_create_context

browser_create_context

Create a new isolated browser context with its own cookies, storage, and optional proxy configuration. Each context acts as an independent browser session. Use this to create multiple isolated browsing sessions, configure proxy/Tor connections, load browser profiles with saved fingerprints, and enable/disable LLM features. Returns a context_id to use with other browser tools.

When to use browser_create_context

Use browser_create_context when you need to spin up or tear down isolated, fingerprint-independent browser sessions. It is part of Owl Browser's Context Management toolset and runs inside a self-hosted, source-level stealth engine, so every call inherits the same undetectable browser fingerprint as the rest of your automation — no separate anti-detect setup required.

Usage Example

1234567891011
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.create_context(
)

Parameters

Optional

profile_pathstring

Path to a browser profile JSON file (or upload file via multipart/form-data). If the file exists, loads fingerprints, cookies, and settings. If not, creates a new profile and saves it to this path. Encrypted profiles (from browser_download_profile) are automatically detected and decrypted.

osenum
windowsmacoslinux

Filter profiles by operating system. If set, only profiles matching this OS will be used. Options: 'windows', 'macos', 'linux'

gpustring

Filter profiles by GPU vendor/model. If set, only profiles with matching GPU will be used. Examples: 'nvidia', 'amd', 'intel'

screen_sizeenum
1920x10802560x14403440x14403840x2160+3 more

Screen resolution for the browser context. Format: 'WIDTHxHEIGHT'. If not set, a random screen size is selected from the monitor catalog.

timezonestring

Override browser timezone. IANA timezone format (e.g., 'America/New_York', 'Europe/London', 'Asia/Tokyo'). If not set, falls back to: 1) proxy-detected timezone (if proxy configured with spoof_timezone), 2) VM profile timezone, 3) system default. This parameter works without proxy configuration.

localestring

Override browser locale / language. BCP-47 tag (e.g., 'de-DE', 'fr-FR', 'en-GB'). Sets navigator.language, navigator.languages, and the Accept-Language header consistently so the page (and any consent/CMP UI) renders in that language. If not set, the VM profile's locale is used.

resource_blockingboolean

Enable or disable resource blocking (ads, trackers, analytics). When enabled, blocks requests to known ad networks, trackers, and analytics services. Default: true (enabled)

render_modeenum
pixelagentboth

Rendering mode for this context. 'pixel' (default): human pixel render only, identical to today. 'agent': agent-native accessibility render (pixel pipeline suppressed at the tool layer). 'both': agent render and pixels available for screenshot/video. Opt-in and additive; defaults to 'pixel' which preserves existing behavior exactly.

device_scale_factornumber

Optional display DPR hint (1.0-3.0). The effective context DPR is sourced from the VM profile, so this is validated and honored-as-noop within range; a value outside 1.0-3.0 is REJECTED with a clear error instead of silently corrupting the context.

chrome_version_idinteger

Pin this context to a specific row in the chrome_versions table (FK by id, 1..N matching INSERT order sorted by major). Use chrome_version_major instead if you'd rather think in terms of '147'. Mutually exclusive with chrome_version_major; chrome_version_id wins when both are set. 0 / unset = random selection across all chrome_version_ids matching the os/gpu/screen filters.

chrome_version_majorenum
143144145146+4 more

Pin this context to a specific Chrome major. Resolved to chrome_version_id by looking up the chrome_versions row whose major matches. Options: '143', '144', '145', '146', '147', '148', '149', '150' (current 8-major roster).

proxy_typeenum
httphttpssocks4socks5+3 more

Type of proxy server to use. Options: 'http', 'https', 'socks4', 'socks5', 'socks5h', 'gae', 'owl_tunnel'. Use 'socks5h' for remote DNS resolution (recommended for privacy). Use 'owl_tunnel' for an Owl residential tunnel (raw SOCKS5->QUIC splice to a paired sidecar; set proxy_id, not host/port)

proxy_idstring

Owl Tunnel proxy identity (32-hex, the 'proxy-XXXX' target) when proxy_type='owl_tunnel'. Selects which paired residential sidecar to exit through. Ignored for other proxy types

proxy_hoststring

Proxy server hostname or IP address (e.g., '127.0.0.1' or 'proxy.example.com')

proxy_portinteger

Proxy server port number (e.g., 8080 for HTTP proxy, 9050 for Tor)

proxy_usernamestring

Username for proxy authentication. Only required if the proxy server requires credentials

proxy_passwordstring

Password for proxy authentication. Only required if the proxy server requires credentials

proxy_spoof_timezoneboolean

Automatically spoof browser timezone to match proxy location (detected via IP geolocation). Default: true when proxy is configured

proxy_timezone_overridestring

Manually set timezone instead of proxy auto-detection. IANA format like 'America/New_York', 'Europe/London'. Takes precedence over proxy_spoof_timezone. The top-level 'timezone' parameter takes precedence over both

proxy_ca_cert_pathstring

Path to custom CA certificate file (.pem, .crt, .cer) for SSL interception proxies. Required when using Charles Proxy, mitmproxy, or similar HTTPS inspection tools

proxy_ca_key_pathstring

Path to CA private key file for GAE/private app proxy MITM. Required for generating per-domain certificates when using 'gae' proxy type

proxy_trust_custom_caboolean

Trust the custom CA certificate for SSL interception. Enable when using Charles Proxy, mitmproxy, or similar tools that intercept HTTPS traffic. Default: false

is_torboolean

Explicitly mark this proxy as a Tor connection. Enables circuit isolation so each context gets a unique exit node IP. Auto-detected if proxy is localhost:9050 or localhost:9150 with socks5/socks5h

tor_control_portinteger

Tor control port for circuit isolation. Used to send SIGNAL NEWNYM to get a new exit node. Default: auto-detect (tries 9051 then 9151). Set to -1 to disable circuit isolation

tor_control_passwordstring

Password for Tor control port authentication. Leave empty to use cookie authentication (default) or no auth

llm_enabledboolean

Enable or disable LLM features for this context. When enabled, allows using AI-powered tools like browser_query_page, browser_summarize_page, and browser_nla. Default: true

llm_use_builtinboolean

Use the built-in llama-server for LLM inference. When true, uses the bundled local model. Set to false to use an external LLM provider. Default: true

llm_endpointstring

External LLM API endpoint URL (e.g., 'https://api.openai.com/v1' for OpenAI). Only used when llm_use_builtin is false

llm_modelstring

External LLM model name (e.g., 'gpt-4-vision-preview' for OpenAI). Only used when llm_use_builtin is false

llm_api_keystring

API key for the external LLM provider. Required when using external LLM endpoint

llm_is_third_partyboolean

Mark the LLM as a third-party provider (OpenAI-compatible API). Automatically inferred as true when llm_endpoint is set. Default: false

Response

Returns a JSON object with the operation result.

{
  "success": true,
  "result": <value>
}

Frequently Asked Questions

What does browser_create_context do?

Create a new isolated browser context with its own cookies, storage, and optional proxy configuration. Each context acts as an independent browser session. Use this to create multiple isolated browsing sessions, configure proxy/Tor connections, load browser profiles with saved fingerprints, and enable/disable LLM features. Returns a context_id to use with other browser tools. It belongs to Owl Browser's Context Management category and is available through the REST API, the Python SDK (browser.create_context()), the Node.js SDK, and the MCP server.

What parameters does browser_create_context accept?

browser_create_context accepts 0 required parameters and 31 optional parameters. All parameters are sent as JSON in a POST request to /api/execute/browser_create_context.

Is browser_create_context detectable by anti-bot systems like Cloudflare or DataDome?

No. browser_create_context executes inside Owl Browser's Chromium engine, which applies fingerprint spoofing at the C++ source level rather than through JavaScript patches. Every tool call shares the same consistent, human-like fingerprint, so anti-bot systems such as Cloudflare, DataDome, and Akamai see an ordinary browser.

Related Tools

search

One-shot web search. Creates context, navigates to search engine, extracts structured JSON results, closes context.

browser_close_context

Close a browser context and release all associated resources including cookies, storage, and network connections. Always close contexts when done to free up memory. Any ongoing operations in the context will be terminated.

browser_list_contexts

List all currently active browser contexts with their IDs, creation time, current URL, and state. Useful for managing multiple browser sessions and checking which contexts are still open.

browser_close_all_contexts

Close ALL browser contexts at once and reclaim the entire context pool. Emergency recovery for when the context limit is reached but contexts are orphaned or unresponsive. Returns the number of contexts closed. Use with care: this terminates every active session.

browser_get_context_info

Get context information including the VM profile and fingerprint hashes (canvas, audio, GPU) currently in use. Returns the stealth configuration for the browser context including vm_id, canvas hash seed, audio noise seed, and GPU profile details.

browser_navigate

Navigate the browser to a specified URL. This is a non-blocking operation that starts navigation and returns immediately. Use browser_wait_for_network_idle or browser_wait_for_selector to wait for the page to fully load. Supports HTTP, HTTPS, file, and data URLs. When wait_until is set (load, networkidle, fullscroll, domcontentloaded) and the page declares WebMCP tools, the response includes a webmcp_tools array containing the full tool definitions (name, description, inputSchema). Use browser_webmcp_call_tool to execute any of these tools directly.

Browse the full Owl Browser API reference or get started with the Python SDK and Node.js SDK.