Home  >  Article  >  Backend Development  >  Baidu mp3 interface lrc interface (baidu mp3 api)

Baidu mp3 interface lrc interface (baidu mp3 api)

WBOY
WBOYOriginal
2016-07-25 08:49:551671browse
Search Baidu mp3 to get mp3 and lyrics lrc download address
  1. http://mp3.baidu.com/dev/api/?tn=getinfo&ct=0&ie=utf-8&word=&format=
  2. Parameters:
  3. word: "Song Name" , //Song name encodeURI
  4. format: "json", //Return data format, xml | json, default xml
  5. callback: "Pub.music.searchResult", //Fixed value, return jsonp format
  6. such as xml Format:
  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. Return:
  9. < ;singerPicLarge>
Copy code
  1. json format: 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. return:
  3. {
  4. "song": "u6d41u6d6au8bb0",
  5. "song_id": "38233821",
  6. "singer": "u6768u5b97u7eac",
  7. "album": "u6211u662fu6b4cu624 b u7b2cu5341u4e00u671f",
  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. }
Copy code
  1. http://ting.baidu.com/data/music/links?songIds=
  2. GET method:
  3. Parameters:
  4. songIds: "38233821" //Song id, starting from the 1st one The song id obtained in the list
  5. callback: "callback" //When it is not empty, return jsonp format data
  6. For example: http://ting.baidu.com/data/music/links?songIds=38233821
  7. Return:
  8. {
  9. "errorCode": 22000,
  10. "data": {
  11. "xcode": "808f67065a7ea25b17e77954bed13215",
  12. "songList": [{
  13. "queryId": "38233821",
  14. "songId" :38233821,
  15. "songName": "u6d41u6d6au8bb0",
  16. "artistId": "8477",
  17. "artistName": "u6768u5b97u7eac",
  18. "albumId": 38233662,
  19. "albumName": "u6211u662fu6b4cu624 b u7b2cu5341u4e00u671f",
  20. "songPicSmall": " http://c.hiphotos.baidu.com/ting/pic/item/29381f30e924b899d068ee4b6f061d950a7bf669.jpg",
  21. "songPicBig": "http://c.hiphotos.baidu.com/ting/pic/item/2f738bd4b31c8701d1e225952 67f9e2f0708ff69.jpg ", G" songpicradio ":" http://c.hiphotos.baidu.com/ting/pic/item/bb21b051F8198618F1378BD2E738BD4E669.jpg",
  22. ", ""/data2/LR C/38238568/38238568.LRC ",
  23. "version": "u73b0u573a",
  24. "copyType": 1,
  25. "time": 309,
  26. "linkCode": 22000,
  27. "songLink": "http://zhangmenshiting.baidu.com/data2/music/38542270 /382338211365422461.mp3",
  28. "showLink": "http://zhangmenshiting.baidu.com/data2/music/38542270/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215",
  29. " format": "mp3",
  30. "rate" : 128,
  31. "size": 4984113,
  32. "relateStatus": "0",
  33. "resourceType": "0"
  34. }]
  35. }
  36. }
Copy code
  1. http://zhangmenshiting.baidu.com/data2/music/38542270/382338211365422461.mp3?xcode=808f67065a7ea25b17e77954bed13215
Copy code
  1. http://ting.baidu.com/data2/lrc/15265710/15265710.lrc
Copy code


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn