Skip to main content
GET
JavaScript
Alongside the main a11y_tree, the response carries a separate ime_tree for the on-screen keyboard window, phone_state (foreground app, focused element, keyboard visibility), and device_context (screen bounds, display density).
Element boundsInScreen values are in the same pixel space the tap and swipe endpoints use — read an element’s bounds and tap the center of its box for element-driven automation.

iOS phones

iOS phones (ios_phone, virtual and physical) return the same response: the same top-level keys (a11y_tree, ime_tree, phone_state, device_context), the same node fields and the same filter semantics. The device’s capabilities report accessibility: true when it serves the UI state; otherwise this endpoint answers 400 DEVICE_TOOL_UNSUPPORTED.
  • Coordinates are iOS logical points, the space the tap and swipe endpoints use on iOS, so the tap-the-center rule above holds unchanged. device_context.screen_bounds is in points, and display_metrics gives the scale (density 3 means widthPixels is three times the width in points).
  • className uses iOS element types (Application, Button, TextField, SearchField, SecureTextField, Switch, StaticText, Key, …), and resourceId is the accessibility identifier.
  • ime_tree is the software keyboard when it is up, otherwise empty. On phones that cannot read the keyboard separately it stays empty and keyboardVisible still reports it.
  • phone_state.packageName is the bundle ID and currentApp the app’s name. activityName is absent: iOS has no activities.
  • isVisibleToUser is absent and isLongClickable is always false: iOS exposes no such signal.

Authorizations

Authorization
string
header
required

Bearer token via Authorization header

Headers

X-Device-Display-ID
integer<int64>
default:0
Required range: x >= 0

Path Parameters

deviceId
string
required

Query Parameters

filter
boolean
default:false

Response

OK

a11y_tree
object
required
device_context
object
required
ime_tree
object
required
phone_state
object
required
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"https://example.com/schemas/AndroidState.json"