You could start by taking a look at the base library that powers NewPipe and Piped called NewPipe Extractor [0][1]. It can extract the information you need from YouTube without using the API, I believe that includes access to the video streams themselves. Otherwise you could try and use Invidious through the developer API [2] although I must admit I have zero idea how good it is.