> ## Documentation Index
> Fetch the complete documentation index at: https://docs.browspark.krishm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# browser_snapshot

> Accessible snapshot of the page as an indented tree.

Accessible snapshot of the page as an indented tree. Interactive elements get refs like \[ref=e12] for click/fill/select/read/wait and the devtools\_elements tool. Refs stay valid until the DOM changes; re-snapshot after navigation. diff:true returns only lines that changed since the previous snapshot of this tab.

## Parameters

<ParamField body="tabId" type="integer">
  Target tab id from browser\_tabs, which lists tabs across all windows. Defaults to the agent's most recently opened usable tab, or the only usable tab. Otherwise select a listed tabId.
</ParamField>

<ParamField body="diff" type="boolean">
   
</ParamField>

## Example

```json theme={null}
{
  "tabId": 1234
}
```

```json Only what changed since the last snapshot theme={null}
{
  "tabId": 1234,
  "diff": true
}
```
