{"id":16151574,"url":"https://github.com/jerry08/spotifyexplode","last_synced_at":"2025-03-16T09:33:40.328Z","repository":{"id":65582543,"uuid":"594903433","full_name":"jerry08/SpotifyExplode","owner":"jerry08","description":"Spotify downloader and metadata parser","archived":false,"fork":false,"pushed_at":"2024-08-19T18:11:23.000Z","size":98,"stargazers_count":35,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-13T01:05:15.928Z","etag":null,"topics":["api","csharp","downloader","spotify","spotify-api","spotify-downloader","wrapper","youtube"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jerry08.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-30T00:40:21.000Z","updated_at":"2025-03-06T22:37:36.000Z","dependencies_parsed_at":"2024-01-22T15:46:41.855Z","dependency_job_id":"8ee4ae65-2a9f-42b6-8ea1-e9374ed27d4d","html_url":"https://github.com/jerry08/SpotifyExplode","commit_stats":{"total_commits":26,"total_committers":2,"mean_commits":13.0,"dds":0.2692307692307693,"last_synced_commit":"eb2cc33f8356e3bbadeacd01de87fbcd0917b780"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerry08%2FSpotifyExplode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerry08%2FSpotifyExplode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerry08%2FSpotifyExplode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jerry08%2FSpotifyExplode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jerry08","download_url":"https://codeload.github.com/jerry08/SpotifyExplode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809888,"owners_count":20351407,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","csharp","downloader","spotify","spotify-api","spotify-downloader","wrapper","youtube"],"created_at":"2024-10-10T00:58:01.722Z","updated_at":"2025-03-16T09:33:39.992Z","avatar_url":"https://github.com/jerry08.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ch1 align=\"center\"\u003e\n    SpotifyExplode\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n   \u003ca href=\"https://discord.gg/U7XweVubJN\"\u003e\u003cimg src=\"https://img.shields.io/badge/Discord-7289DA?style=for-the-badge\u0026logo=discord\u0026logoColor=white\"\u003e\u003c/a\u003e\n   \u003ca href=\"https://nuget.org/packages/SpotifyExplode\"\u003e\u003cimg src=\"https://img.shields.io/nuget/dt/SpotifyExplode.svg?label=Downloads\u0026color=%233DDC84\u0026logo=nuget\u0026logoColor=%23fff\u0026style=for-the-badge\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n**SpotifyExplode** is a library that provides an interface to query metadata of Spotify tracks, playlists, albums, artists and users as well as to download audio.\n\n### 🌟STAR THIS REPOSITORY TO SUPPORT THE DEVELOPER AND ENCOURAGE THE DEVELOPMENT OF THIS PROJECT!\n\n\n## Install\n\n- 📦 [NuGet](https://nuget.org/packages/SpotifyExplode): `dotnet add package SpotifyExplode`\n\n## Usage\n\n**SpotifyExplode** exposes its functionality through a single entry point — the `SpotifyClient` class.\nCreate an instance of this class and use the provided operations to send requests.\n\n### Tracks\n\n#### Retrieving track metadata\n\nTo retrieve the metadata associated with a Spotify track, call `Tracks.GetAsync(...)`:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\nvar track = await spotify.Tracks.GetAsync(\n    \"https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b\"\n);\n\nvar title = track.Title;\nvar duration = track.DurationMs;\n```\n\n### Playlists\n\n#### Retrieving playlist metadata\n\nYou can get the metadata associated with a Spotify playlist by calling `Playlists.GetAsync(...)` method:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n//Get playlist info\nvar playlist = await spotify.Playlists.GetAsync(\n    \"https://open.spotify.com/playlist/0tSYjDUflcozy78WwUFe6y\"\n);\n\nvar title = playlist.Name;\nvar artworkUrl = playlist.Followers;\nvar tracks = playlist.Tracks;\n...\n```\n\n#### Getting tracks included in a playlist\n\nTo get the tracks included in a playlist, call `Playlists.GetTracksAsync(...)`:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n// Get all tracks in a playlist\nvar tracks = await spotify.Playlists.GetAllTracksAsync(\n    \"https://open.spotify.com/playlist/0tSYjDUflcozy78WwUFe6y\"\n);\n\n// Get only the first 20 playlist tracks\nvar tracksSubset = await spotify.Playlists.GetTracksAsync(\n    \"https://open.spotify.com/playlist/0tSYjDUflcozy78WwUFe6y\",\n    limit: 20\n);\n\n//Setting offset\nvar tracksSubset = await spotify.Playlists.GetTracksAsync(\n    \"https://open.spotify.com/playlist/0tSYjDUflcozy78WwUFe6y\",\n    offset: 3,\n    limit: 20\n);\n```\n\n### Albums\n\n#### Retrieving album metadata\n\nYou can get the metadata associated with a Spotify album by calling `Albums.GetAsync(...)` method:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n//Get album info with all tracks\nvar album = await spotify.Albums.GetAsync(\n    \"https://open.spotify.com/album/336m0kejdM5Fkw2HUX46Bw?si=549f3fdb0cfd46e6\"\n);\n\nvar title = album.Name;\nvar artists = album.Artists;\nvar tracks = album.Tracks;\n...\n```\n\n#### Getting tracks included in an album\n\nTo get the tracks included in a album, call `Albums.GetTracksAsync(...)`:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n// Get all tracks in a album\nvar tracks = await spotify.Albums.GetAllTracksAsync(\n    \"https://open.spotify.com/album/336m0kejdM5Fkw2HUX46Bw?si=549f3fdb0cfd46e6\"\n);\n\n// Get only the first 20 album tracks\nvar tracksSubset = await spotify.Albums.GetTracksAsync(\n    \"https://open.spotify.com/album/336m0kejdM5Fkw2HUX46Bw?si=549f3fdb0cfd46e6\",\n    limit: 20\n);\n\n//Setting offset\nvar tracksSubset = await spotify.Albums.GetTracksAsync(\n    \"https://open.spotify.com/album/336m0kejdM5Fkw2HUX46Bw?si=549f3fdb0cfd46e6\",\n    offset: 3,\n    limit: 20\n);\n```\n\n### Artists\n\n#### Retrieving artist metadata\n\nYou can get the metadata associated with a Spotify artist by calling `Artists.GetAsync(...)` method:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n//Get artist info\nvar artist = await spotify.Artists.GetAsync(\n    \"https://open.spotify.com/artist/0bAsR2unSRpn6BQPEnNlZm?si=d3b6e78f96ce45b9\"\n);\n\nvar title = artist.Name;\nvar albums = artist.Albums;\n```\n\n#### Getting tracks included in an artist\n\nTo get the tracks included in an artist, call `Artists.GetAlbumsAsync(...)`:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n// Get all albums in an artist\nvar albums = await spotify.Artists.GetAllAlbumsAsync(\n    \"https://open.spotify.com/artist/0bAsR2unSRpn6BQPEnNlZm?si=d3b6e78f96ce45b9\"\n);\n\n// Get only the first 20 artist albums\nvar albumsSubset = await spotify.Artists.GetAlbumsAsync(\n    \"https://open.spotify.com/artist/0bAsR2unSRpn6BQPEnNlZm?si=d3b6e78f96ce45b9\",\n    limit: 20\n);\n\n//Setting offset\nvar albumsSubset = await spotify.Artists.GetAlbumsAsync(\n    \"https://open.spotify.com/artist/0bAsR2unSRpn6BQPEnNlZm?si=d3b6e78f96ce45b9\",\n    offset: 3,\n    limit: 20\n);\n```\n\n### Users\n\n#### Retrieving user metadata\n\nYou can get the metadata associated with a Spotify user by calling `Users.GetAsync(...)` method:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\n//Get user info\nvar user = await spotify.Users.GetAsync(\n    \"https://open.spotify.com/user/xxu0yww90v07gbh9veqta7ze0\"\n);\n\nvar name = user.DisplayName;\nvar followers = user.Followers;\nvar images = user.Images;\n```\n\n### Searching\nYou can execute a search query and get its results by calling `Search.GetResultsAsync(...)`. Each result may represent either an album, artist, track or playlist, so you need to apply pattern matching to handle the corresponding cases:\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\nforeach (var result in await spotify.Search.GetResultsAsync(\"banda neira\"))\n{\n    // Use pattern matching to handle different results (albums, artists, tracks, playlists)\n    switch (result)\n    {\n        case TrackSearchResult track:\n            {\n                var id = track.Id;\n                var title = track.Title;\n                var duration = track.DurationMs;\n                break;\n            }\n        case PlaylistSearchResult playlist:\n            {\n                var id = playlist.Id;\n                var title = playlist.Name;\n                break;\n            }\n        case AlbumSearchResult album:\n            {\n                var id = album.Id;\n                var title = album.Name;\n                var artists = album.Artists;\n                var tracks = album.Tracks;\n                break;\n            }\n\tcase ArtistSearchResult artist:\n            {\n                var id = artist.Id;\n                var title = artist.Name;\n                break;\n            }\n    }\n}\n```\n\n### Downloading\nYou can get the download url from a track by calling `Tracks.GetDownloadUrlAsync(...)`.\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\nvar downloadUrl = await spotify.Tracks.GetDownloadUrlAsync(\n    \"https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b\"\n);\n// Start download from the url provided...\n```\n\n### Extras\nYou can get a Youtube ID from a track by calling `Tracks.GetYoutubeIdAsync(...)`.\n\n```csharp\nusing SpotifyExplode;\n\nvar spotify = new SpotifyClient();\n\nvar youtubeId = await spotify.Tracks.GetYoutubeIdAsync(\n    \"https://open.spotify.com/track/0VjIjW4GlUZAMYd2vXMi3b\"\n);\n\nvar youtubeUrl = \"https://youtube.com/watch?v=\" + youtubeId;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerry08%2Fspotifyexplode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjerry08%2Fspotifyexplode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjerry08%2Fspotifyexplode/lists"}