From 2dd12b88ae5d5faef6d00f645b647a434a5908ab Mon Sep 17 00:00:00 2001 From: MoeFurina Date: Sun, 8 Mar 2026 11:42:32 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=E5=B9=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E9=83=A8=E5=88=86=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/comment_delete.js | 10 +++++ module/comment_reply.js | 13 ++++++ module/search_suggest_pc.js | 13 ++++++ module/song_like.js | 12 ++++++ module/voicelist_my_created.js | 13 ++++++ module/voicelist_search.js | 15 +++---- public/docs/home.md | 72 ++++++++++++++++++++++++++++++++-- 7 files changed, 136 insertions(+), 12 deletions(-) create mode 100644 module/comment_delete.js create mode 100644 module/comment_reply.js create mode 100644 module/search_suggest_pc.js create mode 100644 module/song_like.js create mode 100644 module/voicelist_my_created.js diff --git a/module/comment_delete.js b/module/comment_delete.js new file mode 100644 index 0000000..a89f298 --- /dev/null +++ b/module/comment_delete.js @@ -0,0 +1,10 @@ +// 删除评论 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + const data = { + commentId: query.commentId, + threadId: query.threadId, + } + return request(`/api/resource/comments/delete`, data, createOption(query)) +} diff --git a/module/comment_reply.js b/module/comment_reply.js new file mode 100644 index 0000000..bd863ab --- /dev/null +++ b/module/comment_reply.js @@ -0,0 +1,13 @@ +// 回复评论 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + const data = { + threadId: query.threadId, + commentId: query.commentId, + content: query.content, + resourceType: '0', + resourceId: '0', + } + return request(`/api/v1/resource/comments/reply`, data, createOption(query)) +} diff --git a/module/search_suggest_pc.js b/module/search_suggest_pc.js new file mode 100644 index 0000000..95cc744 --- /dev/null +++ b/module/search_suggest_pc.js @@ -0,0 +1,13 @@ +// 搜索建议pc端 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + const data = { + keyword: query.keyword || '', + } + return request( + `/api/search/pc/suggest/keyword/get`, + data, + createOption(query), + ) +} diff --git a/module/song_like.js b/module/song_like.js new file mode 100644 index 0000000..5c869c8 --- /dev/null +++ b/module/song_like.js @@ -0,0 +1,12 @@ +// 喜欢歌曲 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + query.like = query.like == 'false' ? false : true + const data = { + trackId: query.id, + userid: query.uid, + like: query.like, + } + return request(`/api/song/like`, data, createOption(query)) +} diff --git a/module/voicelist_my_created.js b/module/voicelist_my_created.js new file mode 100644 index 0000000..99296a9 --- /dev/null +++ b/module/voicelist_my_created.js @@ -0,0 +1,13 @@ +// 我创建的播客声音 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + const data = { + limit: query.page || 20, + } + return request( + `/api/social/my/created/voicelist/v1`, + data, + createOption(query, 'weapi'), + ) +} diff --git a/module/voicelist_search.js b/module/voicelist_search.js index 712675a..bba9f09 100644 --- a/module/voicelist_search.js +++ b/module/voicelist_search.js @@ -1,14 +1,11 @@ const createOption = require('../util/option.js') module.exports = (query, request) => { const data = { - fee: '-1', - limit: query.limit || '200', - offset: query.offset || '0', - podcastName: query.podcastName || '', + keyword: query.keyword || '', + scene: 'normal', + limit: query.limit || '10', + offset: query.offse || '30', + e_r: true, } - return request( - `/api/voice/workbench/voicelist/search`, - data, - createOption(query), - ) + return request(`/api/search/voicelist/get`, data, createOption(query)) } diff --git a/public/docs/home.md b/public/docs/home.md index 5420b42..7db32c8 100644 --- a/public/docs/home.md +++ b/public/docs/home.md @@ -4118,14 +4118,16 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` **接口地址:** `/voicelist/search` +**必选参数:** + +`keyword`: 搜索关键词 + **可选参数:** -`limit`: 取出歌单数量 , 默认为 200 +`limit`: 取出歌单数量, 默认为 10 `offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*200, 其中 200 为 limit 的值 -`podcastName`: 播客名称 - ### 播客声音列表 说明: 可以获取播客里的声音 @@ -5065,6 +5067,70 @@ let data = encodeURIComponent( **调用例子 :** `/user/playlist/collect?uid=32953014` +### 搜索建议 - PC端 + +说明 : 调用此接口, 传入搜索关键词, 获取搜索建议 + +**必选参数 :** + +`keyword`: 搜索关键词 + +**接口地址 :** `/search/suggest/pc` + +**调用例子 :** `/search/suggest/pc?keyword=海阔天空` + +### 喜欢歌曲 - 新版 + +说明 : 登录后调用此接口, 传入歌曲 id 用户id和喜欢状态, 可喜欢/取消喜欢歌曲 + +**必选参数 :** + +`id`: 歌曲 id +`uid`: 用户 id +`like`: 喜欢状态, true 表示喜欢, false 表示取消喜欢 + +**接口地址 :** `/song/like` + +**调用例子 :** `/song/like?id=2058263032&uid=32953014&like=true` + +### 我创建的博客声音 + +说明 : 登录后调用此接口, 获取我创建的博客声音 + +**可选参数 :** + +`limit` : 返回数量 , 默认为 20 + +**接口地址 :** `/voicelist/my/created` + +**调用例子 :** `/voicelist/my/created` + +### 发布评论 + +说明 : 登录后调用此接口, 传入歌曲 id, 评论内容等信息, 发布评论 + +**必选参数 :** + +`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取 +`commentId`: 回复评论 id, 若为回复评论则必填 +`content`: 评论内容 + +**接口地址 :** `/comment/reply` + +**调用例子 :** `/comment/reply?threadId=R_SO_4_2058263032&content=这首歌太棒了!` + +### 删除评论 + +说明 : 登录后调用此接口, 传入评论 id, 删除评论 + +**必选参数 :** +`commentId`: 评论 id +`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取 + +**接口地址 :** `/comment/delete` + +**调用例子 :** `/comment/delete?threadId=R_SO_4_2058263032&commentId=123456789` + ## 离线访问此文档 此文档同时也是 Progressive Web Apps(PWA), 加入了 serviceWorker, 可离线访问 From c1b8a381f337c7b48c2f6a3d7729fd3c23bd7bd1 Mon Sep 17 00:00:00 2001 From: ElyPrism Date: Sun, 8 Mar 2026 11:53:03 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix:=20module/voicelist=5Fsearch.js=20?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- module/voicelist_search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/voicelist_search.js b/module/voicelist_search.js index bba9f09..0220ae6 100644 --- a/module/voicelist_search.js +++ b/module/voicelist_search.js @@ -4,7 +4,7 @@ module.exports = (query, request) => { keyword: query.keyword || '', scene: 'normal', limit: query.limit || '10', - offset: query.offse || '30', + offset: query.offset || '30', e_r: true, } return request(`/api/search/voicelist/get`, data, createOption(query)) From 288459cddbbbedc952bc4c8c5d1b5f4f2864caa5 Mon Sep 17 00:00:00 2001 From: ElyPrism Date: Sun, 8 Mar 2026 11:59:15 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- module/voicelist_my_created.js | 2 +- public/docs/home.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/voicelist_my_created.js b/module/voicelist_my_created.js index 99296a9..84f73af 100644 --- a/module/voicelist_my_created.js +++ b/module/voicelist_my_created.js @@ -3,7 +3,7 @@ const createOption = require('../util/option.js') module.exports = (query, request) => { const data = { - limit: query.page || 20, + limit: query.limit || 20, } return request( `/api/social/my/created/voicelist/v1`, diff --git a/public/docs/home.md b/public/docs/home.md index 7db32c8..75dc8b5 100644 --- a/public/docs/home.md +++ b/public/docs/home.md @@ -4126,7 +4126,7 @@ type='1009' 获取其 id, 如`/search?keywords= 代码时间 &type=1009` `limit`: 取出歌单数量, 默认为 10 -`offset`: 偏移数量 , 用于分页 , 如 :( 评论页数 -1)\*200, 其中 200 为 limit 的值 +`offset`: 偏移数量 , 用于分页 , 默认为 30 ### 播客声音列表 @@ -5093,7 +5093,7 @@ let data = encodeURIComponent( **调用例子 :** `/song/like?id=2058263032&uid=32953014&like=true` -### 我创建的博客声音 +### 我创建的播客声音 说明 : 登录后调用此接口, 获取我创建的博客声音 @@ -5107,7 +5107,7 @@ let data = encodeURIComponent( ### 发布评论 -说明 : 登录后调用此接口, 传入歌曲 id, 评论内容等信息, 发布评论 +说明 : 登录后调用此接口, 传入评论线程 id, 评论内容等信息, 发布评论 **必选参数 :** From 2e3cf4d451721e62a80a7d958bc7c8091fb4d1a1 Mon Sep 17 00:00:00 2001 From: ElyPrism Date: Sun, 8 Mar 2026 12:00:17 +0800 Subject: [PATCH 4/6] Apply suggestion from @gemini-code-assist[bot] Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- module/song_like.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/song_like.js b/module/song_like.js index 5c869c8..e380394 100644 --- a/module/song_like.js +++ b/module/song_like.js @@ -2,11 +2,11 @@ const createOption = require('../util/option.js') module.exports = (query, request) => { - query.like = query.like == 'false' ? false : true + const like = query.like !== 'false' const data = { trackId: query.id, userid: query.uid, - like: query.like, + like: like, } return request(`/api/song/like`, data, createOption(query)) } From 4d8c4daa14598ad7e511d961573f7cb8583f9c23 Mon Sep 17 00:00:00 2001 From: MoeFurina Date: Fri, 13 Mar 2026 23:35:03 +0800 Subject: [PATCH 5/6] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/comment_add.js | 15 +++++++++++++++ module/comment_delete.js | 4 ++-- module/comment_reply.js | 2 +- module/user_followeds.js | 2 +- package.json | 2 +- public/docs/home.md | 28 ++++++++++++++++++++-------- 6 files changed, 40 insertions(+), 13 deletions(-) create mode 100644 module/comment_add.js diff --git a/module/comment_add.js b/module/comment_add.js new file mode 100644 index 0000000..4d1244c --- /dev/null +++ b/module/comment_add.js @@ -0,0 +1,15 @@ +// 对某一首歌曲发表评论 + +const createOption = require('../util/option.js') +module.exports = (query, request) => { + const data = { + threadId: 'R_SO_4_' + query.id, + content: query.content, + resourceType: '0', + resourceId: '0', + expressionPicId: '-1', + bubbleId: '-1', + checkToken: '', + } + return request('/api/resource/comments/add', data, createOption(query)) +} diff --git a/module/comment_delete.js b/module/comment_delete.js index a89f298..9eb182a 100644 --- a/module/comment_delete.js +++ b/module/comment_delete.js @@ -3,8 +3,8 @@ const createOption = require('../util/option.js') module.exports = (query, request) => { const data = { - commentId: query.commentId, - threadId: query.threadId, + commentId: query.cid, + threadId: 'R_SO_4_' + query.id, } return request(`/api/resource/comments/delete`, data, createOption(query)) } diff --git a/module/comment_reply.js b/module/comment_reply.js index bd863ab..d64e012 100644 --- a/module/comment_reply.js +++ b/module/comment_reply.js @@ -3,7 +3,7 @@ const createOption = require('../util/option.js') module.exports = (query, request) => { const data = { - threadId: query.threadId, + threadId: query.id, commentId: query.commentId, content: query.content, resourceType: '0', diff --git a/module/user_followeds.js b/module/user_followeds.js index 397ca13..992886f 100644 --- a/module/user_followeds.js +++ b/module/user_followeds.js @@ -5,7 +5,7 @@ module.exports = (query, request) => { const data = { userId: query.uid, time: '0', - limit: query.limit || 30, + limit: query.limit || 20, offset: query.offset || 0, getcounts: 'true', } diff --git a/package.json b/package.json index ac3f0b4..3770b01 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@neteasecloudmusicapienhanced/api", - "version": "4.30.2", + "version": "4.30.3", "description": "全网最全的网易云音乐API接口 || A revival project for NeteaseCloudMusicApi Node.js Services (Half Refactor & Enhanced) || 网易云音乐 API 备份 + 增强 || 本项目自原版v4.28.0版本后开始自行维护", "scripts": { "dev": "nodemon app.js", diff --git a/public/docs/home.md b/public/docs/home.md index 75dc8b5..31f653a 100644 --- a/public/docs/home.md +++ b/public/docs/home.md @@ -783,7 +783,7 @@ tags: 歌单标签 **必选参数 :** `uid` : 用户 id **可选参数 :** -`limit` : 返回数量 , 默认为 30 +`limit` : 返回数量 , 默认为 20 `offset` : 偏移数量,用于分页 ,如 :( 页数 -1)\*30, 其中 30 为 limit 的值 , 默认为 0 @@ -5111,25 +5111,37 @@ let data = encodeURIComponent( **必选参数 :** -`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取 -`commentId`: 回复评论 id, 若为回复评论则必填 +`id`: 歌曲id `content`: 评论内容 -**接口地址 :** `/comment/reply` +**接口地址 :** `/comment/add` -**调用例子 :** `/comment/reply?threadId=R_SO_4_2058263032&content=这首歌太棒了!` +**调用例子 :** `/comment/add?id=2058263032&content=这首歌太棒了!` ### 删除评论 说明 : 登录后调用此接口, 传入评论 id, 删除评论 **必选参数 :** -`commentId`: 评论 id -`threadId`: 评论线程 id, 可通过获取评论接口返回结果的`threadId`参数获取 +`cid`: 评论 id +`id`: 歌曲id **接口地址 :** `/comment/delete` -**调用例子 :** `/comment/delete?threadId=R_SO_4_2058263032&commentId=123456789` +**调用例子 :** `/comment/delete?threadId=2058263032&commentId=123456789` + +### 回复评论 + +说明 : 登录后调用此接口, 传入歌曲 id, 回复内容等信息, 回复评论 + +**必选参数 :** +`id`: 歌曲id +`commentId`: 被回复的评论 id +`content`: 回复内容 + +**接口地址 :** `/comment/reply` + +**调用例子 :** `/comment/reply?id=2058263032&commentId=123456789&content=我也觉得这首歌很棒!` ## 离线访问此文档 From 8521c198d38b136cb99641d6486ff3d09b9c9b0b Mon Sep 17 00:00:00 2001 From: MoeFurina Date: Sat, 14 Mar 2026 00:25:43 +0800 Subject: [PATCH 6/6] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0readme?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.MD | 1 + 1 file changed, 1 insertion(+) diff --git a/README.MD b/README.MD index fa5b1da..9d2137b 100644 --- a/README.MD +++ b/README.MD @@ -210,6 +210,7 @@ pnpm test ## 贡献与社区 - 欢迎提交 PR、Issue 参与维护 +- 要贡献新接口, 请参考[这篇文章](https://www.focalors.ltd/post/how-to-contribute-ncm-api) ### 致谢