> ## Documentation Index
> Fetch the complete documentation index at: https://browseruse-0aece648-agency-x402-payment-cap.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Live preview & recording

> Watch an API V4 run in real time or record its browser.

The `browser.ready` event contains the live browser URL:

<CodeGroup>
  ```python Python theme={null}
  from browser_use_sdk.v4 import BrowserUse

  client = BrowserUse()
  run = client.runs.create("Find the top Hacker News story")
  run = client.runs.wait_for_completion(run.id)

  events = client.runs.events(run.id, limit=100)
  ready = next(
      event for event in events.events
      if event.type == "browser.ready"
  )
  print(ready.data["live_view_url"])
  ```

  ```typescript TypeScript theme={null}
  import { BrowserUse } from "browser-use-sdk/v4";

  const client = new BrowserUse();
  const run = await client.runs.create({
    task: "Find the top Hacker News story",
    model: "grok-4.5",
  });
  await client.runs.waitForCompletion(run.id);

  const events = await client.runs.events(run.id, {
    limit: 100,
  });
  const ready = events.events.find(
    (event) => event.type === "browser.ready",
  );
  console.log(ready?.data.live_view_url);
  ```
</CodeGroup>

Poll [run events](/cloud/agent/observability) if you need the URL as soon as
the browser starts.

## Embed the live browser

```html theme={null}
<iframe
  src="{LIVE_VIEW_URL}"
  style="width: 100%; aspect-ratio: 16/9; border: 0;"
  allow="autoplay"
></iframe>
```

The URL is hosted on `live.browser-use.com`. Add that origin to your
Content Security Policy's `frame-src` directive when needed. Treat the URL as
a credential: anyone with it can interact with the active browser.

## Recording

Enable recording when the run creates its browser:

<CodeGroup>
  ```python Python theme={null}
  run = client.runs.create(
      "Test the checkout flow",
      browser_settings={"record": True},
  )
  ```

  ```typescript TypeScript theme={null}
  const run = await client.runs.create({
    task: "Test the checkout flow",
    model: "grok-4.5",
    browserSettings: { proxyCountryCode: "us", record: true },
  });
  ```

  ```bash curl theme={null}
  curl https://api.browser-use.com/api/v4/runs \
    -H "X-Browser-Use-API-Key: $BROWSER_USE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"task":"Test checkout","browserSettings":{"record":true}}'
  ```
</CodeGroup>

The MP4 becomes available in the Dashboard after the browser stops. API runs
default to recording off, and Zero Data Retention projects never record.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.