1 功能说明
获取词库网内部数据的接口
本接口除网站词库外全部返回的是关键词,关键词热度及关键词收录,网站词库返回的是关键词,热度,排名,预估流量,收录量,标题及网址,全部以JSON格式返回。
注意:
1. 每次请求都是返回100条数据,不足100条的则返回最大量,返回的数据当中包含总条数。
2. 接口状态为“测试”状态时,不会产生任何扣费操作,该状态下返回的数据都是测试数据。
3. 免费次数调用完继续调用开关默认设置否,如果设置成是则VIP状态下免费次数用完后继续调用会按次扣费。
4. 网站词库得开通整站导出功能才可通过接口调用,该调用并不计算调用次数,即开通某域名的整站导出后可无限制调用该域名的网站词库数据。
5. 请保管好apptoken防止泄露,如果被盗用而产生接口扣费操作,词库网将不返还这些扣费。
6. 可通过VIP定制进行接口调用次数的定制,也可直接调用,直接调用是按每次0.1元进行收费的。
2 接口调用说明
2.1 获取长尾词
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取长尾词该值为1 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
wd | 是 | string |
要获取的关键词得用urlEncode的UTF-8进行编码 例如关键词“词库网”,编码后为“%e8%af%8d%e5%ba%93%e7%bd%91”在线URL编码 |
pageindex | 是 | int |
页码数默认为1,接口每次返回100条数据,如果返回的结果当中条数总量大于100,则可根据分页再次进行获取 例如该参数值为1,则是获取第1到100条的数据,值为2则是获取第100到200条的数据 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数跟360指数 |
(5)请求举例
该请求获取有关“词库网”的相关长尾词
https://api.ciku5.com?action=1&appid=你的appid&apptoken=加密过的apptoken&wd=%e8%af%8d%e5%ba%93%e7%bd%91&pageindex=1&ver=版本号
(6)成功返回结果
关键词都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 1, "data": [{ "keyword": "\u8bcd\u5e93\u7f51", "index": 83, "pagenum": 53100000 }, ...] }
V1版本结果
{ "state": 1, "error": "", "total": 1, "data": [{ "keyword": "\u8bcd\u5e93\u7f51", "index": 83, "pcindex": 83, "mobileindex": 83, "so360index": 83, "pagenum": 53100000 }, ...] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
2.2 获取指定关键词
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取指定关键词该值为9 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
wd | 是 | string |
要获取的关键词,关键词一次最多传20个,多个关键词用英文逗号隔开得用urlEncode的UTF-8进行编码 例如关键词“词库,词库网,工具”,编码后为“%e8%af%8d%e5%ba%93%2c%e8%af%8d%e5%ba%93%e7%bd%91%2c%e5%b7%a5%e5%85%b7”在线URL编码 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数跟360指数 |
(5)请求举例
该请求获取“词库,词库网,工具”的热度及收录数据
https://api.ciku5.com?action=9&appid=你的appid&apptoken=加密过的apptoken&wd=%e8%af%8d%e5%ba%93%2c%e8%af%8d%e5%ba%93%e7%bd%91%2c%e5%b7%a5%e5%85%b7&ver=版本号
(6)成功返回结果
关键词都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 3, "data": [{ "keyword": "\u8bcd\u5e93", "index": 192, "pagenum": 15300000 }, { "keyword": "\u8bcd\u5e93\u7f51", "index": 83, "pagenum": 2900000 }] }
V1版本结果
{ "state": 1, "error": "", "total": 3, "data": [{ "keyword": "\u8bcd\u5e93", "index": 192, "pcindex": 192, "mobileindex": 192, "so360index": 192, "pagenum": 15300000 }, { "keyword": "\u8bcd\u5e93\u7f51", "index": 192, "pcindex": 192, "mobileindex": 192, "so360index": 192, "pagenum": 2900000 }] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
2.3 获取新词
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取新词该值为3 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
pageindex | 是 | int |
页码数默认为1,接口每次返回100条数据,如果返回的结果当中条数总量大于100,则可根据分页再次进行获取 例如该参数值为1,则是获取第1到100条的数据,值为2则是获取第100到200条的数据 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数跟360指数 |
(5)请求举例
该请求获取新词前100条
https://api.ciku5.com?action=3&appid=你的appid&apptoken=加密过的apptoken&pageindex=1&ver=版本号
(6)成功返回结果
关键词都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pagenum": 53100000 }, ...] }
V1版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, ...] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
2.4 获取热词
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取热词该值为4 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
pageindex | 是 | int |
页码数默认为1,接口每次返回100条数据,如果返回的结果当中条数总量大于100,则可根据分页再次进行获取 例如该参数值为1,则是获取第1到100条的数据,值为2则是获取第100到200条的数据 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数跟360指数 |
(5)请求举例
该请求获取热词前100条
https://api.ciku5.com?action=4&appid=你的appid&apptoken=加密过的apptoken&pageindex=1&ver=版本号
(6)成功返回结果
关键词都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pagenum": 53100000 }, ...] }
V1版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, ...] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
2.5 获取热词预测
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取热词预测该值为5 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
pageindex | 是 | int |
页码数默认为1,接口每次返回100条数据,如果返回的结果当中条数总量大于100,则可根据分页再次进行获取 例如该参数值为1,则是获取第1到100条的数据,值为2则是获取第100到200条的数据 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数跟360指数 |
(5)请求举例
该请求获取热词预测前100条
https://api.ciku5.com?action=5&appid=你的appid&apptoken=加密过的apptoken&pageindex=1&ver=版本号
(6)成功返回结果
关键词都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pagenum": 53100000 }, ...] }
V1版本结果
{ "state": 1, "error": "", "total": 100, "data": [{ "keyword": "\u4eba\u6c11\u5e01\u5973\u90ce", "index": 119454, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, { "keyword": "\u5973\u5b50\u6000\u5b555\u6708\u88ab\u903c\u63a5\u5ba2", "index": 117151, "pcindex": 119454, "mobileindex": 119454, "so360index": 119454, "pagenum": 53100000 }, ...] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
2.6 获取网站词库
注意:接口改版后,只有开通整站导出的网站才有导出权限,网站词库导出调用不扣调用次数,即开通某域名的整站导出后可无限制调用该域名的网站词库数据。
(1)获取地址
https://api.ciku5.com
(2)HTTP请求方式
GET
(3)数据返回格式
json
(4)传递参数
参数名称 | 是否必须 | 类型 | 描述 |
---|---|---|---|
action | 是 | int |
指定请求的类型,获取行业词库该值为6 |
appid | 是 | long |
申请接口时获取的appid |
apptoken | 是 | string |
申请接口时获取的apptoken得用32位MD5加密MD5在线生成 |
wd | 是 | string |
域名参数 比如获取“词库网”的网站词库,则该值为www.ciku5.com |
pageindex | 是 | int |
页码数默认为1,接口每次返回100条数据,如果返回的结果当中条数总量大于100,则可根据分页再次进行获取 例如该参数值为1,则是获取第1到100条的数据,值为2则是获取第100到200条的数据 |
indexrange | 否 | string |
指数范围,默认为空,格式为100-200 |
pagerange | 否 | string |
收录范围,默认为空,格式为1000-20000 |
ver | 否 | int |
[新增参数] 版本号默认为0,新版本参数为1,新版本对比旧版本新增PC指数,移动指数 |
(5)请求举例
该请求获取“词库网”网站词库前100条
https://api.ciku5.com?action=2&appid=你的appid&apptoken=加密过的apptoken&pageindex=1&wd=www.ciku5.com&&indexrange=100-200&pagerange=10000-20000ver=版本号
(6)成功返回结果
关键词,标题都是Unicode编码过的在线Unicode解码
V0版本结果
{ "state": 1, "error": "", "total": 16, "data": [{ "keyword": "\u7f51\u7ad9\u8bcd\u5e93", "index": 4, "sort": 1, "aboutip": "2 ~ 4", "pagenum": 51800000, "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93", "url": "www.ciku5.com" }, { "keyword": "\u8bcd\u5e93", "index": 184, "sort": 2, "aboutip": "55 ~ 92", "pagenum": 28000000, "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93", "url": "www.ciku5.com" }, ...] }
V1版本结果
{ "state": 1, "error": "", "total": 16, "data": [{ "keyword": "\u7f51\u7ad9\u8bcd\u5e93", "index": 4, "pcindex": 4, "mobileindex": 4, "sort": 1, "aboutip": "2 ~ 4", "pagenum": 51800000, "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93", "url": "www.ciku5.com" }, { "keyword": "\u8bcd\u5e93", "index": 184, "pcindex": 4, "mobileindex": 4, "sort": 2, "aboutip": "55 ~ 92", "pagenum": 28000000, "title": "\u8bcd\u5e93\u7f51 - \u70ed\u95e8\u5173\u952e\u8bcd\u5e93\u3001\u957f\u5c3e\u5173\u952e\u8bcd\u5e93\u3001\u7f51\u7ad9\u5173\u952e\u8bcd\u5e93\u3001\u884c\u4e1a\u5173\u952e\u8bcd\u5e93", "url": "www.ciku5.com" }, ...] }
(7)失败返回结果
state状态不是1就是返回失败 查看具体的错误代码
{ "state": 104, "error": "\u0069\u0070\u672a\u6388\u6743" }
3 返回字段说明
字段 | 说明 |
---|---|
state |
返回的状态值,该值为1说明正确返回查看具体的错误代码 |
error |
如果返回正确该值为空,否则提示相应的错误信息 |
data |
数据集合,JSON数组 |
keyword |
关键词 |
index |
百度整体指数 |
pcindex |
百度pc指数 |
mobileindex |
百度移动热度 |
so360index |
360指数 |
sort |
关键词排名[网站词库] |
aboutip |
预估流量[网站词库] |
pagenum |
关键词收录量 |
title |
网站标题[网站词库] |
url |
网站网址[网站词库] |
4 错误代码说明
编号[state] | 说明 |
---|---|
100 |
action参数有误 |
101 |
appid参数有误 |
102 |
非法IP |
103 |
appkey验证不通过 |
104 |
ip未授权 |
105 |
接口不存在或者帐户被禁用 |
106 |
余额不足或者查询超过最大限制 |
107 |
wd参数有误关键词不能超过40字符 |
108 |
wd参数有误非法域名 |
109 |
bt参数有误该行业分类不存在 |
110 |
系统处理异常 |
111 |
尚未开通此域名的整站导出 |
112 |
wd参数有误关键词不符合要求 |