Simple, fast Spotify track search & audio streaming API. Built by @kasanvx
https://spotix.khasan.site/apiNo API key required. Rate limits apply per IP address.
/api/searchSearch & get track info| Param | Type | Required | Description |
|---|---|---|---|
q | string | Required | Track name, artist, or Spotify URL |
curl -X GET "https://spotix.khasan.site/api/search?q=Chris+Brown+Girl+You+Loud"
const res = await fetch('/api/search?q=Chris+Brown+Girl+You+Loud')
const data = await res.json()
console.log(data.result){
"status": true,
"result": {
"title": "Chris Brown - Girl You Loud",
"artist": "Chris Brown",
"duration": "3:33",
"thumbnail": "https://i.scdn.co/image/...",
"popularity": 81,
"album": "Fan of A Fan The Album",
"release_at": "2015-02-24",
"download_url": "https://spotix.khasan.site/api/stream?token=..."
},
"response_time": "4359ms"
}{ "status": false, "message": "Track not found" }{ "status": false, "message": "Too many requests. Limit: 30/min" }/api/streamStream / download MP3| Param | Type | Required | Description |
|---|---|---|---|
token | string | Required | Token from search result download_url |
filename | string | Optional | Custom filename for download |
The download_url returned from /api/search is already a fully constructed stream URL. Just use it directly in an <audio> src or fetch it for download. Token is automatically extracted from the search response.
// After getting search result: const streamUrl = data.result.download_url // Play in browser audioElement.src = streamUrl // Download window.location.href = streamUrl
| Code | Meaning |
|---|---|
400 | Bad request — missing or invalid parameter |
403 | Forbidden — blocked user-agent or client |
404 | Track not found |
429 | Rate limit exceeded |
502 | Upstream error |
504 | Request timeout |
500 | Internal server error |
Limits are applied per IP address with a sliding 60-second window. Exceeding the limit returns a 429 status. Automated tools, bots, and scripts with non-browser user-agents are blocked.