# 无法获取每个类别的标签数量

**URL:** <https://meta.discourse.org/t/unable-to-get-tag-count-per-category/313517>\
**Category:** Development\
**Created:** [2024年六月25日 09:16 UTC](https://meta.discourse.org/t/unable-to-get-tag-count-per-category/313517 "2024-06-25T09:16:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2024年六月25日 09:16 UTC](https://meta.discourse.org/t/unable-to-get-tag-count-per-category/313517/1 "2024-06-25T09:16:12Z")

</div>

当请求按类别和标签过滤的话题列表时，JSON 中返回的标签计数是该标签的话题总数，_未按类别过滤_。

例如，在 #Contribute > Bug 类别中有 13 个话题标记为 #badges。  
然而，[https://meta.discourse.org/tags/c/bug/1/badges.json](https://meta.discourse.org/tags/c/bug/1/badges.json) 的 JSON 数据返回 127，这是标记为 #badges 的话题总数。

 ![image](https://global.discourse-cdn.com/meta/original/4X/1/f/e/1fe0f38dc685c1a7ae50a27f2ff4d761a2b0f7a7.png)

有没有办法获取特定类别中具有特定标签的话题数量？
