Youtube.js – full-featured wrapper around YouTube's private API
Worth noting that if you automate too much with this API, you'd be smart to not do it with a Google account you care about, or it'll get banned.And they ban any accounts with matching recovery or verification phone numbers and email addresses too, or part of the same gsuite domain.