DocsTab Managementbrowser_close_tab

browser_close_tab

browser_close_tab

Close a specific tab by its ID. The tab is destroyed and its resources freed. If the closed tab was active, another tab becomes active. Cannot close the last remaining tab.

When to use browser_close_tab

Use browser_close_tab when you need to manage tabs, popups, and windows within a context. It is part of Owl Browser's Tab Management toolset and runs inside a self-hosted, source-level stealth engine, so every call uses the same configured fingerprint controls as the rest of your automation. Detection still depends on the site, network, behavior, and profile consistency.

Usage Example

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

Parameters

Required

context_idstringrequired

The unique identifier of the browser context (e.g., 'ctx_000001')

tab_idstringrequired

The unique identifier of the tab to close, obtained from browser_get_tabs. Cannot close the last remaining tab in a context

Response

Returns a JSON object with the operation result.

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

Frequently Asked Questions

What does browser_close_tab do?

Close a specific tab by its ID. The tab is destroyed and its resources freed. If the closed tab was active, another tab becomes active. Cannot close the last remaining tab. It belongs to Owl Browser's Tab Management category and is available through the REST API, the Python SDK (browser.close_tab()), the Node.js SDK, and the MCP server.

What parameters does browser_close_tab accept?

browser_close_tab accepts 2 required parameters (context_id, tab_id) and 0 optional parameters. All parameters are sent as JSON in a POST request to /api/execute/browser_close_tab.

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

No. browser_close_tab 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

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