DIEM API Docs

本页面更新于:January 02, 2019
API 更新于:January 06, 2019

网易云音乐

接口地址:https://api.itswincer.com/cloudmusic/v1/

获取歌词

GET /cloudmusic/media

参数 含义
id 歌曲在网易云音乐播放界面的 id
curl "https://api.itswincer.com/cloudmusic/media?id=498134"

{"songStatus":1,"lyricVersion":15,"lyric":"[00:17.460]Oh Take a look in the mirror you look so sad\n[00:25.500]It's so cold like that winter market we used to go\n[00:32.800]I don't cry anymore but I feel so hurt\n[00:42.000]So I don't need you to close to me\n[00:45.570]You don't hear me so you said\n[00:48.790]I don't know why thing have changed since yesterday\n[00:57.140]This could be love again\n[01:01.070]All I need is you\n[01:05.050]Comeback, I'm waiting, Anytime\n[01:10.070]The heavy rains come\n[01:13.110]Still I miss days with you\n[01:17.290]I can't look into your face\n[01:20.340]Oh Feeling blue and looking back again\n[01:27.150]Please come back to me\n[01:59.240]Oh Take a look in the mirror you look so sad\n[02:05.250]It's so cold like that winter market we used to go\n[02:12.190]I don't cry anymore but I feel so hurt\n[02:19.780]So I don't need you to close to me\n[02:24.410]You don't hear me so you said\n[02:28.740]I don't know why thing have changed since yesterday\n[02:35.510]This could be love again\n[02:39.370]All I need is you\n[02:42.479]Comeback, I'm waiting, Anytime\n[02:47.260]The heavy rains come\n[02:50.210]Still I miss days with you\n[02:53.790]I can't look into your face\n[02:57.750]Oh Feeling blue and looking back again\n[03:08.700]Please come back to me\n[03:35.490]To stay with you always\n[03:39.470]You're the world to me, and dreaming on\n[03:44.680]So you can take my sword for you\n[03:49.560]oh How do you feel, so fine\n[03:54.120]You're the world to me, and dream on\n[03:59.630]You stole my heart so long ago\n[04:04.520]Oh I release my soul\n[04:09.630]So you hear my song","code":200}

获取详细信息

GET /cloudmusic/detail

参数 含义
ids 歌曲在网易云音乐播放界面的 id,用中括号括起来
curl "https://api.itswincer.com/cloudmusic/detail?ids=[498134]"

{"songs":[{"name":"Release My Soul","id":498134,"position":12,"alias":[],"status":0,"fee":0,"copyrightId":663018,"disc":"1","no":12,"artists":[{"name":"Aimee Blackschleger","id":225847,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0}],"album":{"name":"ギルティクラウン オリジナルサウンドトラック","id":47595,"type":"专辑","size":19,"picId":2520080650879497,"blurPicUrl":"https://p1.music.126.net/6KcSky4MBsHOFQGbLUTWHg==/2520080650879497.jpg","companyId":0,"pic":2520080650879497,"picUrl":"https://p1.music.126.net/6KcSky4MBsHOFQGbLUTWHg==/2520080650879497.jpg","publishTime":1327420800000,"description":"","tags":"","company":"Aniplex","briefDesc":"","artist":{"name":"","id":0,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0},"songs":[],"alias":["TV动画《罪恶王冠》原声带"],"status":1,"copyrightId":0,"commentThreadId":"R_AL_3_47595","artists":[{"name":"澤野弘之","id":15290,"picId":0,"img1v1Id":0,"briefDesc":"","picUrl":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","img1v1Url":"https://p1.music.126.net/6y-UleORITEDbvrOLV0Q8A==/5639395138885805.jpg","albumSize":0,"alias":[],"trans":"","musicSize":0,"topicPerson":0}],"subType":"录音室版","transName":null},"starred":false,"popularity":100.0,"score":100,"starredNum":0,"duration":274480,"playedNum":0,"dayPlays":0,"hearTime":0,"ringtone":"","crbt":null,"audition":null,"copyFrom":"","commentThreadId":"R_SO_4_498134","rtUrl":null,"ftype":0,"rtUrls":[],"copyright":2,"transName":null,"sign":null,"rurl":null,"mvid":0,"rtype":0,"bMusic":{"name":null,"id":101615103,"size":3294607,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":96000,"playTime":274480,"volumeDelta":-0.26},"mp3Url":null,"hMusic":{"name":null,"id":101615101,"size":10981920,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":320000,"playTime":274480,"volumeDelta":-0.66},"mMusic":{"name":null,"id":101615102,"size":5490982,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":160000,"playTime":274480,"volumeDelta":-0.24},"lMusic":{"name":null,"id":101615103,"size":3294607,"extension":"mp3","sr":44100,"dfsId":0,"bitrate":96000,"playTime":274480,"volumeDelta":-0.26}}],"equalizers":{},"code":200}

获取歌曲直链

注意:此获取歌曲直链的 API 为官方的。会直接 302 至歌曲的缓存地址。

GET /song/media/outer/url?id

参数 含义
id 歌曲在网易云音乐播放界面的 id + .mp3
curl "https://music.163.com/song/media/outer/url?id=498134.mp3" -I

HTTP/1.1 302 Found
Server: nginx
Date: Fri, 04 Jan 2019 13:19:05 GMT
Content-Length: 0
Connection: keep-alive
Cache-Control: no-store
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Cache-Control: no-cache
Location: https://m10.music.126.net/20190104213905/65e1b11b4306d2a69a34c1f88e80719c/ymusic/3875/c414/5be5/af8e7aed480175d2855e027f813818ff.mp3
X-Via: MusicServer
X-From-Src: 103.95.218.206

使用

为简化使用的步骤,如果你想在你的网站使用的话,将以下两行代码加入网页即可使用(播放器用的是 APlayer)。

<div id="aplayer" musicid="498134"></div>
<script src="https://api.itswincer.com/music/v1/" async></script>

在 div 的 musicid 中填入歌曲的 id 即可。

测试

网易云歌曲 ID:    

点击上方按钮后如没反应请稍等一会儿, 歌曲正在加载哦 ~