Library / SDK
Tyrrrz/YoutubeExplode avatar
Tyrrrz/YoutubeExplode

YoutubeExplode: a C# abstraction over YouTube's internal API

Abstraction layer over YouTube's internal API

3,737 stars598 forksC#MIT

At a glance

What is it?
YoutubeExplode is an MIT-licensed .NET library that scrapes YouTube page data and reverse-engineered endpoints to expose video metadata, stream manifests and caption tracks. It is a building block for C# tools, not a finished downloader.
Who is it for?
Adopt YoutubeExplode if you are building a .NET tool that needs YouTube metadata, stream manifests or caption tracks and you are willing to handle muxing yourself with YoutubeExplode.Converter and FFmpeg. Do not adopt it if you need a supported public API with stability guarantees, or if you are working outside the .NET ecosystem, since the library is C# only and the README points to no other language binding.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 28 days ago.
What is it written in?
Mainly C#, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 29, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What YoutubeExplode actually solves for a C# developer

YouTube does not publish a supported API for downloading video streams or caption tracks. The official Data API covers metadata and search, but not the media itself. YoutubeExplode fills that gap for .NET developers by wrapping YouTube's internal, undocumented endpoints behind typed C# objects. The README describes it as a library that "provides an interface to query metadata of YouTube videos, playlists and channels, as well as to resolve and download video streams and closed caption tracks." The intended audience is a developer writing a .NET application, script or CLI that needs one of those capabilities without reverse-engineering the page format themselves. It is not a consumer application. There is no binary to install and no user interface, although the repository does contain YoutubeExplode.Demo.Cli and YoutubeExplode.Demo.Gui projects that show how the library is used. The core package is a single class, YoutubeClient, with properties for Videos, Playlists, Channels and Search. That narrow surface is the whole point: you take a dependency, call an async method, and get back a strongly typed result instead of parsing JSON blobs from a page you do not control.

How the abstraction sits on top of scraped page data

The mechanism is stated plainly in the README: "Behind a layer of abstraction, this library works by scraping raw page data and exploiting reverse-engineered internal endpoints." That single sentence explains both the value and the fragility of the project. On the value side, you never touch the raw page. On the fragility side, every operation depends on a page format and an endpoint set that YouTube can change without notice. The data flow for a download is multi-step rather than a single call. You first ask for a stream manifest with Videos.Streams.GetManifestAsync(...), which returns a collection of stream metadata objects. Each object describes a container, bitrate, framerate and quality, and the streams are split into audio-only and video-only categories. You then filter that collection, for example with GetAudioOnlyStreams().GetWithHighestBitrate() or a video-only query restricted to Container.Mp4. Only after you have picked a stream do you resolve it, with Videos.Streams.GetAsync(...) or Videos.Streams.DownloadAsync(...). The README warns that the Url property on a stream object cannot simply be fetched: "you need a series of carefully crafted HTTP requests in order to do so," and it recommends the GetAsync and DownloadAsync helpers instead. That is the abstraction earning its keep, because the request sequence is not something you want to reimplement per project.

Installing YoutubeExplode and downloading a first stream

The package is distributed on NuGet and the README gives one install command. Run it inside a .NET project directory.

bash
dotnet add package YoutubeExplode

After that, the README's first example creates a YoutubeClient and fetches metadata for a video by URL or ID. The comments in the sample show the expected values: the title resolves to "Collections - Blender 2.80 Fundamentals", the author to "Blender", and the duration to 00:07:20.

csharp
using YoutubeExplode;

using var youtube = new YoutubeClient();

var videoUrl = "https://youtube.com/watch?v=u_yIGGhubZs";
var video = await youtube.Videos.GetAsync(videoUrl);

var title = video.Title;
var author = video.Author.ChannelTitle;
var duration = video.Duration;

To download, request the manifest, pick a stream, then hand that stream to DownloadAsync. The README's own filter example selects the highest quality MP4 video-only stream.

csharp
using YoutubeExplode;
using YoutubeExplode.Videos.Streams;

var streamManifest = await youtube.Videos.Streams.GetManifestAsync(videoUrl);

var streamInfo = streamManifest
    .GetVideoOnlyStreams()
    .Where(s => s.Container == Container.Mp4)
    .GetWithHighestVideoQuality();

await youtube.Videos.Streams.DownloadAsync(streamInfo, $"video.{streamInfo.Container}");

The result is a video-only file on disk. If you want audio in the same file, the README directs you to the YoutubeExplode.Converter extension package, which performs the muxing with FFmpeg. Captions follow the same shape: Videos.ClosedCaptions.GetManifestAsync(...) returns the available tracks, which you then download individually.

The muxed stream problem and other limits you inherit

The most consequential limitation is that YouTube no longer serves muxed streams the way it once did. The README strikes through the muxed stream category entirely and adds two warnings. The first says muxed streams are "limited in quality (up to 720p30)" and that reaching the highest available quality requires resolving the best audio-only and video-only streams separately and muxing them with FFmpeg. The second is blunter: muxed streams "are deprecated by YouTube and are not guaranteed to be available for every video," and the README advises avoiding reliance on them. In practice this means a naive single-call download will not give you a complete high-quality file. You either accept a capped muxed stream when one exists, or you take on the FFmpeg dependency through YoutubeExplode.Converter. Neither path is optional, and the README does not document a fallback for videos where no muxed stream exists and FFmpeg is unavailable. The second limitation is structural. Because the library scrapes pages and internal endpoints, it is a moving target. The README's own status badge reads "maintenance," which is a candid signal about the level of active feature work. Nothing in the README promises endpoint stability, and no compatibility policy is stated for when YouTube changes its page format.

YoutubeExplode versus yt-dlp and other downloaders

The obvious alternative is yt-dlp, and the difference is one of category rather than quality. yt-dlp is a standalone Python program and command-line tool that already handles extraction, format selection, muxing and post-processing for hundreds of sites. YoutubeExplode is a library for .NET code. If your goal is to download a video from a terminal, yt-dlp does that in one command with no code. If your goal is to build a .NET application that lists a channel's videos, resolves caption tracks, or embeds stream resolution into a larger pipeline, YoutubeExplode gives you typed objects and async methods where yt-dlp gives you a subprocess and parsed stdout. The trade-off is coverage and maintenance. yt-dlp supports many sites; YoutubeExplode supports YouTube and nothing else, by design. yt-dlp is a program you invoke; YoutubeExplode is a dependency you compile against. The README also points to Binternal for internalizing the library if you want to avoid taking an external dependency at all, which is a concern that does not arise with a subprocess-based tool. A second reference point is NewPipe, an Android application. That is a different platform and a different delivery model entirely, and the README makes no claim of interoperability with it.

Licence, maintenance and what an upgrade costs

YoutubeExplode is MIT licensed, which permits commercial and closed-source use provided the copyright notice and permission notice are included. The README does not reproduce the licence text, but the repository contains a License.txt file at the top level. That is the file to read before shipping. The README adds a terms-of-use section that asks users to agree to political statements about Russia's invasion of Ukraine. Those statements are conditions the author attaches to use of the project, and they sit alongside the MIT grant rather than replacing it. If those terms are a problem for your organization, read them before adopting the package, and note that the README states the agreement is implicit. On maintenance, the last push to the repository was on 2026-09-01, and the most recent release listed is 6.6.2 from 2026-08-25. The README's own status badge reads "maintenance," which is the author's own label. Upgrade cost is low at the API level: the usage examples are stable across the 6.6.x releases listed, and the package is a single dependency with no transitive service to run. The real upgrade cost is not versioning, it is breakage. When YouTube changes its page structure, a version bump is what fixes it, and until that bump ships, a pinned version stops working. Treat the package version as something you may need to move quickly, not something you set once.

Where YoutubeExplode is the wrong tool

There are three clear cases where you should not reach for this library. The first is if you need a supported API with a deprecation policy and a stability guarantee. YoutubeExplode is built on undocumented endpoints and scraped pages, and the README says so without hedging. If your product depends on YouTube data and cannot tolerate a break, the official Data API is the appropriate channel for the metadata it covers, and no supported path exists for the media streams. The second case is any language other than C#. The package is distributed on NuGet and the usage examples are all C#. The related searches include phrases about Flutter and Dart, and the README documents no Dart or Flutter binding, so a Flutter developer would be looking at a port or a subprocess wrapper rather than this package. The third case is a one-off download. Writing a .NET project, adding the package, resolving a manifest and muxing with FFmpeg is more work than invoking an existing command-line downloader, and the README's own warnings about muxed streams mean the simple path is also the lower-quality path. The library pays off when stream resolution is a component inside something larger that you are already writing in C#.

Editorial conclusion

Adopt YoutubeExplode if you are building a .NET tool that needs YouTube metadata, stream manifests or caption tracks and you are willing to handle muxing yourself with YoutubeExplode.Converter and FFmpeg. Do not adopt it if you need a supported public API with stability guarantees, or if you are working outside the .NET ecosystem, since the library is C# only and the README points to no other language binding. Before you commit, verify the stream manifest for the videos you actually care about, especially whether muxed streams are still available for them, and confirm that the latest release 6.6.2 still resolves the endpoints your use case depends on.

Frequently asked questions

What is YoutubeExplode?

It is an MIT-licensed C# library that provides an interface to query metadata of YouTube videos, playlists and channels, and to resolve and download video streams and closed caption tracks. It works by scraping raw page data and exploiting reverse-engineered internal endpoints behind an abstraction layer.

How do I install YoutubeExplode?

The README gives a single NuGet command: dotnet add package YoutubeExplode. The package is also listed on nuget.org, and the README notes you can use Binternal to internalize the library if you prefer to avoid an external dependency.

Why does YoutubeExplode not download audio and video in one file?

The README marks muxed streams as no longer provided by YouTube and warns they are deprecated and not guaranteed for every video. To get the highest available quality you resolve the best audio-only and video-only streams separately and mux them with FFmpeg via the YoutubeExplode.Converter package.

Is there a YoutubeExplode alternative for other languages?

The README documents only the C# package on NuGet and a YoutubeExplode.Converter extension package, with no binding for other languages. A developer outside .NET would need a port or a subprocess wrapper rather than this library as published.

Official sources

  1. License: MIT
  2. Project website
  3. README
  4. Releases
  5. Tyrrrz/YoutubeExplode on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/tyrrrz-youtubeexplode.svg)](https://hysenlabs.com/projects/tyrrrz-youtubeexplode)