It’s not possible to get historical stream data from the API.
If you wish to know what games a streamer has played you have to have to gather and store that information yourself as they are streaming, such as by polling the Get Streams endpoint or by using EventSub and subscribing to the channel.update, stream.online and stream.offline types.