去转盘网API接口参数说明

admin@quzhuanpan.com 1年前阅读:408次

大家好,我是管理员。应很多站长、媒体人、爱好者的要求,去转盘留出了api接口以供qq群、微信公众号、网站、小程序等对接。

1、接口如下:

http://www.quzhuanpan.com/api/search_data_wcl?q=hello&currentPage=1&pageSize=10&auth=anyone&highlight=0

2、输入参数解析:

q:查询关键字,不能为空格,空字符串

currentPage:当前页数,需为大于1的整数

pageSize:请求页大小,最大值为20

auth:唯一认证码,示例为anyone,任何人可以参看(不具备实用功能)

highlight:搜索结果是否高亮,0为不高亮,1为高亮,默认不高亮

auth是您可以使用去转盘api的唯一标识,任何注册了去转盘的用户皆有权使用,请到这里去获取:点我获取auth

3、输出参数解析:

{"amount":600,"invalidate":0,"source":[{"name":"SD Card Test Pro-v1.5.4_build_43.apk_去转盘网_www.quzhuanpan.com","uid":"1871015658","shareId":"1434821318","url":"1Ue9SmC6p9hk4bzlX7djRKw","username":"zn***cc","id":14959,"shareTime":1521380763000,"typeId":-1,"showUrl":"https://pan.baidu.com/s/1Ue9SmC6p9hk4bzlX7djRKw","describ":null,"size":"1.6 MB","belong":0,"category":"5","categoryName":"软件","likeCount":0,"commentCount":0,"hot":0,"isDir":0,"dirName":"文件","dircount":1,"fileCount":1,"homePageUrl":"https://pan.baidu.com/share/home?uk=1871015658","detailUrl":"download/detail.action?id=1Ue9SmC6p9hk4bzlX7djRKw"},{"name":"SD+Card+Test+Pro-v1.5.4_build_43.apk_去转盘网_www.quzhuanpan.com","uid":"1093731083","shareId":"3317515796","url":"1gKRiMUjd-0dteXQVGFVlmw","username":"et***x5","id":10476,"shareTime":1521371535000,"typeId":-1,"showUrl":"https://pan.baidu.com/s/1gKRiMUjd-0dteXQVGFVlmw","describ":null,"size":"1.6 MB","belong":0,"category":"5","categoryName":"软件","likeCount":0,"commentCount":0,"hot":0,"isDir":0,"dirName":"文件","dircount":1,"fileCount":1,"homePageUrl":"https://pan.baidu.com/share/home?uk=1093731083","detailUrl":"download/detail.action?id=1gKRiMUjd-0dteXQVGFVlmw"},{"name":"new_tdx_test0317.rar_去转盘网_www.quzhuanpan.com","uid":"2669902728","shareId":"2130290477","url":"1QgGFDeNEFtyKt-P2CTs12g","username":"分**公式","id":7909,"shareTime":1521308982000,"typeId":-1,"showUrl":"https://pan.baidu.com/s/1QgGFDeNEFtyKt-P2CTs12g","describ":null,"size":"48.8 MB","belong":0,"category":"6","categoryName":"压缩包","likeCount":0,"commentCount":0,"hot":0,"isDir":0,"dirName":"文件","dircount":1,"fileCount":1,"homePageUrl":"https://pan.baidu.com/share/home?uk=2669902728","detailUrl":"download/detail.action?id=1QgGFDeNEFtyKt-P2CTs12g"}]}

输出结果为json数据类型

error: 为1表示出错(出错才显示)

message:出错原因(出错才显示)

amount:一共搜索到多少数据

source:搜索结果,现分别对结果参数做简要说明:

category:分类编号
categoryName:分类名称
commentCount:评论数
describ:描述
dirName:目录名字
dircount:目录数量
fileCount:文件数量
hot:热度
isDir:是否是文件夹,1是,0不是
likeCount:点赞数
name:资源名称,默认加了去转盘字样水印
shareId:分享id,重要
uid:百度用户id,重要
ps:这里强调说明 https://pan.baidu.com/share/link?uk=uid&shareid=shareId 即为资源下载链接
shareTime:资源分享时间
showUrl:下载链接
size:资源大小
url:下载短码,也可以组成下载链接,如:http://pan.baidu.com/s/1mgvFca0, 1mgvFca0部分即为短码
username:分享人
其他一切参数请忽略

4、转义字符如何过滤(仅供参考)

java为例,其他语言类推:
html=html.replace("\\","");//获得无转义字符的json字符串

5、js如何解析json(仅供参考)

amount=rec.amount                                                                   
list=rec.source

for(var i=0;i<list.length;i++){
	var obj=list[i];
	buildHtml(obj);
}

function buildHtml(obj){
	do something;
}



注:如果没有解析成功,麻烦百度下js解析json,都很简单,上边的代码仅供参考。python、java、php等语言的解析也麻烦百度下,都很简单的。

6、使用说明

账号认证:点击这里去认证 获得auth

任何认证账号默认可以免费使用20000 次http 请求。

超过部分开始计费,价格为 2.3¥/10000 http请求,也就是1000次两毛钱左右。

付费请说明购买量,付款后发邮件到admin@quzhuanpan.com,我们看到后会自动为您加量

有问题可以加qq:3047689758 或者微信:quzhuanpan

申明:由于团队人力有限,拒绝无聊咨询,拒绝无聊盘问,拒绝恶意添加,谢谢配合。




1
分享 微信扫一扫 举报