Skip to main content

Overview

Anchor Browser offers a live view feature that allows you to embed an interactive frame of a website as a web element. The live_view_url is received when creating a session.

Headful Mode (Default)

Headful mode provides a single URL to view the full chrome view, including the address bar. This ensures the presented tab is always the active tab and provides the best user experience. Browser Live View in Headful Mode To create a browser in headful mode, create a session with browser.headless.active set to false (the default):
Then, use the live_view_url from the response to embed the live view directly into an iframe:

Advanced Embedding Configuration

Embed in Fullscreen View (Hide Navigation Bar)

To use the fullscreen view, replace the live view URL with the following:

Disable Browser Interactivity

To prevent the end user from interacting with the browser, add the style="pointer-events: none;" attribute to the iframe:
This feature is available for both headful and headless modes.

Single-Use Live View URL

To generate a live view URL that can only be used once, set one_time_url to true. After the first viewer connects and disconnects, the URL becomes permanently invalid.
one_time_url requires a headful browser. It cannot be used with headless mode.

Scoped Access Tokens

To hand a session to an end user without sharing its session id, set session.scoped_access.active to true. The create response then carries three URLs, each with its own token and no session id: A read-only viewer and an interactive viewer can watch the same session at the same time. A live view token only opens the live view: it cannot connect over CDP or call the browser’s APIs. On a scoped session the session id is no longer a credential on its own: connecting to CDP or the live view with only ?sessionId= is refused. Connect with a token (?token=), or with the session id and a token (?sessionId=...&token=...). Any other session switches to tokens the same way as soon as you mint a token for it (see below); sessions that never use tokens keep working with the session id alone. If the session also sets live_view.read_only, no live view can interact: live_view_url is the same read-only URL as live_view_read_only_url, and cdp_url keeps full control.
To mint more token URLs for any running headful session, for example one per end user, call POST /v1/sessions/{session_id}/tokens. Pass scopes to choose which URLs to mint, or omit it for every URL the session can serve (no live_view_url on a one_time_url session). Every call returns new tokens:
To revoke one, pass the token from its URL. The URL stops opening new connections; a connection that is already open stays until it closes:
Tokens stop working when the session ends. scoped_access requires a headful cloud browser, cannot be combined with one_time_url, and is not accepted by batch or async session creation: for those, mint tokens with POST /v1/sessions/{session_id}/tokens once the session is running.Minting a token on a session without scoped_access makes it token-only from then on: connections that are already open stay up, but new connections with only ?sessionId= are refused, so include cdp in scopes if your own code still connects. Revoking the tokens does not restore session id access.

Remote OS cursor

By default, live view draws a cursor at your mouse. To paint the remote OS pointer into the stream instead (needed to watch OS-level mouse APIs), append show_cursor=1 to live_view_url:

Headless Mode

To obtain the browser live session URL in headless mode, start by creating a session:
Browser Live View in Headless Mode
The live_view_url currently points to the browser default first page.
Then, use the create-session response to embed the live view URL directly into an iframe: