---
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.

---

[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)
