It’s impossible to get a list of people viewing the stream. Only Twitch has that data, and game developers have a limited set of that data through the VHS/Drops system but even then the viewer has to opt in to it and they only get data from streams playing their game.
As for people in chat, you if you do a search for the undocumented chatters endpoint you’ll find how to do that, but as an undocumented endpoint you will get no support for it and it will likely be turned off, potentially without prior warning, one day.