🎵 Music Streaming & Search API

A simple API to get direct, streamable links from YouTube videos and search across YouTube & Spotify.

🎬 Streaming Endpoints

GET /get

Get direct streaming links for YouTube videos and playlists.

Parameters:
  • ytl (required) - YouTube URL
Examples:
GET /get?ytl=https://www.youtube.com/watch?v=dQw4w9WgXcQ
GET /get?ytl=https://www.youtube.com/playlist?list=PLx0sYbCqOb8TBPRdmBHs5Iftvv9TPboYG
GET /stream/{video_id}

Get direct streaming URL for a specific video ID.

Example:
GET /stream/dQw4w9WgXcQ

🔍 Search Endpoints

GET /api/search/youtube

Search YouTube for videos with customizable results.

Parameters:
  • query (required) - Search term
  • limit (optional) - Number of results (max 50, default 10)
Examples:
GET /api/search/youtube?query=fire&limit=12
GET /api/search/youtube?query=imagine%20dragons
GET /api/search/spotify

Search Spotify for tracks, albums, playlists, or artists.

Parameters:
  • query (required) - Search term
  • type (optional) - Search type: track, album, playlist, artist (default: track)
  • limit (optional) - Number of results (max 50, default 10)
Examples:
GET /api/search/spotify?query=fire&type=track&limit=12
GET /api/search/spotify?query=taylor%20swift&type=album&limit=5
GET /api/search/spotify?query=chill%20vibes&type=playlist

📋 Response Format

Streaming Response:
{ "is_playlist": false, "tracks": [ { "title": "Song Title", "url": "https://direct-stream-url...", "thumbnail": "https://thumbnail-url...", "duration": "3:14", "uploader": "Channel Name", "videoId": "dQw4w9WgXcQ" } ] }
Search Response:
{ "query": "fire", "type": "track", "limit": 12, "total_results": 12, "results": [ { "videoId": "abc123", "name": "Track Name", "artist": "Artist Name", "duration": "3:45", "thumbnail": "https://thumbnail-url...", "url": "https://youtube.com/watch?v=abc123" } ] }

🛠️ Utility Endpoints

GET /api/info - Get API information and available endpoints
GET /health - Health check endpoint

💡 Usage Tips

🎵 Enhanced Music API v2.0.0
Built with Flask, yt-dlp, and Spotify integration