You collect the games streamed in real time.
So when a stream starts you record the game.
When the stream changes games you record the game.
IE you capure the game the stream is playing whilst the stream is streaming.
The API doesn’t have “historical” data so you have to collect it in real time.