Title & Duration - API/Webhook Query?

Hi,

I would like to do something which I feel like it should be an easy thing but I can’t seem to see a reference to this.

We have a community channel and I would simply like to be able to do an API/Export of each stream title and duration but looking at the API- I can only seem to see when a stream started but no reference to when it ended.

Am I looking at this wrong?
Is there a better or simpler way to do any of the following.

  1. Post the title and duration into a google sheet OR
  2. Post the title and duration into Discord
  3. Any OTHER way to just get “title and Duration” or “title and start datetime and end datetime”

Any help would be appretiated here.

You can use EventSub to monitor for stream end. (stream.offline)
So use stream.online to timestamp the start and stream.offline to timestamp the end and then do the math

if you have VOD’s enabled you could get the duration from the Get Videos endpoint (type archive)

I’d use channel.update on eventsub to capture the title/category and any changes of title/category

So Twitch will POST data to your server and then you can forward it to your google sheet or discord or whatever

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