搜索百度mp3获取mp3及歌词lrc下载地址
- http://mp3.baidu.com/dev/api/?tn=getinfo&ct=0&ie=utf-8&word=&format=
- 参数:
- word: "歌曲名", //歌曲名 encodeURI
- format: "json", //返回数据格式,xml | json,默认xml
- callback: "Pub.music.searchResult", //固定值,返回jsonp格式
- 如 xml格式:
- http://mp3.baidu.com/dev/api/?tn=getinfo&ct=0&word=%E6%B5%81%E6%B5%AA%E8%AE%B0&ie=utf-8&format=xml
- 返回:
- json格式:http://mp3.baidu.com/dev/api/?tn=getinfo&ct=0&word=%E6%B5%81%E6%B5%AA%E8%AE%B0&ie=utf-8&format=json
- 返回:
- {
- "song": "\u6d41\u6d6a\u8bb0",
- "song_id": "38233821",
- "singer": "\u6768\u5b97\u7eac",
- "album": "\u6211\u662f\u6b4c\u624b \u7b2c\u5341\u4e00\u671f",
- "singerPicSmall": "http:\/\/qukufile2.qianqian.com\/data2\/pic\/36218344\/36218344.jpg",
- "singerPicLarge": "http:\/\/qukufile2.qianqian.com\/data2\/pic\/36218335\/36218335.jpg",
- "albumPicLarge": "",
- "albumPicSmall": ""
- }
- http://ting.baidu.com/data/music/links?songIds=
- GET 方式获取:
- 参数:
- songIds: "38233821" //歌曲id,从第1个列表中得到的歌曲id
- callback: "callback" //不为空时,返回jsonp格式数据
- 如:http://ting.baidu.com/data/music/links?songIds=38233821
- 返回:
- {
- "errorCode": 22000,
- "data": {
- "xcode": "808f67065a7ea25b17e77954bed13215",
- "songList": [{
- "queryId": "38233821",
- "songId": 38233821,
- "songName": "\u6d41\u6d6a\u8bb0",
- "artistId": "8477",
- "artistName": "\u6768\u5b97\u7eac",
- "albumId": 38233662,
- "albumName": "\u6211\u662f\u6b4c\u624b \u7b2c\u5341\u4e00\u671f",
- "songPicSmall": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/29381f30e924b899d068ee4b6f061d950a7bf669.jpg",
- "songPicBig": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/2f738bd4b31c8701d1e22595267f9e2f0708ff69.jpg",
- "songPicRadio": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/b21bb051f81986185f1378f74bed2e738bd4e669.jpg",
- "lrcLink": "\/data2\/lrc\/38238568\/38238568.lrc",
- "version": "\u73b0\u573a",
- "copyType": 1,
- "time": 309,
- "linkCode": 22000,
- "songLink": "http:\/\/zhangmenshiting.baidu.com\/data2\/music\/38542270\/382338211365422461.mp3",
- "showLink": "http:\/\/zhangmenshiting.baidu.com\/data2\/music\/38542270\/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215",
- "format": "mp3",
- "rate": 128,
- "size": 4984113,
- "relateStatus": "0",
- "resourceType": "0"
- }]
- }
- }
- http://zhangmenshiting.baidu.com/data2/music/38542270/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215
- http://ting.baidu.com/data2/lrc/15265710/15265710.lrc
|