e起飞young
一个前端码农的技术博客
实用接口api

网址缩短(有接口)

爱奇艺

http://cache.video.iqiyi.com/jp/avlist/202861101/1/

电商

京东获取单个商品价格接口

http://p.3.cn/prices/mgets?skuIds=J_商品ID&type=1 商品ID这么获取:http://item.jd.com/954086.html

淘宝商品搜索建议

http://suggest.taobao.com/sug?code=utf-8&q=商品关键字

物流

http://www.kuaidi100.com/query?type=快递公司代号&postid=快递单号
http://www.kuaidi100.com/query?type=zhongtong&postid=533917255109
申通="shentong"
EMS="ems"
顺丰="shunfeng"
圆通="yuantong"
中通="zhongtong"
韵达="yunda"
天天="tiantian"
汇通="huitongkuaidi"
全峰="quanfengkuaidi"
德邦="debangwuliu"
宅急送="zhaijisong"

酷我音乐api

http://player.kuwo.cn/webmusic/gu/getwebbang?syId=1
http://antiserver.kuwo.cn/anti.s?rid=MUSIC_16400733&format=mp3&type=convert_url&response=url

酷狗音乐api

1.获取歌词接口:

下面的信息可由酷狗网页中找到:

刘珂矣 - 半壶纱|1CFC9A07A1139A6F71CC892412F53D4C|222000
刘珂矣 - 泼茶香|33188478AC07B2EC652B90B1F7C627F0|258000
刘珂矣 - 缥缃醉|E79DF5DDC5F7F0114B96BFCA0C1C4C41|223000

歌曲名|hash值|总时长(毫秒)

第一步:酷狗搜索歌词API

http://lyrics.kugou.com/search?ver=1&man=yes&client=pc&keyword=歌曲名&duration=歌曲总时长(毫秒)&hash=歌曲Hash值
例:http://lyrics.kugou.com/search?ver=1&man=yes&client=pc&keyword=刘珂矣 - 墨痕&duration=239000&hash=3FA54B5FD2CBF09CF91F8178CA6D2148 
{
    "info":"OK",
    "status":200,
    "proposal":"22925950",
    "keyword":"刘珂矣 - 墨痕",
    "candidates":[
        {
            "soundname":"",
            "krctype":1,
            "nickname":"官方",
            "originame":"",
            "accesskey":"460FB0A6D8E5636F191ED4A9B578A9F6",
            "origiuid":"0",
            "score":60,
            "hitlayer":1,
            "duration":239000,
            "sounduid":"0",
            "transname":"",
            "uid":"1000000010",
            "transuid":"0",
            "song":"墨痕",
            "id":"22925950",
            "adjust":0,
            "singer":"刘珂矣",
            "language":"国语"
        }
    ]
}

第二步:酷狗下载歌词API

http://lyrics.kugou.com/download?ver=1&client=pc&id=上面得到的id&accesskey=上面得到的accesskey&fmt=lrc&charset=utf8(fmt=lrc 或 krc)
例:http://lyrics.kugou.com/download?ver=1&client=pc&id=22925950&accesskey=460FB0A6D8E5636F191ED4A9B578A9F6&fmt=krc&charset=utf8 
{
    "charset":"utf8",
    "content":"内容过长,此处省略展示。。。",
    "fmt":"lrc",
    "info":"OK",
    "status":200
}

第三部:将第二步中返回的content进行base64解码,解码后就是我们需要的歌词啦。这个API由原作者 Hwk123 利用工具Fiddler得出

2.酷狗网页版中的api直接根据hash值返回图片、歌词、音频文件地址等信息(返回的是lrc歌词文本)

http://www.kugou.com/yy/index.php?r=play/getdata&hash=3FA54B5FD2CBF09CF91F8178CA6D2148

3.酷狗搜索api

http://mobilecdn.kugou.com/api/v3/search/song?iscorrect=1&keyword=关键字&page=1&pagesize=20

4.酷狗移动端的api直接根据hash值返回图片、歌手、音频文件地址等信息(不能返回歌词)

http://m.kugou.com/app/i/getSongInfo.php?hash=歌曲文件hash值&cmd=playInfo

5.直接返回歌词的接口

http://m.kugou.com/app/i/krc.php?cmd=100&keyword=歌曲名&hash=歌曲hash值&timelength=歌曲时间长度&d=
例:http://m.kugou.com/app/i/krc.php?cmd=100&keyword=刘珂矣 - 半壶纱&hash=1CFC9A07A1139A6F71CC892412F53D4C&timelength=222000&d= 

搜索