> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://platform.bctrl.ai/_mcp/server.

# Close page

> Close one browser page in an active Runtime.

Close a page in an active browser Runtime. Closing a page removes it from the
Runtime; use [Open page](/sdk/tools/browser/browser-pages-open) to create a new
one.

## Close a page

```ts
const closed = await bctrl.tools.call("browser.pages.close", {
  pageId,
}, { runtimeId: runtime.id });

console.log(closed.id, closed.url);
```

The Runtime must be active. If you close the active page, choose another page
with [Activate page](/sdk/tools/browser/browser-pages-activate) before sending
the next page-specific action.

## Request parameters

| Parameter | Type     | Required | Description    |
| --------- | -------- | -------- | -------------- |
| `pageId`  | `PageId` | Yes      | Page to close. |

## Response

The response contains the last known page state:

| Field    | Type      | Always present | Description                                       |
| -------- | --------- | -------------- | ------------------------------------------------- |
| `id`     | `PageId`  | Yes            | Identifier of the closed page.                    |
| `url`    | `string`  | Yes            | Last known page URL.                              |
| `title`  | `string`  | Yes            | Last known page title.                            |
| `active` | `boolean` | Yes            | Whether the page was active before it was closed. |

## Run asynchronously

```ts
const call = await bctrl.tools.start("browser.pages.close", {
  pageId,
}, { runtimeId: runtime.id });

const closed = await bctrl.toolCalls.result(call.id, {
  waitSeconds: 30,
});
```

## Next

* [List pages](/sdk/tools/browser/browser-pages-list) — inspect remaining pages
* [Open page](/sdk/tools/browser/browser-pages-open) — create a new page
* [Runtimes](/sdk/runtimes) — manage the browser session