REST API · v1

Spotix API

Simple REST API to search Spotify tracks and download them as MP3. No API key needed. Built by @kasanvx.

Base URLhttps://spotify.khasan.siteproduction
Devhttp://localhost:3000local

Authentication

No API key required

All endpoints are public. Rate limits apply per IP. Automated clients (curl, python, etc.) are blocked at the API layer.

Rate Limits

Per IP, 60-second sliding window. Returns 429 when exceeded.

30req / min/api/search
10req / min/api/stream
GET

/api/stream

Proxy and stream the MP3 audio. The download_url from /api/search is already a ready-to-use stream URL.

Parameters

ParamTypeRequiredDescription
tokenstringrequiredJWT token extracted from search result's download_url
filenamestringoptionalCustom filename for download (without .mp3)

Usage

JavaScript
// The download_url from /api/search is already a valid stream URL
const { result } = await (await fetch('/api/search?q=song')).json()

// Play in audio element
audio.src = result.download_url

// Download
const a = document.createElement('a')
a.href = result.download_url
a.download = 'song.mp3'
a.click()

Error Codes

All errors return { status: false, message: '...' }

CodeMeaning
400Missing or invalid parameters
403Blocked user-agent (bots/scrapers)
404Track not found
429Rate limit exceeded
502Upstream audio source error
504Request timeout (15s / 30s)
500Internal server error