LibSaavn

Unofficial wrapper for Saavn Music Streaming platform, written entirely in C#.

Features:

Extract anything Top Trending songs or custom Query a song , recieve everything about the song with easy to use API.

Usage

Install lib from nuget or dotnet CLI

dotnet add package LibSaavn 

Create Saavn Client

using Saavn;
using static System.Console;

SaavnClient client = new();
  1. Search
var searchresult = await client.SearchAsync("Dua Lipa Songs");
foreach (var s in searchresult.Songs.Data)
{
    WriteLine($"Id: {s.Id}");
    WriteLine($"Title: {s.Title}");
    WriteLine($"Singers: {s.MoreInfo.Singers}");
    //get more info
}
  1. Fetch info about Song
var songDetails = await client.GetSongInfoAsync("-5JOWX7I"); //parameter is song id
//playable stream url
WriteLine(songDetails.DecryptedMediaUrl);
WriteLine(songDetails.HasLyrics);
WriteLine(songDetails.LyricsSnippet);
//and more
  1. Top Trending Songs
var top = await client.GetTopChartsAsync();
foreach (var s in top.List)
{
    WriteLine($"Id: {s.Id}");
    WriteLine($"Title: {s.Title}");
    ForegroundColor = ConsoleColor.Cyan;
    WriteLine($"URL: {s.MoreInfo.DecryptedMediaUrl}");
}
  1. Get Lyrics
var lyrics = await client.GetLyricsAsync("-5JOWX7I"); //parameter is song id
WriteLine(lyrics.Lyrics);
  1. Get Album Details
var album = await client.GetAlbumAsync("22765589");
WriteLine(album.Title);
  1. Get Playlist
WriteLine(searchresult.Playlists.Data[0].Id);
//155225861 get playlist id
var playlist = await client.GetPlayListAsync("155225861");
WriteLine(playlist.Listname);