### Clone and Start QQ Music API Project Source: https://qq-api-soso.vercel.app/index Instructions for cloning the QQMusicApi project from GitHub, installing its dependencies using npm, and starting the application. This covers the initial setup for running the API locally. ```bash $ git clone git@github.com:jsososo/QQMusicApi.git $ npm install $ npm start ``` -------------------------------- ### QQ Music API Response Structure Example Source: https://qq-api-soso.vercel.app/index Provides an example of the data structure returned by the QQ Music API for the '/vkey' endpoint, which includes the 'vkey', 'guid', and 'domain' necessary for constructing music playback URLs. ```json { "data": { "vkey": "78159670DE0BF35ABEF86841070FDA6818BC95FB25E5C983547E9D29C9803D30971A3500E2D85D5204848BDC4E3E130BE9FCC63EB73F0F47", "guid": "5339940689", "domain": "http://ws.stream.qqmusic.qq.com/" }, "result": 100, "success": true } ``` -------------------------------- ### Get vkey and guid Source: https://qq-api-soso.vercel.app/index This endpoint is used to obtain the vkey and guid, which are crucial for constructing music playback URLs. The response includes the vkey, guid, and the domain for streaming. ```APIDOC ## GET /vkey ### Description Retrieves the vkey, guid, and domain necessary for constructing music playback URLs. This is a core step for accessing music streams. ### Method GET ### Endpoint /vkey ### Parameters #### Query Parameters - **songmid** (string) - Required - The song's unique identifier. - **guid** (string) - Optional - A unique identifier for the request. ### Response #### Success Response (200) - **data.vkey** (string) - The encryption key for accessing music streams. - **data.guid** (string) - A unique identifier associated with the request. - **data.domain** (string) - The base URL for music streaming. - **result** (integer) - Indicates the success of the operation (100 for success). - **success** (boolean) - True if the operation was successful. ### Response Example ```json { "data": { "vkey": "78159670DE0BF35ABEF86841070FDA6818BC95FB25E5C983547E9D29C9803D30971A3500E2D85D5204848BDC4E3E130BE9FCC63EB73F0F47", "guid": "5339940689", "domain": "http://ws.stream.qqmusic.qq.com/" }, "result": 100, "success": true } ``` ``` -------------------------------- ### Get Singer Description Source: https://qq-api-soso.vercel.app/index Retrieves detailed introduction and information about a specific singer. ```APIDOC ## GET /singer/desc ### Description Retrieves detailed introduction and information about a specific singer. ### Method GET ### Endpoint /singer/desc ### Parameters #### Query Parameters - **singermid** (string) - Required - The unique identifier for the singer. ### Request Example ```json { "example": "/singer/desc?singermid=0025NhlN2yWrP4" } ``` ### Response #### Success Response (200) - **singerInfo** (object) - Object containing the singer's description, including name, unique ID, and biographical information. #### Response Example ```json { "example": "{\"singerInfo\":{\"name\":\"歌手F\",\"mid\":\"0025NhlN2yWrP4\",\"desc\":\"这是一位才华横溢的歌手。\"}} " } ``` ``` -------------------------------- ### Get Album Information Source: https://qq-api-soso.vercel.app/index Retrieves detailed information about a specific album. ```APIDOC ## GET /album ### Description Retrieves detailed information about a specific album. ### Method GET ### Endpoint /album ### Parameters #### Query Parameters - **albummid** (string) - Required - The unique identifier for the album. ### Request Example ```json { "example": "/album?albummid=002MAeob3zLXwZ" } ``` ### Response #### Success Response (200) - **albumInfo** (object) - Object containing album details such as name, artist, release date, and cover image. #### Response Example ```json { "example": "{\"albumInfo\":{\"name\":\"专辑C\",\"artist\":{\"name\":\"歌手I\"},\"releaseDate\":\"2021-11-20\",\"picUrl\":\"http://example.com/album_cover.jpg\"}} " } ``` ``` -------------------------------- ### Get Singer Introduction Source: https://qq-api-soso.vercel.app/index Retrieves detailed introduction information for a specific singer. Requires the 'singermid' parameter, which is mandatory. ```api /singer/desc?singermid=0025NhlN2yWrP4 ``` -------------------------------- ### Get MV Information Source: https://qq-api-soso.vercel.app/index Retrieves information about a specific MV and related recommendations. ```APIDOC ## GET /mv ### Description Retrieves information about a specific MV and related recommendations. ### Method GET ### Endpoint /mv ### Parameters #### Query Parameters - **id** (string) - Required - The video ID (vid) of the MV. ### Request Example ```json { "example": "/mv?id=t0032kwa29w" } ``` ### Response #### Success Response (200) - **info** (object) - Object containing MV information such as title, artist, duration, and cover image. - **recommend** (array) - List of recommended MV objects. #### Response Example ```json { "example": "{\"info\":{\"title\":\"MV标题A\",\"artistName\":\"歌手L\",\"duration\":180,\"coverUrl\":\"http://example.com/mv_cover.jpg\"},\"recommend\":[{\"vid\":\"t001abc\",\"name\":\"相关MV B\"}]}" } ``` ``` -------------------------------- ### Get New MV Recommendations Source: https://qq-api-soso.vercel.app/index Fetches recommendations for new MVs, categorized by type. ```APIDOC ## GET /new/mv ### Description Fetches recommendations for new MVs, categorized by type. ### Method GET ### Endpoint /new/mv ### Parameters #### Query Parameters - **type** (integer) - Optional - MV category. Defaults to 0 (Featured). Options: 0 (Featured), 1 (Mainland China), 2 (Hong Kong & Taiwan), 3 (Europe & America), 4 (Korea), 5 (Japan). ### Request Example ```json { "example": "/new/mv?type=3" } ``` ### Response #### Success Response (200) - **mvs** (array) - List of new MV objects, including MV ID, name, artist, and album. #### Response Example ```json { "example": "{\"mvs\":[{\"vid\":\"t0032kwa29w\",\"name\":\"新MV A\",\"artist\":{\"name\":\"歌手E\"}}] }" } ``` ``` -------------------------------- ### Get Recommended Banner Source: https://qq-api-soso.vercel.app/index Retrieves banner recommendations, currently only returning album IDs. ```APIDOC ## GET /recommend/banner ### Description Retrieves banner recommendations, currently only returning album IDs. ### Method GET ### Endpoint /recommend/banner ### Parameters This endpoint does not require any parameters. ### Request Example ```json { "example": "/recommend/banner" } ``` ### Response #### Success Response (200) - **albums** (array) - List of album objects, each containing an `albumid`. #### Response Example ```json { "example": "{\"albums\":[{\"albumid\":\"002MAeob3zLXwZ\"}]}" } ``` ``` -------------------------------- ### Get Similar Songs Source: https://qq-api-soso.vercel.app/index Returns a list of songs that are similar to the specified song. ```APIDOC ## GET /song/similar ### Description Returns a list of songs that are similar to the specified song. ### Method GET ### Endpoint /song/similar ### Parameters #### Query Parameters - **id** (string) - Required - The song's songid. ### Request Example ``` /song/similar?id=5105986 ``` ``` -------------------------------- ### Get Recommended Playlists Source: https://qq-api-soso.vercel.app/index Provides a list of recommended playlists for the user. This endpoint does not require any parameters. ```APIDOC ## GET /recommend/playlist/u ### Description Provides a list of recommended playlists for the user. This endpoint does not require any parameters. Note that the data format differs from the /recommend/playlist endpoint. ### Method GET ### Endpoint /recommend/playlist/u ### Request Example ``` /recommend/playlist/u ``` ``` -------------------------------- ### Get Playback URLs Source: https://qq-api-soso.vercel.app/index Retrieves playback URLs for songs using their songmid. Supports both GET and POST requests. Note that not all songs may have available playback links due to login or VIP restrictions. ```APIDOC ## GET /song/urls ### Description Retrieves playback URLs for songs using their songmid. Supports both GET and POST requests. Note that not all songs may have available playback links due to login or VIP restrictions. ### Method GET, POST ### Endpoint /song/urls ### Parameters #### Query Parameters - **id** (string) - Required - The song's songmid. Multiple songmids can be provided, separated by commas. ### Request Example ```json { "id": "0039MnYb0qxYhV,004Z8Ihr0JIu5s" } ``` ### Response #### Success Response (200) - **data** (object) - An object where keys are songmids and values are playback URLs. - **result** (integer) - Indicates the success of the operation (100 for success). #### Response Example ```json { "data": { "0039MnYb0qxYhV": "http://ws.stream.qqmusic.qq.com/C400002202B43Cq4V4.m4a?guid=2796982635&vkey=0A1ADCEDC042ABE27FE184A3436DBB6F15AFF286F0F06DDFAEA9ADAF2D82F67EF33746A9472F62B444B7E7CEB32EE0D34DFD53A6E2D97D7B&uin=1899&fromtag=66", "004Z8Ihr0JIu5s": "http://ws.stream.qqmusic.qq.com/C4000012Ez0a1tFcOI.m4a?guid=2796982635&vkey=DB0E16676C581AE2E762FCA5D32FBB52454EA229C6BD58D9BA2976BA7CC3E49532EA299860E0F219148005848530335ABC254EC7A3374F80&uin=1899&fromtag=66" }, "result": 100 } ``` ``` -------------------------------- ### Construct Music Playback URL Source: https://qq-api-soso.vercel.app/index Demonstrates how to construct a music playback URL using the obtained vkey, guid, and songmid. It shows how to select different audio formats. ```APIDOC ## Constructing Playback URL ### Description This section details how to build a playable music URL by combining the `domain`, `vkey`, `guid`, and `strMediaMid` (which can be the same as `songmid` for non-paid songs). It also outlines different audio format options. ### Method N/A (Client-side logic) ### Endpoint N/A ### Parameters - **domain** (string) - The streaming domain obtained from the `/vkey` endpoint. - **s** (string) - Prefix for the audio format (e.g., 'M500' for 128k, 'M800' for 320k). - **strMediaMid** (string) - The song's media identifier. - **e** (string) - File extension for the audio format (e.g., '.mp3', '.ape'). - **guid** (string) - The guid obtained from the `/vkey` endpoint. - **vkey** (string) - The vkey obtained from the `/vkey` endpoint. ### Audio Formats ```javascript const formatMap = { size128: { val: '128k', s: 'M500', e: '.mp3', content: 'audio/mpeg', }, size320: { val: '320k', s: 'M800', e: '.mp3', content: 'audio/mpeg', }, sizeape: { val: '无损ape', s: 'A000', e: '.ape', content: 'audio/ape', }, sizeflac: { val: '无损flac', s: 'F000', e: '.flac', content: 'audio/x-flac', } }; ``` ### Example Usage ```javascript const format = 'size320'; // Or any other format key from formatMap const { s, e } = formatMap[format]; const url = `${domain}${s}${strMediaMid}${e}?guid=${guid}&vkey=${vkey}&fromtag=8&uin=0`; ``` ``` -------------------------------- ### Get Related MVs Source: https://qq-api-soso.vercel.app/index Returns a list of MVs that are related to the specified song. ```APIDOC ## GET /song/mv ### Description Returns a list of MVs that are related to the specified song. ### Method GET ### Endpoint /song/mv ### Parameters #### Query Parameters - **id** (string) - Required - The song's songid. ### Request Example ``` /song/mv?id=5105986 ``` ``` -------------------------------- ### Install QQ Music API with Yarn Source: https://qq-api-soso.vercel.app/index This snippet shows how to add the qq-music-api package to your project using Yarn. This is the first step to integrating the API into your Node.js application. ```bash yarn add qq-music-api ``` -------------------------------- ### Get Album Information Source: https://qq-api-soso.vercel.app/index Retrieves detailed information about a specific album. Requires the mandatory 'albummid' parameter. ```api /album?albummid=002MAeob3zLXwZ ``` -------------------------------- ### QQMusicApi NPM Usage Source: https://qq-api-soso.vercel.app/index Instructions and examples for using the QQ Music API package via npm, including setting cookies and making API requests. ```APIDOC ## QQMusicApi NPM Integration ### Description This section provides guidance on how to install and use the `qq-music-api` package in your Node.js projects. It covers setting user cookies and making general API calls. ### Installation ```bash yarn add qq-music-api ``` ### Usage ```javascript const qqMusic = require('qq-music-api'); // Set user cookie (string or object) qqMusic.setCookie('xxx=xxx; xxx=xxx;'); // or qqMusic.setCookie({ a: 'xxx', b: 'xxx' }); // Make an API request (e.g., search for Jay Chou) qqMusic.api('search', { key: '周杰伦' }) .then(res => console.log(res)) .catch(err => console.log('API call failed')); // Example: Get hot search terms qqMusic.api('search/hot') .then((res) => console.log('Hot search terms:', res)) .catch(err => console.log('API call failed')); // Example: Refresh login status qqMusic.api('user/refresh'); ``` ``` -------------------------------- ### Get Songs in an Album Source: https://qq-api-soso.vercel.app/index Retrieves a list of songs included in a specific album. ```APIDOC ## GET /album/songs ### Description Retrieves a list of songs included in a specific album. ### Method GET ### Endpoint /album/songs ### Parameters #### Query Parameters - **albummid** (string) - Required - The unique identifier for the album. ### Request Example ```json { "example": "/album/songs?albummid=002MAeob3zLXwZ" } ``` ### Response #### Success Response (200) - **songs** (array) - List of song objects within the album, including song ID, name, and artist. #### Response Example ```json { "example": "{\"songs\":[{\"id\":12312,\"name\":\"专辑歌曲A\",\"artists\":[{\"name\":\"歌手J\"}}] }" } ``` ``` -------------------------------- ### Get MV Information Source: https://qq-api-soso.vercel.app/index Retrieves information about an MV, including its details and related recommendations. Requires the 'id' (vid) of the MV. ```api /mv?id=t0032kwa29w ``` -------------------------------- ### Get Similar Singers Source: https://qq-api-soso.vercel.app/index Retrieves a list of singers similar to a given singer. ```APIDOC ## GET /singer/sim ### Description Retrieves a list of singers similar to a given singer. ### Method GET ### Endpoint /singer/sim ### Parameters #### Query Parameters - **singermid** (string) - Required - The unique identifier for the singer. ### Request Example ```json { "example": "/singer/sim?singermid=0025NhlN2yWrP4" } ``` ### Response #### Success Response (200) - **singers** (array) - List of similar singer objects, each containing name and unique ID. Returns a maximum of 10 singers. #### Response Example ```json { "example": "{\"singers\":[{\"name\":\"相似歌手G\",\"mid\":\"001abcde123456\"}] }" } ``` ``` -------------------------------- ### Get Singer's MVs Source: https://qq-api-soso.vercel.app/index Retrieves a list of MVs by a specific singer, with pagination. ```APIDOC ## GET /singer/mv ### Description Retrieves a list of MVs by a specific singer, with pagination. ### Method GET ### Endpoint /singer/mv ### Parameters #### Query Parameters - **singermid** (string) - Required - The unique identifier for the singer. - **pageNo** (integer) - Optional - Page number. Defaults to 1. - **pageSize** (integer) - Optional - Number of results per page. Defaults to 20. ### Request Example ```json { "example": "/singer/mv?singermid=0025NhlN2yWrP4&pageNo=1&pageSize=15" } ``` ### Response #### Success Response (200) - **mvs** (array) - List of MV objects, including MV ID, name, and album. #### Response Example ```json { "example": "{\"mvs\":[{\"vid\":\"t0032kwa29w\",\"name\":\"歌手MV C\",\"album\":{\"name\":\"相关专辑\"}}] }" } ``` ``` -------------------------------- ### Get New Songs Recommendation Source: https://qq-api-soso.vercel.app/index Fetches recommendations for new songs, categorized by region. ```APIDOC ## GET /new/songs ### Description Fetches recommendations for new songs, categorized by region. ### Method GET ### Endpoint /new/songs ### Parameters #### Query Parameters - **type** (integer) - Optional - Region classification. Defaults to 0 (Latest). Other options: 1 (Mainland China), 2 (Hong Kong & Taiwan), 3 (Europe & America), 4 (Korea), 5 (Japan). ### Request Example ```json { "example": "/new/songs?type=4" } ``` ### Response #### Success Response (200) - **songs** (array) - List of new song objects, including song ID, name, artist, and album. #### Response Example ```json { "example": "{\"songs\":[{\"id\":11223,\"name\":\"新歌A\",\"artists\":[{\"name\":\"歌手C\"}],\"album\":{\"name\":\"新专辑Y\"}}] }" } ``` ``` -------------------------------- ### Get Related Playlists Source: https://qq-api-soso.vercel.app/index Returns a list of playlists that are related to the specified song. ```APIDOC ## GET /song/playlist ### Description Returns a list of playlists that are related to the specified song. ### Method GET ### Endpoint /song/playlist ### Parameters #### Query Parameters - **id** (string) - Required - The song's songid. ### Request Example ``` /song/playlist?id=5105986 ``` ``` -------------------------------- ### Get Lyrics Source: https://qq-api-soso.vercel.app/index Retrieves the lyrics and translated lyrics for a song, which are returned in Base64 format and decoded by the server. ```APIDOC ## GET /lyric ### Description Retrieves the lyrics and translated lyrics for a song, which are returned in Base64 format and decoded by the server. ### Method GET ### Endpoint /lyric ### Parameters #### Query Parameters - **songmid** (string) - Required - The song's MID. ### Response #### Success Response (200) - **lyric** (string) - The decoded lyrics. - **trans** (string) - The decoded translated lyrics. ### Request Example ``` /lyric?songmid=0039MnYb0qxYhV ``` Example with another songmid: ``` /lyric?songmid=000b3wiQ3z0VbG ``` ``` -------------------------------- ### Constructing Music Playback URL Source: https://qq-api-soso.vercel.app/index Illustrates how to construct a music playback URL using the 'domain', 'guid', 'vkey', and 'strMediaMid' obtained from the API. It includes a 'formatMap' to specify different audio quality formats (e.g., 128k, 320k, ape, flac) and their corresponding parameters. ```javascript const formatMap = { size128: { val: '128k', s: 'M500', e: '.mp3', content: 'audio/mpeg', }, size320: { val: '320k', s: 'M800', e: '.mp3', content: 'audio/mpeg', }, sizeape: { val: '无损ape', s: 'A000', e: '.ape', content: 'audio/ape', }, sizeflac: { val: '无损flac', s: 'F000', e: '.flac', content: 'audio/x-flac', } } } const format = 'size320'; const { s, e } = formatMap[format]; // 注意是 strMediaMid 不是 songid, 也不是 songmid,付费歌曲的strMediaMid 和 songmid 不同,非付费歌曲相同 const url = `${domain}${s}${strMediaMid}${e}?guid=${guid}&vkey=${vkey}&fromtag=8&uin=0` ``` -------------------------------- ### Get Singer's Albums Source: https://qq-api-soso.vercel.app/index Retrieves a list of albums by a specific singer, with pagination. ```APIDOC ## GET /singer/album ### Description Retrieves a list of albums by a specific singer, with pagination. ### Method GET ### Endpoint /singer/album ### Parameters #### Query Parameters - **singermid** (string) - Required - The unique identifier for the singer. - **pageNo** (integer) - Optional - Page number. Defaults to 1. - **pageSize** (integer) - Optional - Number of results per page. Defaults to 20. ### Request Example ```json { "example": "/singer/album?singermid=0025NhlN2yWrP4&pageNo=1&pageSize=10" } ``` ### Response #### Success Response (200) - **albums** (array) - List of album objects, including album ID, name, and release date. #### Response Example ```json { "example": "{\"albums\":[{\"mid\":\"002MAeob3zLXwZ\",\"name\":\"歌手专辑B\",\"releaseDate\":\"2022-05-15\"}] }" } ``` ``` -------------------------------- ### Get New Album Recommendations Source: https://qq-api-soso.vercel.app/index Fetches recommendations for new albums, categorized by region and number of results. ```APIDOC ## GET /new/album ### Description Fetches recommendations for new albums, categorized by region and number of results. ### Method GET ### Endpoint /new/album ### Parameters #### Query Parameters - **type** (integer) - Optional - Region classification. Defaults to 1 (Mainland China). Options: 1 (Mainland China), 2 (Hong Kong & Taiwan), 3 (Europe & America), 4 (Korea), 5 (Japan), 6 (Others). - **num** (integer) - Optional - Number of albums to return. Defaults to 10. ### Request Example ```json { "example": "/new/album?type=5&num=5" } ``` ### Response #### Success Response (200) - **albums** (array) - List of new album objects, including album ID, name, artist, and release date. #### Response Example ```json { "example": "{\"albums\":[{\"mid\":\"002MAeob3zLXwZ\",\"name\":\"最新专辑Z\",\"artist\":{\"name\":\"歌手D\"},\"releaseDate\":\"2023-10-27\"}] }" } ``` ``` -------------------------------- ### Get MV Playback URL Source: https://qq-api-soso.vercel.app/index Fetches direct playback URLs for MVs. Multiple MV IDs can be provided, separated by commas. The returned URLs are complete and playable. ```api /mv/url?id=t0032kwa29w ``` -------------------------------- ### Get MV Playback URL Source: https://qq-api-soso.vercel.app/index Retrieves direct playback URLs for MVs. Multiple IDs can be provided, separated by commas. ```APIDOC ## GET /mv/url ### Description Retrieves direct playback URLs for MVs. Multiple IDs can be provided, separated by commas. ### Method GET ### Endpoint /mv/url ### Parameters #### Query Parameters - **id** (string) - Required - The video ID (vid) of the MV. ``` -------------------------------- ### Configure QQ Music API Server Port and QQ Number Source: https://qq-api-soso.vercel.app/index Explains how to configure the QQ Music API server's port and the QQ number used for authentication. This can be done by modifying the 'bin/config.js' file or by setting environment variables during the npm start command. ```bash $ npm start PORT=3400 QQ=7654321 ``` -------------------------------- ### Get Playlists by Category Source: https://qq-api-soso.vercel.app/index Retrieves playlists based on a specified category. Supports pagination and sorting. ```APIDOC ## GET /songlist/list ### Description Retrieves playlists based on a specified category. Supports pagination and sorting. ### Method GET ### Endpoint /songlist/list ### Parameters #### Query Parameters - **pageSize** (integer) - Optional - The number of results per page, defaults to 20. - **pageNo** (integer) - Optional - The page number, defaults to 1. - **sort** (integer) - Optional - Sorting order: 5 (recommended), 2 (latest). Other numbers default to recommended. - **category** (string) - Optional - The category ID. Defaults to '10000000' (all categories). Obtain IDs from the /songlist/category endpoint. ### Request Example ``` /songlist/list?category=10000000 ``` ``` -------------------------------- ### Get Playlist Details Source: https://qq-api-soso.vercel.app/index Retrieves detailed information about a playlist, including file sizes for various audio formats. ```APIDOC ## GET /songlist ### Description Retrieves detailed information about a playlist, including file sizes for various audio formats. Sizes of 0 indicate the format is not available. ### Method GET ### Endpoint /songlist ### Parameters #### Query Parameters - **id** (string) - Required - The playlist ID. ### Response #### Success Response (200) - **size128** (integer) - File size for 128k mp3. - **size320** (integer) - File size for 320k mp3. - **sizeape** (integer) - File size for lossless ape. - **sizeflac** (integer) - File size for lossless flac. ### Response Example ``` /songlist?id=2429907335 ``` ``` -------------------------------- ### Get Daily Recommended Playlist Source: https://qq-api-soso.vercel.app/index Fetches the daily recommended playlist. This endpoint requires user authentication via cookies and does not accept any parameters. ```api /recommend/daily ``` -------------------------------- ### Get Song Details Source: https://qq-api-soso.vercel.app/index Fetches detailed information about a specific song using its songmid. Includes artist, album, genre, and style, but not lyrics. Provides a template for album cover image URLs. ```string `https://y.gtimg.cn/music/photo_new/T002R300x300M000${mid}.jpg` ``` -------------------------------- ### Get Recommended Playlists by Category Source: https://qq-api-soso.vercel.app/index Retrieves a list of recommended playlists based on a specified category ID. Supports pagination. ```APIDOC ## GET /recommend/playlist ### Description Retrieves a list of recommended playlists based on a specified category ID. Supports pagination. ### Method GET ### Endpoint /recommend/playlist ### Parameters #### Query Parameters - **id** (integer) - Optional - Category ID. Defaults to 3317 (Official Playlists). Other IDs include 59 (Classic), 71 (Love Songs), 3056 (Online Songs), 64 (KTV Hot Songs). - **pageNo** (integer) - Optional - Page number. Defaults to 1. - **pageSize** (integer) - Optional - Number of results per page. Defaults to 20. ### Request Example ```json { "example": "/recommend/playlist?id=71&pageNo=2&pageSize=10" } ``` ### Response #### Success Response (200) - **playlists** (array) - List of playlist objects, each containing details like playlist ID, name, cover image, and creator. #### Response Example ```json { "example": "{\"playlists\":[{\"id\":12345,\"name\":\"情歌精选\",\"picUrl\":\"http://example.com/cover.jpg\",\"creator\":{\"nickname\":\"用户A\"}}]}" } ``` ``` -------------------------------- ### Get Song Information Source: https://qq-api-soso.vercel.app/index Retrieves comprehensive information about a single song, including artist, album, genre, and more, but not lyrics. Provides a path for album cover images. ```APIDOC ## GET /song ### Description Retrieves comprehensive information about a single song, including artist, album, genre, and more, but not lyrics. Provides a path for album cover images. ### Method GET ### Endpoint /song ### Parameters #### Query Parameters - **songmid** (string) - Required - The song's MID. ### Response #### Success Response (200) - **songinfo** (object) - Contains detailed song information. - **data** (object) - **track_info** (object) - **album** (object) - **mid** (string) - The album's MID. ### Response Example ``` /song?songmid=0039MnYb0qxYhV ``` Album cover image path example: `https://y.gtimg.cn/music/photo_new/T002R300x300M000${mid}.jpg` ``` -------------------------------- ### Get User Favorite Playlists Source: https://qq-api-soso.vercel.app/index Retrieves playlists that a user has favorited. Supports pagination. ```APIDOC ## GET /user/collect/songlist ### Description Retrieves playlists that a user has favorited. Supports pagination. ### Method GET ### Endpoint /user/collect/songlist ### Parameters #### Query Parameters - **id** (string) - Required - The user's QQ number. Defaults to the 'uin' from the cookie. - **pageNo** (integer) - Optional - The page number, defaults to 1. - **pageSize** (integer) - Optional - The number of results per page, defaults to 20. ### Request Example ``` /user/collect/songlist?id=123456 ``` ``` -------------------------------- ### Get Singer's Albums Source: https://qq-api-soso.vercel.app/index Retrieves a list of albums by a specific singer. Supports pagination with default page number and page size. Requires the 'singermid' parameter. ```api /singer/album?singermid=0025NhlN2yWrP4 ``` -------------------------------- ### Get Singer List by Category Source: https://qq-api-soso.vercel.app/index Retrieves a list of singers based on specified categories (region, genre, etc.), with pagination. ```APIDOC ## GET /singer/list ### Description Retrieves a list of singers based on specified categories (region, genre, etc.), with pagination. ### Method GET ### Endpoint /singer/list ### Parameters #### Query Parameters - **area** (integer) - Optional - Region category ID. Defaults to -100. - **genre** (integer) - Optional - Style category ID. Defaults to -100. - **index** (string) - Optional - Initial letter for filtering singers. Defaults to -100. - **sex** (integer) - Optional - Gender or group category ID. Defaults to -100. - **pageNo** (integer) - Optional - Page number. Defaults to 1. ### Request Example ```json { "example": "/singer/list?area=1&genre=10&pageNo=2" } ``` ### Response #### Success Response (200) - **singers** (array) - List of singer objects, each containing name and unique ID. Returns 80 singers per request. #### Response Example ```json { "example": "{\"singers\":[{\"name\":\"歌手H\",\"mid\":\"003xyz789abcde\"}] }" } ``` ``` -------------------------------- ### Get User Favorite Albums Source: https://qq-api-soso.vercel.app/index Retrieves albums that a user has favorited. Supports pagination. ```APIDOC ## GET /user/collect/album ### Description Retrieves albums that a user has favorited. Supports pagination. ### Method GET ### Endpoint /user/collect/album ### Parameters #### Query Parameters - **id** (string) - Required - The user's QQ number. Defaults to the 'uin' from the cookie. - **pageNo** (integer) - Optional - The page number, defaults to 1. - **pageSize** (integer) - Optional - The number of results per page, defaults to 20. ### Request Example ``` /user/collect/album?id=123456 ``` ``` -------------------------------- ### Get Download URL Source: https://qq-api-soso.vercel.app/index Retrieves download URLs for songs with specified quality. Requires songmid and optionally supports mediaId, type, and redirect options. ```APIDOC ## GET /song/url ### Description Retrieves download URLs for songs with specified quality. Requires songmid and optionally supports mediaId, type, and redirect options. Not all songs may have lossless or high-quality versions. ### Method GET ### Endpoint /song/url ### Parameters #### Query Parameters - **id** (string) - Required - The song's songmid. - **type** (integer) - Optional - Desired quality: 128 (mp3 128k), 320 (mp3 320k), m4a (m4a 128k), flac (lossless flac), ape (lossless ape). - **mediaId** (string) - Optional - The strMediaId field from other interfaces. Defaults to songmid if not provided. - **isRedirect** (integer) - Optional - Defaults to 0. If non-zero, redirects directly to the playback URL. ### Request Example ``` /song/url?id=0039MnYb0qxYhV ``` ``` -------------------------------- ### Get Singer's MVs Source: https://qq-api-soso.vercel.app/index Fetches a list of MVs by a specific singer. Supports pagination with default page number and page size. Requires the 'singermid' parameter. ```api /singer/mv?singermid=0025NhlN2yWrP4 ``` -------------------------------- ### Get Hot Search Terms Source: https://qq-api-soso.vercel.app/index Retrieves a list of trending search terms and their search volumes. ```APIDOC ## GET /search/hot ### Description Retrieves a list of trending search terms and their search volumes. ### Method GET ### Endpoint /search/hot ### Response #### Success Response (200) - **result** (integer) - Indicates the success of the operation (100 for success). - **data** (array) - An array of objects, where each object contains: - **k** (string) - The hot search term. - **n** (integer) - The search volume for the term. #### Response Example ```json { "result": 100, "data": [ { "k": "PHOENIX 涅槃 ", "n": 440301 }, { "k": "嚣张 ", "n": 430912 } ] } ``` ``` -------------------------------- ### Get Singer Categories Source: https://qq-api-soso.vercel.app/index Retrieves classification categories for singers, including region, genre, initial letter, and gender/group. ```APIDOC ## GET /singer/category ### Description Retrieves classification categories for singers, including region, genre, initial letter, and gender/group. ### Method GET ### Endpoint /singer/category ### Parameters This endpoint does not require any parameters. ### Request Example ```json { "example": "/singer/category" } ``` ### Response #### Success Response (200) - **categories** (object) - An object containing various singer categories: `area` (region), `genre` (style), `index` (initial letter), and `sex` (gender/group). #### Response Example ```json { "example": "{\"categories\":{\"area\":[{\"name\":\"内地\",\"id\":1}],\"genre\":[{\"name\":\"流行\",\"id\":10}]}}" } ``` ``` -------------------------------- ### Get Followed Users Source: https://qq-api-soso.vercel.app/index Fetches a list of users that the current logged-in user is following. Requires user authentication via cookies and supports pagination. ```api /user/follow/users?pageNo=1&pageSize=20 ``` -------------------------------- ### Get Radio Categories Source: https://qq-api-soso.vercel.app/index Retrieves radio station categories and lists of radio stations within each category. ```APIDOC ## GET /radio/category ### Description Retrieves radio station categories and lists of radio stations within each category. ### Method GET ### Endpoint /radio/category ### Parameters This endpoint does not require any parameters. ### Request Example ```json { "example": "/radio/category" } ``` ### Response #### Success Response (200) - **categories** (array) - List of radio categories, each containing category ID, name, and associated radio stations. #### Response Example ```json { "example": "{\"categories\":[{\"id\":568,\"name\":\"场景电台\",\"radios\":[{\"id\":568,\"name\":\"推荐歌曲\"}]}]}" } ``` ``` -------------------------------- ### Get MV List by Category Source: https://qq-api-soso.vercel.app/index Fetches a list of MVs based on category, area, and version. Supports pagination. Category and version IDs can be obtained from the '/mv/category' endpoint. ```api /mv/list?pageNo=1&pageSize=20&area=15&version=7 ``` -------------------------------- ### Decode Base64 Lyrics Source: https://qq-api-soso.vercel.app/index Retrieves lyrics and translations for a song, encoded in Base64. The Node.js example shows how to decode these values. ```javascript // Example of decoding Base64 lyrics in Node.js // const lyricData = await fetch('/lyric?songmid=...'); // const decodedLyric = Buffer.from(lyricData.lyric, 'base64').toString(); // const decodedTrans = Buffer.from(lyricData.trans, 'base64').toString(); ``` -------------------------------- ### Get Carousel Banners Source: https://qq-api-soso.vercel.app/index Retrieves banner information, currently known to return album recommendations. This endpoint does not require parameters but only provides 'albumid', not 'albummid'. ```api /recommend/banner ``` -------------------------------- ### Get Singer's Hot Songs Source: https://qq-api-soso.vercel.app/index Retrieves a list of popular songs by a specific singer, with pagination. ```APIDOC ## GET /singer/songs ### Description Retrieves a list of popular songs by a specific singer, with pagination. ### Method GET ### Endpoint /singer/songs ### Parameters #### Query Parameters - **singermid** (string) - Required - The unique identifier for the singer. - **num** (integer) - Optional - The number of songs to return. Defaults to 20. - **page** (integer) - Optional - The page number for pagination. Defaults to 1. ### Request Example ```json { "example": "/singer/songs?singermid=0025NhlN2yWrP4&page=1&num=20" } ``` ### Response #### Success Response (200) - **songs** (array) - List of song objects, including song ID, name, and album information. #### Response Example ```json { "example": "{\"songs\":[{\"id\":54321,\"name\":\"热门歌曲X\",\"album\":{\"name\":\"专辑A\"}}] }" } ``` ``` -------------------------------- ### Get Singer List by Category Source: https://qq-api-soso.vercel.app/index Retrieves a list of singers based on specified categories like area, genre, initial letter, and sex/group. Supports pagination. This endpoint returns a fixed 80 items per request. ```api /singer/list?area=-100&genre=-100&index=-100&sex=-100&pageNo=1 ``` -------------------------------- ### Get Singer Categories Source: https://qq-api-soso.vercel.app/index Fetches classification categories for singers, including region, genre, initial letter, and sex/group. This endpoint does not require any parameters. ```api /singer/category ``` -------------------------------- ### Get Songs within an Album Source: https://qq-api-soso.vercel.app/index Fetches a list of songs contained within a specific album. Requires the mandatory 'albummid' parameter. ```api /album/songs?albummid=002MAeob3zLXwZ ``` -------------------------------- ### Get Followed Singers Source: https://qq-api-soso.vercel.app/index Retrieves a list of singers that the current logged-in user is following. Requires user authentication via cookies and supports pagination. ```api /user/follow/singers?pageNo=1&pageSize=20 ```