A simple web app to download Spotify songs using RapidAPI, with audio preview, song info, and one-click MP3 download.
https://spotify-downloader-milanprajapati571.vercel.app
- JavaScript 58.2%
- CSS 24%
- HTML 17.8%
| index.html | ||
| LICENSE | ||
| README.md | ||
| script.js | ||
| style.css | ||
🎧 Spotify-Downloader
A web application that lets you download any Spotify track by just pasting its URL.
It uses RapidAPI's Spotify Downloader API to fetch and stream the song.
🌐 Live Demo
🖥️ Features
- Paste any Spotify track URL
- Fetches song info: title, artist, cover image
- Stream the audio
- One-click download with custom filename
📁 Project Structure
spotify-song-downloader/
│
├── index.html # Main HTML file
├── style.css # CSS styles
├── script.js # JavaScript logic (calls RapidAPI)
└── README.md # You're reading it!
🚀 Getting Started
1. 🔌 Clone the repository
git clone https://github.com/your-username/spotify-song-downloader.git
cd spotify-song-downloader
2. 🧠 Open the project
Use any text editor like VS Code to edit the files.
🔑 Setting up RapidAPI Access
Step-by-step to get your API Key and Endpoint
- Go to RapidAPI Spotify Downloader 9
- Log in or create a free account
- Search for:
spotify-downloader9 - Subscribe to the API (Free Tier works fine)
- Go to the Endpoints section
- Copy the required API snippet and locate your API key:
- Example endpoint:
https://spotify-downloader9.p.rapidapi.com/downloadSong?songId=... - Headers:
{ "x-rapidapi-key": "YOUR_API_KEY", "x-rapidapi-host": "spotify-downloader9.p.rapidapi.com" }
- Example endpoint:
🧩 Update script.js
In script.js, find this section:
const options = {
method: 'GET',
headers: {
'x-rapidapi-key': 'YOUR_API_KEY_HERE',
'x-rapidapi-host': 'spotify-downloader9.p.rapidapi.com'
}
};
🔁 Replace YOUR_API_KEY_HERE with your actual key from RapidAPI.
▶️ How to Use
- Open
index.htmlin your browser. - Paste any Spotify track URL like:
https://open.spotify.com/track/2Kw97Ze8yhh5WDlRkEURKh - Click Download
- The song will:
- Appear with title, artist, cover art
- Start playing via HTML5 audio
- Be downloadable with the title as the filename
🧑💻 Author
Your Name
GitHub: (https://github.com/milanprajapati571)