REST · JSON · GET only · free key
Spotify to MP3 Downloader API
Send a Spotify track link and get an MP3 download link with the track title and cover art as JSON.
Try it in the playground Read the docs
Endpoints
GET /api/spotify· Spotify: Track link to MP3. Params:apikey, urlGET /api/download/spotify· Spotify (alias)
Example request
curl "https://knightbotapi.stream/api/spotify?apikey=knight&url=https://open.spotify.com/track/67tUdFZHMCS25Ku38hpSJe"
Use it in a WhatsApp bot (Node.js + Baileys)
const axios = require('axios');
const { data } = await axios.get('https://knightbotapi.stream/api/spotify', {
params: {
"apikey": "knight",
"url": "https://open.spotify.com/track/67tUdFZHMCS25Ku38hpSJe"
},
});
if (data.success) {
// Baileys: send the file straight to the chat
await sock.sendMessage(jid, { audio: { url: data.result.download }, mimetype: 'audio/mpeg' });
}Response
Check for HTTP 200 and success: true, then read result.download.
{
"status": 200,
"success": true,
"creator": "KnightBot",
"result": {
"title": "…",
"thumbnail": "https://…",
"download": "https://knightbotapi.stream/files/<id>.mp3"
}
}Limits
- Track links only (open.spotify.com/track/...).
- Hosted files under /files/ expire after 5 minutes, so send them to the chat right away.
Authentication
Pass your key as ?apikey= or the X-API-Key header. The public demo key knight works for testing; per-key minute, hour and day limits apply, and a blocked request returns 429. See the docs for status codes.