https://github.com/snakx/youtubeapisharp
A complete Private YouTube API for .NET (C#, VB.NET).
https://github.com/snakx/youtubeapisharp
android csharp dotnet dotnet-standard ios net youtube youtube-api youtube-channel youtube-dl youtube-downloader youtube-music youtube-playlist youtube-private-api youtube-scraper youtube-sdk youtube-search youtube-video
Last synced: 4 months ago
JSON representation
A complete Private YouTube API for .NET (C#, VB.NET).
- Host: GitHub
- URL: https://github.com/snakx/youtubeapisharp
- Owner: snakx
- License: mit
- Created: 2021-05-20T18:20:30.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-19T08:27:14.000Z (about 4 years ago)
- Last Synced: 2025-02-01T17:51:08.783Z (5 months ago)
- Topics: android, csharp, dotnet, dotnet-standard, ios, net, youtube, youtube-api, youtube-channel, youtube-dl, youtube-downloader, youtube-music, youtube-playlist, youtube-private-api, youtube-scraper, youtube-sdk, youtube-search, youtube-video
- Language: C#
- Homepage: https://play.google.com/store/apps/details?id=com.tspmd.app&hl=en
- Size: 101 KB
- Stars: 42
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YouTubeApiSharp
## Overview
A complete Private YouTube API for .NET (C#, VB.NET).## Target platforms
- .NET Standard 2.0
- WinRT
- Windows
- Linux
- macOS
- Windows Phone
- Xamarin.Android
- Xamarin.iOS## NuGet
[YouTubeApiSharp at NuGet](http://nuget.org/packages/YouTubeApiSharp)
Install-Package YouTubeApiSharp
## License
The YouTubeApiSharp code is licensed under the [MIT License](http://opensource.org/licenses/MIT).
## Example code
**Get the download URLs**
```c#
// Our test youtube link
string link = "insert youtube link";/*
* Get the available video formats.
* We'll work with them in the video and audio download examples.
*/
IEnumerable videoInfos = DownloadUrlResolver.GetDownloadUrls(link);```
**Download the video**
```c#
// Select the first .mp4 video with 360p resolution
VideoInfo video = videoInfos
.First(info => info.VideoType == VideoType.Mp4 && info.Resolution == 360);// Decrypt only if needed
if (video.RequiresDecryption)
{
DownloadUrlResolver.DecryptDownloadUrl(video);
}// Create the video downloader.
VideoDownloader dl = new VideoDownloader();
dl.DownloadFile(video.DownloadUrl, video.Title, true, Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), video.VideoExtension);```
## Community