# AXTree

Source: https://zshot-cli.com/reference/formats/axtree/
Markdown: https://zshot-cli.com/reference/formats/axtree/index.md
Section: [Reference](https://zshot-cli.com/reference/) › [Formats](https://zshot-cli.com/reference/formats/)
Output type: [`axtree`](https://zshot-cli.com/reference/flags/common/output-type/), [`axtree_json`](https://zshot-cli.com/reference/flags/common/output-type/) · Extension: [`.axtree.txt`](https://zshot-cli.com/reference/flags/common/file-name/), [`.axtree.json`](https://zshot-cli.com/reference/flags/common/file-name/)
License: [Standard](https://zshot-cli.com/support/licenses/standard)

The `axtree` output is a compact browser accessibility-tree for the page. Every
node gets a reference (`@e1`, `@e2`, …) with its browser role, accessible name, and important HTML attributes.

**CLI**

```sh
zshot -f - \
  --output-type axtree \
  https://zshot-cli.com/example_assets/gazette/
```

**JSON** — `POST /` body for the [API](/reference/server/api), Pro license

```json
{
  "url": "https://zshot-cli.com/example_assets/gazette/",
  "output_type": "axtree"
}
```

**curl**

```sh
curl -X POST http://127.0.0.1:3000/ \
  -H "Content-Type: application/json" \
  -d '{"url":"https://zshot-cli.com/example_assets/gazette/","output_type":"axtree"}'
```

You can request an AXTree alongside a render by using the [`--axtree`](/reference/flags/diagnostics/axtree) flag.

Example output:

```
Page: The ZShot Gazette
URL: https://zshot-cli.com/example_assets/gazette/

@e1 [banner]
  @e2 [StaticText] "DAILY EDITION · NO. 1"
  @e3 [StaticText] "THURSDAY, JUNE 18, 2026"
  @e4 [StaticText] "PRICE: ONE (1) FREE LICENSE"
  @e5 [heading] "The ZShot Gazette" [level=1]
  @e6 [paragraph]
    @e7 [StaticText] "All The Markup That's Fit To Render · zshot-cli.com"
  @e8 [navigation] "Sections"
    @e9 [link] "SPORTS" href="#"
    @e10 [link] "WEATHER" href="#"
    @e11 [link] "LIFESTYLE" href="#"
    @e12 [link] "FOOD" href="#"
    @e13 [link] "TECHNOLOGY" href="#"
    @e14 [link] "POLITICS" href="#"
@e15 [main]
  @e16 [article]
    @e17 [paragraph]
      @e18 [StaticText] "POLITICS"
    @e19 [heading] "Mayor Blamed For Bandwidth Deficit" [level=2]
      @e20 [link] "Mayor Blamed For Bandwidth Deficit" href="#"
      ....MORE....
```

Each line is `@eN [role] "name" attr="value" [state]`:

- `@eN` — a unique element reference.
- `[role]` — the browser role of the element.
- `"name"` — the accessible name.
- `attr="value"` — selected HTML attributes: `type`, `name`, `placeholder`,
  `href`, `alt`, `title`.
- `[state]` — element state  when present: `level`, `checked`, `expanded`,
  `selected`, `disabled`, `required`.

Elements that are interactable through CSS or handlers but absent from the accessibility tree (cursor-interactive divs, `contenteditable`, `tabindex`) are surfaced with a `clickable`/`editable`/`focusable` marker. An element marked `draggable="true"` is surfaced with `draggable` and, when unnamed, named by its text.

## JSON

`axtree_json` produces a more expansive tree of nodes carrying additional information about the state of the page.

**CLI**

```sh
zshot -f - \
  --output-type axtree_json \
  https://zshot-cli.com/example_assets/gazette/
```

**JSON** — `POST /` body for the [API](/reference/server/api), Pro license

```json
{
  "url": "https://zshot-cli.com/example_assets/gazette/",
  "output_type": "axtree_json"
}
```

**curl**

```sh
curl -X POST http://127.0.0.1:3000/ \
  -H "Content-Type: application/json" \
  -d '{"url":"https://zshot-cli.com/example_assets/gazette/","output_type":"axtree_json"}'
```

Example output:

```
{
  "page_title": "The ZShot Gazette",
  "url": "https://zshot-cli.com/example_assets/gazette/",
  "roots": [
    {
      "ref": "e1",
      "role": "banner",
      "backendDOMNodeId": 22,
      "bounds": {
        "x": 360,
        "y": 0,
        "width": 1200,
        "height": 214
      },
      "children": [
        {
          "ref": "e2",
          "role": "StaticText",
          "name": "DAILY EDITION · NO. 1",
          "backendDOMNodeId": 106,
...MORE...
````

## Navigator

The [navigator](/reference/flags/navigator/navigate) uses the text AXTree format when providing page information to underlying LLMs.

## Related

Flags:

- [`--axtree`](https://zshot-cli.com/reference/flags/diagnostics/axtree/)
- [`--axtree-only-visible`](https://zshot-cli.com/reference/flags/diagnostics/axtree-only-visible/)

Topics:

- [Chrome Accessibility Tree](https://developer.chrome.com/blog/full-accessibility-tree)
- [How Chrome Accessibility Works](https://source.chromium.org/chromium/chromium/src/+/main:docs/accessibility/browser/how_a11y_works.md)
- [Diagnostics](https://zshot-cli.com/reference/flags/diagnostics/)

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
    - [PNG](https://zshot-cli.com/reference/formats/png/)
    - [HTML](https://zshot-cli.com/reference/formats/html/)
    - [MHTML](https://zshot-cli.com/reference/formats/mhtml/)
    - [Plain Text](https://zshot-cli.com/reference/formats/txt/)
    - [Download](https://zshot-cli.com/reference/formats/download/)
    - [JPEG](https://zshot-cli.com/reference/formats/jpeg/)
    - [JPEG XL](https://zshot-cli.com/reference/formats/jpegxl/)
    - [WebP](https://zshot-cli.com/reference/formats/webp/)
    - [TIFF](https://zshot-cli.com/reference/formats/tiff/)
    - [BMP](https://zshot-cli.com/reference/formats/bmp/)
    - [PDF](https://zshot-cli.com/reference/formats/pdf/)
    - [Markdown](https://zshot-cli.com/reference/formats/markdown/)
    - [AVIF](https://zshot-cli.com/reference/formats/avif/)
    - [GIF](https://zshot-cli.com/reference/formats/gif/)
    - [APNG](https://zshot-cli.com/reference/formats/apng/)
    - [WebM](https://zshot-cli.com/reference/formats/webm/)
    - [MP4](https://zshot-cli.com/reference/formats/mp4/)
    - [MKV](https://zshot-cli.com/reference/formats/mkv/)
    - [HAR](https://zshot-cli.com/reference/formats/har/)
    - [WARC](https://zshot-cli.com/reference/formats/warc/)
    - **AXTree**
    - [WACZ](https://zshot-cli.com/reference/formats/wacz/)
    - [LLM JSON](https://zshot-cli.com/reference/formats/llm_json/)
    - [LLM Text](https://zshot-cli.com/reference/formats/llm_text/)
    - [Goal](https://zshot-cli.com/reference/formats/goal/)
    - [Trace](https://zshot-cli.com/reference/formats/trace/)
    - [CPU profile](https://zshot-cli.com/reference/formats/pprof_cpu/)
    - [Memory profile](https://zshot-cli.com/reference/formats/pprof_memory/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - [LLM Connections](https://zshot-cli.com/reference/llm_connections/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

