| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The high-performance core for the Sunoh Music App, delivering a unified music discovery experience by orchestrating data from multiple industry-leading providers.
Sunoh API is a modern, TypeScript-based middleware designed to bridge the gap between various music sources. It provides a homogeneous data structure, allowing client applications to interact with many providers through a single, consistent interface.
The API implements a sophisticated merging algorithm that prioritizes data quality and relevancy. When a search is performed:
The API coordinates radio stations from Saavn and Gaana into a single stream. It supports creation of stations from artists or specific songs and provides a server-side cursor for endless music.
All source data is mapped to a strictly typed internal schema before returning. This means your frontend doesn't need to know if a song came from Saavn or Gaana; it always receives the exact same JSON structure.
Create a .env file in the root directory:
PORT=3600
REDIS_HOST=redis
REDIS_PORT=6379
# PROVIDER TOKENS
LYRICS_TOKEN=your_token
MEDIA_USER_TOKEN=your_tokenThe fastest way to get up and running:
# Start API and Redis containers
npm run docker:up -- --buildThe API will be available at http://localhost:3600.
# Install dependencies
npm install
# Start development server with auto-reload
npm run devDetailed endpoint specifications can be found in api-endpoints.json.
| Path | Method | Description |
|---|---|---|
| /music/home | GET | Unified home screen with interleaved charts and releases. |
| /music/search | GET | Merged search results for songs, albums, and playlists. |
| /music/recommend | GET | Get similar songs based on a search query (q). |
| /music/radio | GET | Browse featured radio stations from all providers. |
| /music/artist/radio | GET | Start an artist-based radio station via query (q). |
| /music/song/:id | GET | Full song metadata and streaming URLs. |
| /music/occasions | GET | Browse curated moods and genres (Gaana focused). |
| /lyrics/:name | GET | Get LRC/Synced lyrics for a specific track. |
The API provides a set of high-level endpoints to drive a "Discovery" experience.
Fetch a list of similar songs and a coordinated radio station using just a song name.
Start a personalized stream for any artist.
The API provides a seamless, provider-agnostic way to handle infinite radio playback.
Step 1: Initialize Session Call this when the user clicks "Start Radio" on an entity.
Step 2: Fetch Songs / Infinite Playback Use the returned stationId to fetch songs. Supports pagination.
Direct access to specific provider radio logic is still available via:
We employ a tiered caching strategy to ensure minimal latency:
# Production build and run
docker compose up -d --buildThe API is pre-configured for Vercel.
npm run deploy:prodThis project is the backbone of the Sunoh ecosystem. While we welcome community contributions, our priority is maintaining stability for the Sunoh Music App.
Built with ❤️ by the Sunoh Team 🎵
| Back | FazBrowse Home | New Git URL |