# Distinct Tag Values

**URL:** <https://forums.losant.com/t/distinct-tag-values/5642>\
**Category:** Help\
**Tags:** workflow\
**Created:** [October 17, 2024, 12:01am UTC](https://forums.losant.com/t/distinct-tag-values/5642 "2024-10-17T00:01:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Travis\_Rhoden](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Travis\_Rhoden](https://forums.losant.com/u/Travis_Rhoden)\
**Post date:** [October 17, 2024, 12:01am UTC](https://forums.losant.com/t/distinct-tag-values/5642/1 "2024-10-17T00:01:10Z")

</div>

I am trying to get a list of distinct values of a particular tag across all devices in my application. I think I can do this with a keyBy operation in a workflow, merged across pages of an open device query, but is there a better way? We have thousands of devices and can only paginate ~200 before we hit the 5MB payload limit.

Really, if I could just get an output of tag data and throw away all the other device information, I can go from there. I only need the one tag and it feels wasteful to grab an entire device of data just for one datapoint.

---

<div class="post-metadata">

**Author:** ![Michael\_Kuehl](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/michael_kuehl/32/99_2.png) [@Michael\_Kuehl](https://forums.losant.com/u/Michael_Kuehl)\
**Post date:** [October 17, 2024, 12:14am UTC](https://forums.losant.com/t/distinct-tag-values/5642/2 "2024-10-17T00:14:01Z")

</div>

Based on your description of what you need, there is actually an API endpoint exactly for this use case - [Device: Tag Values](https://docs.losant.com/rest-api/devices/#tag-values). That endpoint, given a tag key (and an optional device query filter), will return up to one thousand unique tag values for that key. You should be able to use this endpoint in a workflow using the [Losant API node](https://docs.losant.com/workflows/data/losant-api/). Let me know if that is what you are looking for!

---

<div class="post-metadata">

**Author:** ![Travis\_Rhoden](https://avatars.discourse-cdn.com/v4/letter/t/258eb7/32.png) [@Travis\_Rhoden](https://forums.losant.com/u/Travis_Rhoden)\
**Post date:** [October 17, 2024, 12:25am UTC](https://forums.losant.com/t/distinct-tag-values/5642/3 "2024-10-17T00:25:42Z")

</div>

This works perfectly, thank you.
