网易云评论
获取网易云音乐歌曲评论,支持分页
GET
https://api.tinyaii.cn/v1/netease/comments
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| id | string | 必填 | 歌曲ID | 2662395717 |
| limit | int | 可选 | 每页条数(默认20,最大100) | 20 |
| offset | int | 可选 | 偏移量(默认0) | 0 |
返回字段
| 字段 | 类型 | 说明 |
|---|---|---|
| data.total | int | 评论总数 |
| data.comments | array | 评论列表 |
| data.comments[].id | int | 评论ID |
| data.comments[].nickname | string | 用户昵称 |
| data.comments[].content | string | 评论内容 |
| data.comments[].likedCount | int | 点赞数 |
返回示例
{
"code": 200,
"data": {
"total": 991,
"comments": [
{
"id": 1,
"nickname": "用户",
"content": "评论内容",
"likedCount": 12
}
]
}
}
调用示例
curl "https://api.tinyaii.cn/v1/netease/comments?id=2662395717" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch("https://api.tinyaii.cn/v1/netease/comments?id=2662395717", {
headers: { "Authorization": "Bearer YOUR_API_KEY" },
});
console.log(await res.json());import requests
resp = requests.get(
"https://api.tinyaii.cn/v1/netease/comments",
params={"id": "2662395717"},
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=10,
)
print(resp.json())把 YOUR_API_KEY 换成你的密钥即可直接运行。密钥只保存在你自己的设备上。