本文部分内容有所参考但不记得原文作者及出处,在此感谢原作者并致歉!
搜索音乐API
这个接口会返回4首歌曲和1到2位歌手信息以及两张专辑两张MV信息
例子如下:
返回参数简析
{
docid: "102296985",
id: "102296985",
mid: "002mZevo3wHvsc", //用来播放音乐,下面有播放用的接口
name: "有何不可",
singer: "许嵩"
},
{
docid: "7221",
id: "7221",
mid: "000CK5xN3yZDJt", //用来搜索歌手所有歌曲专辑之类,请求方法也在后面
name: "许嵩",
pic: "http://imgcache.qq.com/music/photo/mid_singer_58/J/t/000CK5xN3yZDJt.jpg",
singer: "许嵩"
}
推荐音乐API (轮播图,电台,推荐歌单等内容)
歌曲榜单API
获得榜单ID
返回部分数据如下:
topList: [
{
id: 4,
listenCount: 19800000,
picUrl: "http://y.gtimg.cn/music/common/upload/iphone_order_channel/toplist_4_300_216514336.jpg",
songList: [
{
singername: "薛之谦",
songname: "违背的青春"
},
{
singername: "ONER",
songname: "过敏(ALLERGY)"
},
{
singername: "ONER",
songname: "会不会(WILL U)"
}
],
topTitle: "巅峰榜·流行指数",
type: 0
}
]
id = 4 榜单id
根据榜单ID获得榜单的歌曲列表API
http://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?g_tk=1928093487&inCharset=utf-8&outCharset=utf-8¬ice=0&format=jsonp&topid={id}&needNewCode=1&uin=0&tpl=3&page=detail&type=top&platform=h5&jsonpCallback=jp1
例子:
返回部分数据如下:
"songlist": [
{
"Franking_value": "718480",
"cur_count": "718480",
"data": {
"albumdesc": "致不易青年主题曲",
"albumid": 4525196,
"albummid": "003Rtibw458BC5",
"albumname": "违背的青春",
"alertid": 11,
"belongCD": 1,
"cdIdx": 0,
"interval": 336,
"isonly": 0,
"label": "0",
"msgid": 0,
"pay": {
"payalbum": 0,
"payalbumprice": 0,
"paydownload": 0,
"payinfo": 0,
"payplay": 0,
"paytrackmouth": 0,
"paytrackprice": 0,
"timefree": 0
},
"preview": {
"trybegin": 0,
"tryend": 0,
"trysize": 0
},
"rate": 31,
"singer": [
{
"id": 5062,
"mid": "002J4UUk29y8BY",
"name": "薛之谦"
}
],
"size128": 5390219,
"size320": 13475222,
"size5_1": 0,
"sizeape": 71700905,
"sizeflac": 71808082,
"sizeogg": 7867433,
"songid": 216514336,
"songmid": "0032ZOkm0LBgHW",
"songname": "违背的青春",
"songorig": "违背的青春",
"songtype": 0,
"strMediaMid": "0032ZOkm0LBgHW",
"stream": 1,
"switch": 605971,
"type": 0,
"vid": ""
},
"in_count": "2.874",
"mb": "xuezhiqian",
"old_count": "0",
"vid": {
"Fstatus": null
}
}
}
"albummid": "003Rtibw458BC5" 歌曲图片
"albumname": "违背的青春" 歌名
"name": "薛之谦" 歌手名
"songmid": "0032ZOkm0LBgHW" 歌曲id
"mid": "002J4UUk29y8BY" 歌手id
"size128": 5390219 歌词编号
获取歌曲图片API
https://y.gtimg.cn/music/photo_new/T002R300x300M000{albummid}.jpg?max_age=2592000
例子:
https://y.gtimg.cn/music/photo_new/T002R300x300M000003Rtibw458BC5.jpg?max_age=2592000
播放音乐API
http://ws.stream.qqmusic.qq.com/C100{songmid}.m4a?fromtag=0&guid=126548448
例子:
http://ws.stream.qqmusic.qq.com/C1000032ZOkm0LBgHW.m4a?fromtag=0&guid=126548448
歌词API:
例子:
歌手歌曲API(通过歌手ID查询歌手的所有歌曲)
https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg?g_tk=5381&inCharset=utf-8&outCharset=utf-8¬ice=0&format=jsonp&hostUin=0&needNewCode=0&platform=yqq&order=listen&begin=0&num=40&songstatus=1&singermid={mid}&jsonpCallback=callback
例子: