Skip to main content

Endpoint

Returns the current page’s accessibility tree as a text snapshot with interactive element references (e1, e2, etc.) that can be used for clicking and typing.

Authentication

No authentication required. All endpoints use userId for session isolation.

Path parameters

string
required
The unique identifier of the tab

Query parameters

string
required
User identifier for session isolation
boolean
default:"false"
Whether to include a base64-encoded PNG screenshot in the response
integer
default:"0"
Character offset for pagination. Use nextOffset from previous response to fetch next chunk.
string
default:"text"
Response format (currently only text is supported)

Response

string
The current URL of the tab
string
Accessibility tree snapshot with element references in YAML-like format. Interactive elements are annotated with refs like [e1], [e2].
integer
Total number of interactive element references available
boolean
Whether the snapshot was truncated due to size limits
integer
Total character count of the full snapshot (before truncation)
boolean
Whether more content is available beyond the current chunk
integer
Character offset to use for fetching the next chunk (only present if hasMore is true)
object
Screenshot data (only present if includeScreenshot=true)

Pagination

Large pages are automatically truncated to prevent token overflow. The snapshot is limited to 80,000 characters (~20K tokens), with the last 5,000 characters preserved for pagination/navigation links.
  • First request: offset=0 returns the head of the snapshot plus tail (pagination links)
  • Subsequent requests: Use nextOffset value from the previous response
  • The tail (last 5K chars) is appended to every chunk so navigation refs remain accessible

Element references

Interactive elements (buttons, links, textboxes, checkboxes, etc.) are annotated with refs:
These refs can be used with /click and /type endpoints. Refs reset after navigation - always call /snapshot after navigating to get fresh refs.

Error codes

  • 400 - Missing required parameter (userId)
  • 404 - Tab not found
  • 500 - Internal server error

Examples

Basic snapshot

Snapshot with screenshot

Paginated snapshot

Caching behavior

For offset > 0 requests, the server uses a cached snapshot from the last offset=0 call. This ensures consistent pagination without rebuilding the accessibility tree. The cache is invalidated after navigation or interaction.

Excluded elements

The following elements are excluded from snapshots to avoid interference:
  • Comboboxes (date pickers, complex dropdowns)
  • Elements matching patterns: date, calendar, picker, datepicker
This prevents accidental triggering of complex widgets during automation.