I'm referring to projects like redlib or invidious.
I was thinking about doing something similar for a local second-hand marketplace and got curious. Redlib seems to use token spoofing to get past rate limits and Invidious doesn't even use the official YouTube API.
The only way I thought of, which would be slow, is to scrape the site (like you would with Beautiful Soup).
Invidious does have APIs. People host invidious servers and the clients connect to them, similar to piped. I don't know anything about Redlib but it might work the same!
I'm referring to the fact that they don't use or have major rate limits on the APIs that they use for either Reddit or YouTube, respectively.