{"id":15305488,"url":"https://github.com/alenvelocity/spotifydl-core","last_synced_at":"2026-02-27T12:08:11.639Z","repository":{"id":46139460,"uuid":"367910000","full_name":"AlenVelocity/spotifydl-core","owner":"AlenVelocity","description":"Spotify Fetcher and Downloader for Node","archived":false,"fork":false,"pushed_at":"2023-12-23T12:14:02.000Z","size":416,"stargazers_count":56,"open_issues_count":7,"forks_count":24,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-16T19:21:26.690Z","etag":null,"topics":["hacktoberfest","music","nodejs","spotify","spotify-api","spotify-downloader","spotifydl-core"],"latest_commit_sha":null,"homepage":"https://alenvelocity.github.io/spotifydl-core/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlenVelocity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-05-16T14:53:59.000Z","updated_at":"2024-06-18T18:31:55.864Z","dependencies_parsed_at":"2024-06-18T18:31:49.787Z","dependency_job_id":"6ea65ad0-8024-4d54-b2c0-a70e5535cafd","html_url":"https://github.com/AlenVelocity/spotifydl-core","commit_stats":null,"previous_names":["alensaito1/spotifydl-core"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlenVelocity%2Fspotifydl-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlenVelocity%2Fspotifydl-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlenVelocity%2Fspotifydl-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlenVelocity%2Fspotifydl-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlenVelocity","download_url":"https://codeload.github.com/AlenVelocity/spotifydl-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248978907,"owners_count":21192871,"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":["hacktoberfest","music","nodejs","spotify","spotify-api","spotify-downloader","spotifydl-core"],"created_at":"2024-10-01T08:00:50.045Z","updated_at":"2026-02-27T12:08:10.223Z","avatar_url":"https://github.com/AlenVelocity.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=center\u003e\n\n# Spotifydl-Core\n\n\u003cimg src=\"https://img.icons8.com/nolan/256/spotify.png\" alt=\"Never gonna give up, never gonna let you down\"/\u003e\n\n### A simple package to download music tracks from spotify 🎵\n\u003c/div\u003e\n\n## Installation \n\n```sh\n\u003e npm i spotifydl-core\n```\n\n## Intialization \n\nYou need to intialize the `Spotify` Class before acessing the methods inside it.\n\n```js\nconst Spotify = require('spotifydl-core').default\n//import Spotify from 'spotifydl-core'\n\nconst credentials = {\n    clientId: 'your-client-id',\n    clientSecret: 'your-client-secret'\n}\nconst spotify = new Spotify(credentials)\n```\n\n## Methods \n\u003e **NOTE: Only some methods are shown here. Checkout the [docs](https://alensaito1.github.io/spotifydl-core/) for a more in-depth documentation**\n\n**Get Track ⏭️**\n```JS\nawait spotify.getTrack(track_url) \n\n// For Example: track_url = 'https://open.spotify.com/track/1Ub6VfiTXgyV8HnsfzrZzC?si=4412ef4ebd8141ab'\n\n// Input: url of the track, Type: string\n```\n**Download Track/Song ⬇️**\n```JS\nawait spotify.downloadTrack(track_url, file_name)\n\n// For Example: track_url = 'https://open.spotify.com/track/1Ub6VfiTXgyV8HnsfzrZzC?si=4412ef4ebd8141ab' \u0026 file_name = 'song.mp3'\n\n// Input: url of the track and name of the filename, Both Type: string\n\n// It'll return buffer (promise) if you don't provide any filename\n\n```\n\n**Get Artist 👩‍🎤🧑‍🎤**\n```JS\nawait spotify.getArtist(artist_url)\n\n// For Example: artist_url = 'https://open.spotify.com/artist/3B9O5mYYw89fFXkwKh7jCS'\n\n// Input: url of the artist, Type: string\n```\n\n**Get Album 💽**\n```JS\nawait spotify.getAlbum(album_url)\n\n// For Example: album_url = 'https://open.spotify.com/album/3u3WsbVPLT0fXiClx9GYD9?si=pfGAdL3VRiid0M3Ln_0DNg'\n\n// Input: url of the album, Type: string\n```\n\n**Get Playlist 🎧**\n\n```JS\nawait spotify.getPlylist(playlist_url)\n\n// Input: url of the playlist, Type: string\n```\n\n**Download an Entire playlist**\n\n```JS\nawait spotify.downloadPlaylist(playlist_url)\n\n//It'll return an array containing the Buffer of the songs in the playlist\n```\n\n## Usage Example\n```JS\nconst fs = require('fs-extra') \n// Initialization and Authentication \nconst Spotify = require('spotifydl-core').default // Import the library \nconst spotify = new Spotify({ // Authentication\n    clientId: 'acc6302297e040aeb6e4ac1fbdfd62c3', // \u003c-- add your own clientId \n    clientSecret: '0e8439a1280a43aba9a5bc0a16f3f009', // \u003c-- add your own clientSecret \n})\n/* To learn more about clientId and Secret  , \nvisit https://developer.spotify.com/documentation/general/guides/app-settings/ \n*/\n\n// Declaring the respective url in 'links' object \nconst links = {\n    artist: 'https://open.spotify.com/artist/7ky9g1jEjCsjNjZbYuflUJ?si=2To3fmc-T9KuyyrQ-Qp5KQ', // Url of the artist you want to gather info about\n    album: 'https://open.spotify.com/album/3u3WsbVPLT0fXiClx9GYD9?si=pfGAdL3VRiid0M3Ln_0DNg', // Url of the album you want to gather info about\n    song: 'https://open.spotify.com/track/1Ub6VfiTXgyV8HnsfzrZzC?si=4412ef4ebd8141ab' // Url of the song you want to gather info about or download\n};\n\n// Engine \n(async () =\u003e {\n    const data = await spotify.getTrack(links.song) // Waiting for the data 🥱\n    console.log('Downloading: ', data.name, 'by:', data.artists.join(' ')) // Keep an eye on the progress\n    const song = await spotify.downloadTrack(links.song) // Downloading goes brr brr \n    fs.writeFileSync('song.mp3', song) // Let's write the buffer to the woofer (i mean file, hehehe) \n})()\n\n//spotify.verifyCredentials().then(() =\u003e Promise.all([spotify.getTrack(links.song), spotify.getAlbum(links.album), spotify.getArtistAlbums(links.artist)]).then(console.log))\n```\n\n# 🙇‍ Special Thanks\n\n- Swapnil Soni: [Spotify-dl](https://github.com/SwapnilSoni1999/spotify-dl)\n- Fent: [Ytdl-core](https://github.com/fent/node-ytdl-core)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falenvelocity%2Fspotifydl-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falenvelocity%2Fspotifydl-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falenvelocity%2Fspotifydl-core/lists"}