---
title: "Get screen layout"
method: GET
path: "/boxes/{boxId}/actions/screen-layout"
tags: ["UI Action"]
---

# Get screen layout

`GET /boxes/{boxId}/actions/screen-layout`

Get the current structured screen layout information. This endpoint returns detailed structural information about the UI elements currently displayed on the screen, which can be used for UI automation, element analysis, and accessibility purposes. The format varies by box type: Android boxes return XML format with detailed UI hierarchy information including element bounds, text content, resource IDs, and properties, while other box types may return different structured formats.

## Path parameters

- `boxId` string, required

## Response `200`

Structured screen layout information (XML format for Android boxes)

- ScreenLayout — Screen layout content. Android boxes (XML): <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <hierarchy rotation="0"> <node ... /> </hierarchy> Browser (Linux) boxes (HTML): <html> <head><title>Example</title></head> <body> <h1>Hello World</h1> </body> </html>
  - `content` string, required — Screen layout content. Android boxes (XML): ```xml <?xml version='1.0' encoding='UTF-8' standalone='yes'?> <hierarchy rotation="0"> <node ... /> </hierarchy> ``` Browser (Linux) boxes (HTML): ```html <html> <head><title>Example</title></head> <body> <h1>Hello World</h1> </body> </html> ```

---

[API](https://skmtc.dev/babelcloud/apis/gbox-open-api.md) · [All operations](https://skmtc.dev/babelcloud/apis/gbox-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/babelcloud/gbox-open-api/revisions/d655577fa915/schema)
