This repository not only houses a robust API for Spotify track downloading but also incorporates a Python script for seamless integration with the ZSpotify's library. This script allows users to effortlessly download Spotify tracks, and it has been enhanced with additional code to meet the specific integration requirements of our API.
- Real-Time Updates: Experience real-time updates on track download progress, enhancing the user's sense of control and feedback.
- Spotify Integration: Connect effortlessly to the Spotify platform, enabling users to specify tracks for download.
- Laravel Framework: Benefit from the robust features and structure provided by the Laravel framework for a secure and scalable API.
- Python Processing: Enhance the capabilities of the application with Python code, ensuring efficient and reliable handling of Spotify track downloads.
- PHP version >= 8
- Python version >= 3.10
- Angular Web UI
You can find my angular web ui project here - Cloudinary account
This application uses Cloudinary as a storage services. You can support me by registering for an account using my referral: Sign up Cloudinary - Spotify account
Free Account will download 160k bitrate of track.
Premium Account will download 320k bitrate of track.
Recommend using a burner account to avoid any possible account bans.
- Clone the repository to your local environment.
git clone https://github.com/febriarief/api-spotify-downloader.git
- Install laravel packages
composer install
- Copy file
.env.example
to.env
. - Since we are using the
beyondcode/laravel-websockets
package, it is recommended to change the values ofPUSHER_APP_ID
andPUSHER_APP_KEY
tospotify-track-downloader
from the.env
file. Documentation of beyondcode/laravel-websockets
PUSHER_APP_ID=spotify-track-downloader
PUSHER_APP_KEY=spotify-track-downloader
- Modify several keys in the .env file below to match the values in your Cloudinary account.
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
CLOUDINARY_URL=
CLOUDINARY_UPLOAD_PRESET=
- Migrate database
php artisan migrate
- Create python virtual environment
python -m venv venv
- Activate python virtual environment & install module dependencies.
Windows:
venv\Script\activate && pip install -r requirements.txt
Linux:
source venv\bin\activate && pip install -r requirements.txt
- Change
QUEUE_CONNECTION
value from the.env
file withredis
ordatabase
QUEUE_CONNECTION=redis
or
QUEUE_CONNECTION=database
- Run laravel websocket
php artisan websockets:serve
- Run laravel queue process
php artisan queue:work
- Build angular project and place it to
public
folder and name itconsole
.
- Open terminal and point to
app\Python\spotify
. - Login to your spotify account. Run command:
Windows:
venv\Script\activate && python main.py -l true
Linux:
source venv\bin\activate && python main.py -l true
To complement the API, a Python script leveraging ZSpotify has been included. This script facilitates the download of Spotify tracks effortlessly. Note that this script is an extension of the original ZSpotify functionality, specifically tailored to seamlessly integrate with our API.
This application is not an official product of Spotify. Users are advised to use it at their own risk. Respect copyright and licensing agreements when downloading and using Spotify tracks.
Feel free to contribute to the development of this Spotify Track Downloader API. Fork the repository, make your changes, and submit a pull request.
Thanks to jsavargas for creating ZSpotify.
This application is also licensed under the MIT License, promoting an open and collaborative development environment.