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

# Fetch UI Map

> Get the accessibility tree of the current page

## Description

Returns the accessibility tree (UI map) of the current page as a flat array of nodes. Each node includes its role, name, properties, and parent relationship. Use this to understand the page structure before interacting with elements.

## Authentication

Open-source deployments do not require authentication by default. If your server config enables `X-API-Key`, include that header with the request.

## Path Parameters

<ParamField path="id" type="string" required>
  The browser ID returned from Create Session.
</ParamField>

## Response

Returns an array of UI node objects.

<ResponseField name="[].id" type="integer">
  Unique node ID within the current page.
</ResponseField>

<ResponseField name="[].parent_id" type="integer">
  ID of the parent node. Absent on the root node.
</ResponseField>

<ResponseField name="[].name" type="string">
  Accessible name of the element.
</ResponseField>

<ResponseField name="[].role" type="string">
  ARIA role of the element, such as `"RootWebArea"`, `"button"`, or `"link"`.
</ResponseField>

<ResponseField name="[].properties" type="object">
  Additional accessibility properties such as `Url`, `Focusable`, `Checked`, etc.
</ResponseField>

## Example

```bash theme={null}
curl http://localhost:8080/browsers/exc-b9534e98-c3ce-4d1b-9671-b563ac66adc3/ui-map/
```

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": 2,
      "name": "New Tab",
      "properties": {
        "Focusable": true,
        "Url": "chrome://new-tab-page/"
      },
      "role": "\"RootWebArea\""
    },
    {
      "id": 16,
      "parent_id": 2,
      "role": "\"none\""
    }
  ]
  ```
</ResponseExample>
