YtMusicNet 1.0.0

dotnet add package YtMusicNet --version 1.0.0
                    
NuGet\Install-Package YtMusicNet -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="YtMusicNet" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YtMusicNet" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="YtMusicNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add YtMusicNet --version 1.0.0
                    
#r "nuget: YtMusicNet, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package YtMusicNet@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=YtMusicNet&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=YtMusicNet&version=1.0.0
                    
Install as a Cake Tool

YTMusicNet

codecov

This is a .NET port of the wonderful ytmusicapi created by sigma67.

Still very much in-progress but have been able to use this to facilitate basic browsing of artists, albums and tracks in other applications

Setup

Setting up the client to interface with the library is as easy as creating a new instance like so:

using YtMusicNet;
YtMusicClient client = await YtMusicClient.CreateAsync();

Currently, YtMusicNet supports authenticated logins through the 'Browser' authentication method detailed here. Once you have the request headers, you can generate the browser.json through the NetworkHandler

using YtMusicNet;
var json = NetworkHandler.BrowserSetup(requestHeaders);
File.WriteAllText(authPath, json);

Where 'authPath' is the path to the 'browser.json' file on your end.

Once this is generated, or if you already had one from using ytmusicapi - you can pass this through to the factory creator.

using YtMusicNet;

YtMusicClient client = await YtMusicClient.CreateAsync(proxyUrl:"http://localhost:8000");

YtMusicNet also allows you to provide your own proxy URL, particularily useful for further debugging

using YtMusicNet;

YtMusicClient client = await YtMusicClient.CreateAsync(authFilePath:"browser.json");

Usage

The library currently has 3 endpoints, with progress supporting the full coverage of the original API ongoing. These endpoints are:

GetArtist

Returns a Artist object based on the provided browseId, typically found within a Result

Artist? artistObj = await client?.Browse.GetArtist("UC8txE2ZyN2Sh8XxH5OkHLSw");

YTMusicAPI Porting Progress

Progress Progress Progress

Browse (5/12)

  • GetHome
  • GetArtist
  • GetArtistAlbums
  • GetAlbum
  • GetUser
  • GetUserPlaylists
  • GetUserVideos
  • GetSong
  • GetSongRelated
  • GetLyrics
  • GetTasteProfile
  • SetTasteProfile

Search (1/3)

  • Search
  • GetSearchSuggestions
  • RemoveSearchSuggestions

Playlists (4/6)

  • GetPlaylist
  • CreatePlaylist
  • EditPlaylist
  • DeletePlaylist
  • AddPlaylistItems
  • RemovePlaylistItems
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 175 1/27/2026