---
title: "List Key Occurrences"
method: GET
path: "/v1/projects/{project_id}/keys/{key_id}/occurrences"
tags: ["keys"]
---

# List Key Occurrences

`GET /v1/projects/{project_id}/keys/{key_id}/occurrences`

## Request

- Base URL: `https://api.sonenta.dev`
- URL: `https://api.sonenta.dev/v1/projects/{project_id}/keys/{key_id}/occurrences`
- Auth: none declared

Every file that references THIS key, joined by stable key_uuid (Viewer+).

The per-key panel of the 'par fichier' translation view. 404 if the key does
not exist, so an empty list always means 'no known usage sites', never 'no
such key'. `measured=false` means no scan has completed — 'never scanned', not
'referenced nowhere'.

## Path parameters

- `key_id` string, required
- `project_id` string, required

## Response `200`

Successful Response

- KeyOccurrencesOut
  - `key_uuid` string, required
  - `items` KeyOccurrenceRow[], required
    - `file` string, required: Repo-relative path of a usage site.
    - `line` integer
    - `column` integer, nullable
    - `ref` string, nullable: Raw usage reference as scanned, e.g. `common:actions.save`.
    - `status` string, required: present = in the last completed run · gone = referenced before, absent from it.
    - `first_seen_at` string, date-time, nullable
    - `last_seen_at` string, date-time, nullable
    - `in_latest_scan` boolean, required: last_seen_scan_id == latest completed run.
  - `total` integer, required
  - `latest_scan_id` string, nullable: scan_id of the most recent completed run; null if none.
  - `measured` boolean, required: False = no completed run yet — NOT 'referenced nowhere'.
  - `formula` object, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/sonenta/apis/sonenta-api.md) · [All operations](https://skmtc.dev/sonenta/apis/sonenta-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sonenta/apis/sonenta-api/revisions/f853ea49fb05?raw)
