# Getting total category viewers

**URL:** <https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398>\
**Category:** API\
**Created:** [June 30, 2021, 1:36pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398 "2021-06-30T13:36:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Streamz](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Streamz](https://discuss.dev.twitch.com/u/Streamz)\
**Post date:** [June 30, 2021, 1:36pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/1 "2021-06-30T13:36:46Z")

</div>

Is there a way to get the total viewers for a category via the API ?  
For example 🙂 [Twitch](https://www.twitch.tv/directory/game/Slots)  
Shows XX Viewers - XX Followers at the top  
which would be the total count of all channels

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 30, 2021, 1:39pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/2 "2021-06-30T13:39:55Z")

</div>

Heres an example

[https://barrycarlyon.github.io/twitch\_misc/examples/browse\_categories/](https://barrycarlyon.github.io/twitch_misc/examples/browse_categories/)

- Load Categories,
- For each category load a number of pages from streams with that category
- And stop after 50 pages or last stream whichever comes first

So fo you, you just need to do that last two steps since you are looking up a single category.

Just load up to 50 pages of streams with a category/game filter.

After 50 pages you are getting into the weeds and should have a statistically signifcant estimate of the number

So for slots I read currently: which only had two pages of results

![image](https://d2opxh93rbxzdn.cloudfront.net/original/2X/b/b5c426a2d9417f0a01abda2a1fe96f7b7cef7e63.png)

---

<div class="post-metadata">

**Author:** ![Streamz](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Streamz](https://discuss.dev.twitch.com/u/Streamz)\
**Post date:** [June 30, 2021, 2:29pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/3 "2021-06-30T14:29:36Z")

</div>

Brilliant thanks for that.  
Does Twitch have a dev support email at all as I have a couple of questions regarding my project and could do with some clarification on a couple of points

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 30, 2021, 2:31pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/4 "2021-06-30T14:31:01Z")

</div>

Unless it’s legal related. Then that is the purpose of these forums and/or the community discord. [Support | Twitch Developers](https://dev.twitch.tv/support)

---

<div class="post-metadata">

**Author:** ![Streamz](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@Streamz](https://discuss.dev.twitch.com/u/Streamz)\
**Post date:** [June 30, 2021, 2:32pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/5 "2021-06-30T14:32:37Z")

</div>

Ok thanks, can you advise on the API call limit as I can’t seem to find that info

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [June 30, 2021, 2:33pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/6 "2021-06-30T14:33:36Z")

</div>

Rate limits are in the guide:

> **[Twitch API Concepts](https://dev.twitch.tv/docs/api/guide/)**
>
> Twitch API Concepts

> Each client ID has a point-refill rate of 800 points per minute per user and a bucket size of 800 points. The limit is across all Twitch API queries. If this limit is exceeded, an error is returned: HTTP 429 (Too Many Requests).

Infomration regarding the rate limit is returned in headers, as documented

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [July 30, 2021, 2:34pm UTC](https://discuss.dev.twitch.com/t/getting-total-category-viewers/32398/7 "2021-07-30T14:34:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
