---
title: "Returns KeywordStats for the given SourceDocuments."
method: POST
path: "/statistics/keyword"
tags: ["statistics"]
---

# Returns KeywordStats for the given SourceDocuments.

`POST /statistics/keyword`

## Query parameters

- `project_id` integer, required
- `sort_by_global` boolean
- `top_k` integer

## Request body

- integer[]

## Response `200`

Successful Response

- KeywordStat[]
  - `keyword` string, required — The counted keyword.
  - `filtered_count` integer, required — Number of occurrences of the keyword in the filtered collection
  - `global_count` integer, required — Number of occurrences of the keyword in the entire collection

## Other responses

- `422` — Validation Error

---

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