Skip to content

A production-ready REST API wrapper for Gaana music streaming, built with Hono, Bun, and TypeScript. Provides access to songs, albums, playlists, artists, trending tracks, charts, and new releases metadata.

License

Notifications You must be signed in to change notification settings

ryanwtf88/gaana-api

Repository files navigation

Gaana API

License TypeScript Bun Hono Swagger

A production-ready REST API wrapper for Gaana music streaming, built with Hono, Bun, and TypeScript. Provides access to songs, albums, playlists, artists, trending tracks, charts, and new releases metadata.

Disclaimer: This project is created solely for educational and research purposes. It is not an official Gaana API. Use responsibly and respect Gaana's terms of service.


Features

  • Unified Search Search across all content types
  • RESTful Clean, standard REST API design
  • Metadata Full details with ISRC codes
  • Swagger Interactive API documentation
  • Trending Get trending tracks and top charts
  • Type-Safe Full TypeScript support

Quick Start

Installation

# Clone the repository
git clone https://github.com/ryanwtf88/gaana-api.git
cd gaana-api

# Install dependencies
npm install

Development

# Start development server
npm run dev

# API will be available at http://localhost:3000

Documentation

Visit http://localhost:3000 to view the interactive Swagger UI documentation.


API Endpoints

Search

Method Endpoint Description
GET /api/search Unified search across all types
GET /api/search/songs Search for songs only
GET /api/search/albums Search for albums only
GET /api/search/playlists Search for playlists only
GET /api/search/artists Search for artists only

Parameters:

  • q (required): Search query
  • limit (optional): Number of results (default: 10)

Songs

Method Endpoint Description
GET /api/songs/:id Get song details by ID or SEO key
GET /api/songs Get details by URL or SEO key

Parameters:

  • url: Gaana song URL
  • seokey: Song SEO key

Albums

Method Endpoint Description
GET /api/albums/:id Get album details by ID or SEO key
GET /api/albums Get details by URL or SEO key

Parameters:

  • url: Gaana album URL
  • seokey: Album SEO key

Playlists

Method Endpoint Description
GET /api/playlists/:id Get playlist details by ID or SEO key
GET /api/playlists Get details by URL or SEO key

Parameters:

  • url: Gaana playlist URL
  • seokey: Playlist SEO key

Artists

Method Endpoint Description
GET /api/artists/:id Get artist details by ID or SEO key
GET /api/artists Get details by URL or SEO key

Parameters:

  • url: Gaana artist URL
  • seokey: Artist SEO key

Browse

Method Endpoint Description
GET /api/trending Get trending songs
GET /api/charts Get top charts
GET /api/new-releases Get new releases

Parameters:

  • language (optional): Content language (default: 'hi')
  • limit (optional): Number of results

System

Method Endpoint Description
GET /api/health Check API health status

Deployment

Deploy to Vercel

Deploy with Vercel

  1. Install Vercel CLI: npm i -g vercel
  2. Deploy: vercel deploy
  3. Important: Set Function Region to Mumbai (ap-south-1) for best performance.

License

This project is licensed under the MIT License.

About

A production-ready REST API wrapper for Gaana music streaming, built with Hono, Bun, and TypeScript. Provides access to songs, albums, playlists, artists, trending tracks, charts, and new releases metadata.

Topics

Resources

License

Stars

Watchers

Forks