文檔來源:https://api.paugram.com/help/netease
方法
調用地址 https://api.paugram.com/netease/ 並輸入參數 id 或 title,即可獲得一段歌曲 JSON 信息。
如果您已開始使用本 API 服務,則默認視為遵守 本約定。
音樂版權歸網易雲音樂所有,本站不為濫用本 API 進行違規操作者承擔責任。
參數
建議使用 id 的方式獲得歌曲信息,性能相對較好。
| 參數 | 要求 | 描述 |
|---|---|---|
| id 二選一 | 有效的音樂 ID,例:517567145 |
音樂 ID |
| title 二選一 | 可以搜索到且無版權限制的歌曲,暫無加速 | 音樂名稱 |
| playlist(施工中) | 有多首音樂的音樂列表 | 音樂列表 |
| play | 參數值為 true 則啟用跳轉 |
是否直接跳轉到歌曲所在地址 |
返回內容
| 參數名稱 | 描述 | 值 |
|---|---|---|
| id | 音樂 ID | string |
| title | 音樂名稱 | string |
| artist | 音樂藝術家 | string |
| album | 音樂專輯名稱 | string |
| cover | 音樂專輯圖片鏈接(https) | string |
| link | 音樂源地址鏈接 | string |
| lyric | 音樂 LRC 歌詞內容 | string |
| sub_lyric | 翻譯版 LRC 歌詞內容(如果有) | string |
| served | 是否為 VIP 或無版權歌曲(測試功能) | true false |
示例
通過 ID 獲得一首歌的信息
https://api.paugram.com/netease/?id=517567145
返回的是:
{
"id": 517567145,
"title": "初登校",
"artist": "橋本由香利",
"album": "ひなこのーと COMPLETE SOUNDTRACK",
"cover": 封面地址,
"lyric": 歌詞內容,
"sub_lyric": 翻譯歌詞內容,
"link": 音樂地址
}
通過 ID 獲得一首歌,並跳轉到實際地址
https://api.paugram.com/netease/?id=517567145&play=true
通過歌名獲得一首歌的信息
https://api.paugram.com/netease/?title=Paradise
返回的是:
{
"id": 17177380,
"title": "Paradise",
"artist": "Coldplay",
"album": "Paradise",
"cover": 封面地址,
"lyric": 歌詞內容,
"sub_lyric": 翻譯歌詞內容,
"link": 音樂地址
}
結合 Kico Style 和 Kico Player 使用本 API
ks.ajax({
method: "GET",
url: "https://api.paugram.com/netease/" + "?id=" + id,
success: function (req){
var item = JSON.parse(req.response);
聲明的播放器.add([item]);
},
failed: function (req){
ks.notice("獲取音樂信息錯誤了!", {color: "red"});
}
});
