2018/9月4号测试QQ音乐API部分解析(一)

本文部分内容有所参考但不记得原文作者及出处,在此感谢原作者并致歉!

搜索音乐API

这个接口会返回4首歌曲和1到2位歌手信息以及两张专辑两张MV信息

https://c.y.qq.com/splcloud/fcgi-bin/smartbox_new.fcg?is_xml=0&format=jsonp&g_tk=5381&jsonpCallback=SmartboxKeysCallbackmod_top_search3847&loginUin=0&hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq&needNewCode=0&key={关键词}

例子如下:

https://c.y.qq.com/splcloud/fcgi-bin/smartbox_new.fcg?is_xml=0&format=jsonp&g_tk=5381&jsonpCallback=SmartboxKeysCallbackmod_top_search3847&loginUin=0&hostUin=0&format=jsonp&inCharset=utf8&outCharset=utf-8&notice=0&platform=yqq&needNewCode=0&key=%E8%AE%B8%E5%B5%A9

返回参数简析

{
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 (轮播图,电台,推荐歌单等内容)

https://c.y.qq.com/musichall/fcgi-bin/fcg_yqqhomepagerecommend.fcg?g_tk=5381&inCharset=utf-8&outCharset=utf-8&notice=0&format=jsonp&platform=h5&uin=0&needNewCode=1&jsonpCallback=callback

歌曲榜单API

获得榜单ID

https://c.y.qq.com/v8/fcg-bin/fcg_myqq_toplist.fcg?g_tk=1928093487&inCharset=utf-8&outCharset=utf-8&notice=0&format=jsonp&uin=0&needNewCode=1&platform=h5&jsonpCallback=jp1

返回部分数据如下:

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&notice=0&format=jsonp&topid={id}&needNewCode=1&uin=0&tpl=3&page=detail&type=top&platform=h5&jsonpCallback=jp1

例子:

http://c.y.qq.com/v8/fcg-bin/fcg_v8_toplist_cp.fcg?g_tk=1928093487&inCharset=utf-8&outCharset=utf-8&notice=0&format=jsonp&topid=4&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:

https://route.showapi.com/213-2?showapi_appid=54411&showapi_sign=55b7ca99e210452a86269a9f09def34c&musicid={songMid}

例子:

https://route.showapi.com/213-2?showapi_appid=54411&showapi_sign=55b7ca99e210452a86269a9f09def34c&musicid=001Js78a40BZU6

歌手歌曲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&notice=0&format=jsonp&hostUin=0&needNewCode=0&platform=yqq&order=listen&begin=0&num=40&songstatus=1&singermid={mid}&jsonpCallback=callback

例子:

https://c.y.qq.com/v8/fcg-bin/fcg_v8_singer_track_cp.fcg?g_tk=5381&inCharset=utf-8&outCharset=utf-8&notice=0&format=jsonp&hostUin=0&needNewCode=0&platform=yqq&order=listen&begin=0&num=40&songstatus=1&singermid=002J4UUk29y8BY&jsonpCallback=callback

猜你喜欢

转载自blog.csdn.net/weixin_41735943/article/details/82469069