当前位置:Gxlcms > PHP教程 > 百度mp3接口lrc接口(baidump3api)

百度mp3接口lrc接口(baidump3api)

时间:2021-07-01 10:21:17 帮助过:20人阅读

搜索百度mp3获取mp3及歌词lrc下载地址
  1. http://mp3.baidu.com/dev/api/?tn=getinfo&ct=0&ie=utf-8&word=&format=
  2. 参数:
  3. word: "歌曲名", //歌曲名 encodeURI
  4. format: "json", //返回数据格式,xml | json,默认xml
  5. callback: "Pub.music.searchResult", //固定值,返回jsonp格式
  6. 如 xml格式:
  7. 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
  8. 返回:
  1. 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
  2. 返回:
  3. {
  4. "song": "\u6d41\u6d6a\u8bb0",
  5. "song_id": "38233821",
  6. "singer": "\u6768\u5b97\u7eac",
  7. "album": "\u6211\u662f\u6b4c\u624b \u7b2c\u5341\u4e00\u671f",
  8. "singerPicSmall": "http:\/\/qukufile2.qianqian.com\/data2\/pic\/36218344\/36218344.jpg",
  9. "singerPicLarge": "http:\/\/qukufile2.qianqian.com\/data2\/pic\/36218335\/36218335.jpg",
  10. "albumPicLarge": "",
  11. "albumPicSmall": ""
  12. }
  1. http://ting.baidu.com/data/music/links?songIds=
  2. GET 方式获取:
  3. 参数:
  4. songIds: "38233821" //歌曲id,从第1个列表中得到的歌曲id
  5. callback: "callback" //不为空时,返回jsonp格式数据
  6. 如:http://ting.baidu.com/data/music/links?songIds=38233821
  7. 返回:
  8. {
  9. "errorCode": 22000,
  10. "data": {
  11. "xcode": "808f67065a7ea25b17e77954bed13215",
  12. "songList": [{
  13. "queryId": "38233821",
  14. "songId": 38233821,
  15. "songName": "\u6d41\u6d6a\u8bb0",
  16. "artistId": "8477",
  17. "artistName": "\u6768\u5b97\u7eac",
  18. "albumId": 38233662,
  19. "albumName": "\u6211\u662f\u6b4c\u624b \u7b2c\u5341\u4e00\u671f",
  20. "songPicSmall": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/29381f30e924b899d068ee4b6f061d950a7bf669.jpg",
  21. "songPicBig": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/2f738bd4b31c8701d1e22595267f9e2f0708ff69.jpg",
  22. "songPicRadio": "http:\/\/c.hiphotos.baidu.com\/ting\/pic\/item\/b21bb051f81986185f1378f74bed2e738bd4e669.jpg",
  23. "lrcLink": "\/data2\/lrc\/38238568\/38238568.lrc",
  24. "version": "\u73b0\u573a",
  25. "copyType": 1,
  26. "time": 309,
  27. "linkCode": 22000,
  28. "songLink": "http:\/\/zhangmenshiting.baidu.com\/data2\/music\/38542270\/382338211365422461.mp3",
  29. "showLink": "http:\/\/zhangmenshiting.baidu.com\/data2\/music\/38542270\/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215",
  30. "format": "mp3",
  31. "rate": 128,
  32. "size": 4984113,
  33. "relateStatus": "0",
  34. "resourceType": "0"
  35. }]
  36. }
  37. }
  1. http://zhangmenshiting.baidu.com/data2/music/38542270/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215
  1. http://ting.baidu.com/data2/lrc/15265710/15265710.lrc

人气教程排行