TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Youtube.js – full-featured wrapper around YouTube's private API

413 pointsby mahnouelabout 3 years ago

16 comments

binarynateabout 3 years ago
This is really cool, but maybe the README&#x27;s disclaimer should also warn that using YouTube&#x27;s private APIs is against their Terms of Service[0], specifically this section:<p><pre><code> The following restrictions apply to your use of the Service. You are not allowed to: (...) 3. access the Service using any automated means (such as robots, botnets or scrapers) except (a) in the case of public search engines, in accordance with YouTube’s robots.txt file; or (b) with YouTube’s prior written permission; </code></pre> It would be great if YouTube updated their ToS to permit this because that could unlock some really interesting innovation. Until then, devs should at least be aware that building a product with these APIs is risky.<p>[0]: <a href="https:&#x2F;&#x2F;www.youtube.com&#x2F;static?template=terms" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;static?template=terms</a>
评论 #31036369 未加载
评论 #31036722 未加载
评论 #31038095 未加载
matheusmoreiraabout 3 years ago
Awesome!! A custom client for YouTube that bypasses all their front end code. I wish there was something like this for every single web site!
评论 #31038077 未加载
RobertRobertsabout 3 years ago
The reason I stopped integrating any API based system (FB, Twitter, etc...) into my code bases for services I don&#x27;t pay for (or my customers) is because they all changed willy-nilly and broke on a regular basis.<p>This is more likely to break (be broken by google) than an official API, and those are bad enough. (hard pass on even trying this out, especially if it&#x27;s good&#x2F;nice I&#x27;ll want to use it and kick myself later for being an idiot.)
评论 #31031909 未加载
bragrabout 3 years ago
Cool project but I wonder if the name will catch flak from the lawyers. Trademarks and all that. At they very least a big &quot;This is not affiliated with Google&#x2F;Youtube&quot; seems like a wise precaution.
评论 #31032239 未加载
评论 #31033466 未加载
评论 #31032344 未加载
评论 #31035529 未加载
评论 #31034914 未加载
endisneighabout 3 years ago
If you’re YouTube or any site, and want to stop these sort of wrappers - what’s the easiest way to do so without breaking your own site?<p>I find this task to be an interesting engineering problem.<p>A related question is if there’s an unspoofable way to detect a client.
评论 #31032609 未加载
评论 #31035438 未加载
评论 #31032403 未加载
评论 #31032359 未加载
评论 #31033249 未加载
评论 #31033943 未加载
评论 #31032155 未加载
评论 #31032178 未加载
评论 #31032075 未加载
评论 #31032832 未加载
评论 #31032043 未加载
评论 #31032380 未加载
评论 #31034542 未加载
评论 #31035373 未加载
评论 #31033976 未加载
krickabout 3 years ago
I suppose it will break more often than youtube-dl.
评论 #31043441 未加载
imiricabout 3 years ago
It would be great if this had a CLI tool, so that it could be used as an alternative to yt-dlp. Or a web frontend as an alternative to Invidious, which breaks more often than not.<p>That said, I wouldn&#x27;t be surprised if Google issues a C&amp;D, or just inevitably breaks it, especially if it uses undocumented APIs.
评论 #31033130 未加载
timoteostewartabout 3 years ago
Love this Q&amp;A:<p><pre><code> Do I need an API key to use this? No, YouTube.js does not use any official API so no API keys are required.</code></pre>
评论 #31035531 未加载
cphooverabout 3 years ago
I&#x27;m surprised they still support video dislike via API, but have removed it from the user interface... I understand they are likely worried about backwards compatibility with the abundance of client-devices, and not inadvertently breaking some app somewhere, but why not just make it a noop...<p>Unrelated: My treadmill has the absolute worst YT client I&#x27;ve ever used.
评论 #31032476 未加载
评论 #31032456 未加载
评论 #31032978 未加载
freedombenabout 3 years ago
I&#x27;ve been wanting to use the Youtube Music API to automate some personal chores (like building&#x2F;cleaning playlists, etc) and was very discouraged. I actually switched to Spotify (trial) partially over it but there were a couple of other (off-topic) reasons I didn&#x27;t want to stay with Spotify.<p>This looks like a wonderful tool! And it&#x27;s not in Python :-D (sorry python people). Like others I&#x27;m a little concerned about breakage as youtube APIs churn. Does anyone know what Youtube&#x27;s approach to backwards compatibility is for internal APIs? Some companies just wait until 98% of user&#x27;s are on the new clients and then rip stuff out, but others I&#x27;ve worked with basically don&#x27;t allow breaking the API except in important circumstances and they stick around deprecated for a while.
评论 #31034177 未加载
评论 #31032300 未加载
评论 #31032297 未加载
londons_exploreabout 3 years ago
Worth noting that if you automate too much with this API, you&#x27;d be smart to not do it with a Google account you care about, or it&#x27;ll get banned.<p>And they ban any accounts with matching recovery or verification phone numbers and email addresses too, or part of the same gsuite domain.
jokoonabout 3 years ago
Sadly, I don&#x27;t think it will let users view video that require login.<p>For example, some 6min show that goes on live french TV everyday got flagged and requires login to be viewed, for age reason.<p>Maybe there was curse words, or some butt-shaped thing in it?
评论 #31033555 未加载
Auligabout 3 years ago
Does the OAuth login give you full access like a cookie login?<p>Personally I&#x27;m using Firebase&#x27;s private API because the public API is missing a couple of features. Currently I just regularly extract my Google cookies from Firefox and use those. But an easy login that grants access to the private API would be cleaner of course.
lpgauthabout 3 years ago
Very interesting. Does anyone know how stable the InnerTube API is?
trinovantesabout 3 years ago
I&#x27;m always nervous about 3rd party API wrappers. It&#x27;s basically saying &quot;Here&#x27;s the keys to my (users) Google account, please don&#x27;t do anything bad&quot;. Even if it&#x27;s open source, there&#x27;s no guarantee there&#x27;s no malicious change in version x.x.N+1
评论 #31030998 未加载
评论 #31031936 未加载
评论 #31032767 未加载
grammersabout 3 years ago
Nice, thanks for sharing!