Skip to content

歌曲

详情

get 接口:/getSongInfo

参数如下:

js
{
  songmid: "000o3Ay7339Lf4";
}

返回结果如下:

js
{
    "info": {
        "company": {
            "title": "唱片公司",
            "type": "JUMP_TO_COMPANY",
            "content": [
                {
                    "id": 0,
                    "value": "阿甘工作室",
                    "mid": "",
                    "type": 0,
                    "show_type": 0,
                    "is_parent": 0,
                    "picurl": "",
                    "read_cnt": 0,
                    "author": "",
                    "jumpurl": "",
                    "ori_picurl": ""
                }
            ],
            "pos": 51,
            "more": 0,
            "selected": "company",
            "use_platform": 1
        },
        "genre": {
            "title": "歌曲流派",
            "type": "JUMP_TO_CATEGORY",
            "content": [
                {
                    "id": 45,
                    "value": "Electronica",
                    "mid": "",
                    "type": 0,
                    "show_type": 2,
                    "is_parent": 0,
                    "picurl": "",
                    "read_cnt": 0,
                    "author": "",
                    "jumpurl": "http://y.qq.com/m/client/categoryzone/detail.html?categoryId=45&showType=2&isParent=0&_hidehd=1&groupId=100",
                    "ori_picurl": ""
                }
            ],
            "pos": 12,
            "more": 0,
            "selected": "genre",
            "use_platform": 3
        },
        "lan": {
            "title": "歌曲语种",
            "type": "JUMP_TO_CATEGORY",
            "content": [
                {
                    "id": 0,
                    "value": " 纯音乐",
                    "mid": "",
                    "type": 0,
                    "show_type": 0,
                    "is_parent": 0,
                    "picurl": "",
                    "read_cnt": 0,
                    "author": "",
                    "jumpurl": "",
                    "ori_picurl": ""
                }
            ],
            "pos": 11,
            "more": 0,
            "selected": "lan",
            "use_platform": 3
        },
        "pub_time": {
            "title": "发行时间",
            "type": "desc",
            "content": [
                {
                    "id": 0,
                    "value": "2022-10-22",
                    "mid": "",
                    "type": 0,
                    "show_type": 0,
                    "is_parent": 0,
                    "picurl": "",
                    "read_cnt": 0,
                    "author": "",
                    "jumpurl": "",
                    "ori_picurl": ""
                }
            ],
            "pos": 50,
            "more": 0,
            "selected": "pub_time",
            "use_platform": 0
        }
    },
    "extras": {
        "name": "M&E",
        "transname": "",
        "subtitle": "",
        "from": "",
        "wikiurl": ""
    },
    "track_info": {
        "id": 380090690,
        "type": 0,
        "mid": "000o3Ay7339Lf4",
        "name": "M&E",
        "title": "M&E",
        "subtitle": "",
        "singer": [
            {
                "id": 4939313,
                "mid": "004eSOxN0JN38E",
                "name": "KVKS",
                "title": "KVKS",
                "type": 0,
                "uin": 0
            }
        ],
        "album": {
            "id": 31542238,
            "mid": "00408v8j1N8jwf",
            "name": "M&E",
            "title": "M&E",
            "subtitle": "",
            "time_public": "2022-10-22",
            "pmid": "00408v8j1N8jwf_1"
        },
        "mv": {
            "id": 0,
            "vid": "",
            "name": "",
            "title": "",
            "vt": 0
        },
        "interval": 144,
        "isonly": 0,
        "language": 9,
        "genre": 22,
        "index_cd": 0,
        "index_album": 1,
        "time_public": "2022-10-22",
        "status": 0,
        "fnote": 4009,
        "file": {
            "media_mid": "000o3Ay7339Lf4",
            "size_24aac": 0,
            "size_48aac": 875979,
            "size_96aac": 1751622,
            "size_192ogg": 3400320,
            "size_192aac": 3480852,
            "size_128mp3": 2305240,
            "size_320mp3": 5762808,
            "size_ape": 0,
            "size_flac": 26742426,
            "size_dts": 0,
            "size_try": 960887,
            "try_begin": 0,
            "try_end": 0,
            "url": "",
            "size_hires": 0,
            "hires_sample": 0,
            "hires_bitdepth": 0,
            "b_30s": 0,
            "e_30s": 60000,
            "size_96ogg": 1692236,
            "size_360ra": [],
            "size_dolby": 0,
            "size_new": [
                88189984,
                14256867,
                34640701,
                5650256,
                0,
                10212383
            ]
        },
        "pay": {
            "pay_month": 1,
            "price_track": 200,
            "price_album": 0,
            "pay_play": 1,
            "pay_down": 1,
            "pay_status": 0,
            "time_free": 0
        },
        "action": {
            "switch": 16893697,
            "msgid": 13,
            "alert": 2,
            "icons": 12992510,
            "msgshare": 0,
            "msgfav": 0,
            "msgdown": 0,
            "msgpay": 6,
            "switch2": 0,
            "icon2": 0
        },
        "ksong": {
            "id": 0,
            "mid": ""
        },
        "volume": {
            "gain": -6.5,
            "peak": 0.976,
            "lra": 5.924
        },
        "label": "0",
        "url": "",
        "bpm": 100,
        "version": 0,
        "trace": "",
        "data_type": 0,
        "modify_stamp": 0,
        "pingpong": "",
        "ppurl": "",
        "tid": 0,
        "ov": 0,
        "sa": 1040,
        "es": "",
        "vs": [
            "063SHSRK1bWxwA",
            "",
            "",
            "003cINwc2kH1jw",
            "002jPzFO1KkMga",
            "",
            "",
            "",
            "",
            "000EEZKe25zbHD",
            "",
            "",
            ""
        ],
        "vi": [
            5387064
        ],
        "ktag": "0",
        "vf": [
            -6.27586,
            0.999969,
            5.77869
        ]
    }
}

播放地址

get 接口:/getMusicPlay

参数如下:

js
{
  songmid: string, //必须,歌曲id, 多个播放链接使用逗号分隔, 如"000o3Ay7339Lf4"
  justPlayUrl:string, // 可选参数,仅返回播放链接, 默认是 play。[all | play]
  quality: string// 可选参数,播放品质, 默认是 128。[m4a | 128 | 320 | ape | flac]
}

返回结果如下:

如果 songmid 只有一个,则直接返回播放链接

js
http://xxxxxx

否则返回一个对象,key 就是 songmid,值则是对应的播放链接,比如

js
{
    "000o3Ay7339Lf4": {
        "url": "http://xxx",
        "error": false
    },
    "0033tglQ46wtDH": {
        "url": "",
        "error": "暂无播放链接"
    }
}

注意

需要配置好请求头的中 cookie 信息,这需要你登录自己的 QQ 音乐会员获取,并在项目的 project.config.js 中配置!