---
title: "Find element at coordinates"
method: GET
path: "/api/v1/ui/hit-test"
tags: ["ui"]
---

# Find element at coordinates

`GET /api/v1/ui/hit-test`

Returns the elements at the given window-logical coordinates, ordered deepest first (innermost element first). Results are scoped to the requested window and default to window 0.

## Query parameters

- `x` number, required
- `y` number, required
- `window` integer

## Response `200`

Elements at the given coordinates (deepest first).

- object
  - `x` number, required
  - `y` number, required
  - `window` integer, required
  - `captureEpoch` integer, required
  - `registryGeneration` integer, required
  - `elements` object[], required
    - `id` ElementId, required — unresolved $ref
    - `type` string, required
    - `role` string, nullable
    - `text` string, nullable
    - `automationId` string, nullable
    - `bounds` BoundsInfoJson — unresolved $ref
    - `windowBounds` BoundsInfoJson — unresolved $ref
    - `native` boolean
    - `synthetic` boolean
    - `ownerId` ElementId — unresolved $ref
    - `origin` string, nullable
    - `capabilities` string[]

## Other responses

- `500` — Internal server error.
- `501` — Capability not implemented by the connected backend.

## Changes

> 16 revisions in range; 10 could not be searched.

- **2026-08-17** `dcf9b09e550f` — 1 breaking, 8 info
  - the response's body type/format changed from `array`/`` to `object`/`` for status `200`
  - added the new optional `query` request parameter `window`
  - added the non-success response with the status `501`
  - added the required property `captureEpoch` to the response with the `200` status
  - …5 more

[Change history](https://skmtc.dev/dotnet/apis/devflow-agent-protocol/changes/api/v1/ui/hit-test/get.md)

---

[API](https://skmtc.dev/dotnet/apis/devflow-agent-protocol.md) · [All operations](https://skmtc.dev/dotnet/apis/devflow-agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/dotnet/devflow-agent-protocol/revisions/31dec8eed3de/schema)
