# Plugin - Get unseen topic count per tag

**URL:** <https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937>\
**Category:** Development\
**Created:** [28. September 2017 um 12:39 UTC](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937 "2017-09-28T12:39:51Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jack2](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@jack2](https://meta.discourse.org/u/jack2)\
**Post date:** [28. September 2017 um 12:39 UTC](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937/1 "2017-09-28T12:39:51Z")

</div>

In my plugin, I would like to display the **unseen** topic count for each tag.

I plan to implement this feature like this:

1. Observe the `topicTrackingState.messageCount` property.
2. Each time there’s a change, use the API to fetch all topics of all tags and check the `unseen` field.

This seems heavy. Is there another way?

(notice that, for simply getting the topic count per tag, there’s a simpler way: the `tags.json` API returns a list of tags with a `count` field)

---

_[View the full topic](https://meta.discourse.org/t/plugin-get-unseen-topic-count-per-tag/70937)._
