---
title: "Returns all SourceDocument IDs that match the query parameters."
method: POST
path: "/analysis/code_frequencies"
tags: ["analysis"]
---

# Returns all SourceDocument IDs that match the query parameters.

`POST /analysis/code_frequencies`

## Query parameters

- `project_id` integer, required

## Request body

- BodyAnalysisCodeFrequencies
  - `code_ids` integer[], required
  - `user_ids` integer[], required
  - `doctypes` DocType[], required

## Response `200`

Successful Response

- CodeFrequency[]
  - `code_id` integer, required — The id of the code.
  - `count` integer, required — The number of occurrences of the code.
  - `child_count` integer, required — The number of occurrences of all child codes of the code.
  - `total_count` integer, required — The total number of occurrences of the code and all its child codes.

## Other responses

- `422` — Validation Error

## Changes

- **2025-09-16** `eeb882449c30` — 2 info
  - added the required property `items/child_count` to the response with the `200` status
  - added the required property `items/total_count` to the response with the `200` status
- **2025-08-22** `53e769440a25` — 2 breaking, 2 warning
  - removed the required property `items/child_count` from the response with the `200` status
  - removed the required property `items/total_count` from the response with the `200` status
  - removed the optional property `detail/items/ctx` from the response with the `422` status
  - removed the optional property `detail/items/input` from the response with the `422` status

[Change history](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/changes/analysis/code_frequencies/post.md)

---

[API](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api.md) · [All operations](https://skmtc.dev/uhh-lt/apis/discourse-analysis-tool-suite-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/uhh-lt/discourse-analysis-tool-suite-api/revisions/bf20656dfc4d/schema)
