State
UI state
Returns the current accessibility UI state of the device as a structured tree of on-screen elements. An optional filter query reduces the result to interactive elements.
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).
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_boundsis in points, anddisplay_metricsgives the scale (density3 meanswidthPixelsis three times the width in points). classNameuses iOS element types (Application,Button,TextField,SearchField,SecureTextField,Switch,StaticText,Key, …), andresourceIdis the accessibility identifier.ime_treeis the software keyboard when it is up, otherwise empty. On phones that cannot read the keyboard separately it stays empty andkeyboardVisiblestill reports it.phone_state.packageNameis the bundle ID andcurrentAppthe app’s name.activityNameis absent: iOS has no activities.isVisibleToUseris absent andisLongClickableis alwaysfalse: iOS exposes no such signal.
Authorizations
Bearer token via Authorization header
Headers
Required range:
x >= 0Path Parameters
Query Parameters
JavaScript