Check for Unique Viewers

It’s been a while since I worked on the Twitch API. I’ve decided to pick it back up a little and was hoping to expand on my project a little bit.

I was wondering how would I go about gathering a list of viewers and a list of chatters?

I’m hoping to log and timestamp this data to gather a list of viewers to get an idea of how many loyal viewers are returning, new(unique) viewers, and so forth so I can put that information into charts and graphs. I also want to do the same thing with chatters but I’m not entirely sure where to begin with any of it.

Any direction or theories would be greatly appreciated.

You can’t

There is no API for “list of viewers”
There is a undocumented one for “list of chatters”, which is generally what people use

You probably want a Extension with “opt in” since GDPR and other privacy laws apply. (It can get complicated very quickly). With the extension in the “main” video/overlay slot.

This generally won’t let you “monitor” people on mobile.

Good to see you again Barry. Quick on the draw as I remembered.

The Privacy laws are a tricky thing to wade through and I will of course do my due diligence to ensure I am acting within those laws of course.

What I’m mainly aiming to do is more or less create my own personal version of streamlabs, this includes trying to replicate the viewer and chatter counts so I can figure out what does and doesn’t help my own growth.

Hoping I can open source the project later on if I ever manage to finish it to help future developers learn from my mistakes and improve on their own projects should they decide they want to take any parts of it for their own projects.

Would creating a channel bot help with checking for the viewers by chance? I’m hoping to avoid creating extensions because that feels like it would require more upkeep than I prefer to manage at the moment and I hear that updates and even applying for one to be accepted can take a good bit of time to be approved by the powers to be when it comes to extensions (Though I could be entirely wrong about that, just heard stories from random sources.)

The chat bot only sees chatters.

People that type a message in chat

Ignoring JOIN/PART which

  • only workings in channels with less than 1000 people
  • is batched
  • reports being connecting to and leaving chat, not the stream

Essentially you just can’t “see” who is watching a stream as a third party.

The Extension route is valid (for the video slot)
But it won’t clock mobile uses generally speaking, and it won’t be able to log people watching on Embed, or any platform that disables extensions (such as game consoles or smart TVs)

So TLDR: there is no way to tracker viewership, other than the count that Get Streams returns, and thats just a number not a list of people

Okay so just to confirm, “viewer_count” from Get Streams is the count of the active viewers correct?
How would I go about getting a “chatter_count” as you mentioned an undocumented way to get a “list of chatters”.

If I can’t get a list of viewers that’s fine, I can go another route and make use of the “viewer_count” to get a general idea of the channel growth.

I should be able to identify loyal users and unique “viewers” by sifting through the chat detail. That’s going to be another problem for another day though.


The undocumented endpoint that everyone uses is

1 Like

Awesome stuff. As usual you are a beast my friend.

@BarryCarlyon Thank you for all the information and guidance.

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