5118助手
| 名称 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| keyword | string | 是 | 要查询的百家号名称 | |
| platform | string | 是 | pc或mobile |
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| errcode | string | 0 | 返回的错误代码 |
| errmsg | string | 返回的错误说明 | |
| keyword | string | 关键词 | |
| rank | int | 排名 | |
| page_title | string | 标题 | |
| page_url | string | 页面链接 | |
| bidword_company_count | int | 竞价公司数量 | |
| long_keyword_count | int | 长尾词数量 | |
| index | int | 流量指数 | |
| mobile_index | int | 移动指数 | |
| haosou_index | int | 360指数 | |
| bidword_pcpv | int | PC检索量 | |
| bidword_wisepv | int | 移动日检索量 | |
| bidword_recommendprice_avg | string | 竞价价格 | |
| toutiao_index | int | 头条指数 | |
| douyin_index | int | 抖音指数 | |
| kuai_shou_index | int | 快手指数 | |
| google_index | int | google指数 | |
| weibo_index | int | 微博指数 |
{
"errcode": "0",
"errmsg": "",
"total": 255,
"page_count": 3,
"page_index": 1,
"page_size": 100,
"data": [
{
"keyword": "a80",
"rank": 2,
"page_title": "xxxxxyA80评测:不让创新停留于想象的划时代产品-泡...",
"page_url": "http://baijiahao.baidu.com/s?id=xxxxxxx75&wfr=spider&for=pc",
"bidword_company_count": 28,
"long_keyword_count": 50706,
"index": 137,
"mobile_index": 71,
"haosou_index": 4,
"bidword_pcpv": 8,
"bidword_recommendprice_avg": 0.49,
"bidword_wisepv": 18,
"toutiao_index": -1,
"douyin_index": -1,
"kuai_shou_index": -1,
"google_index": 61,
"weibo_index": 4126
}
...
]
},
| 错误码 | 说明 |
|---|---|
| 100101 | 调用次数不够,请充值 |
| 100102 | 服务每秒调用量超限 |
| 100103 | 服务每小时调用量超限 |
| 100104 | 服务每天调用量超限 |
| 100111 | 调用字数不够,请充值 |
| 100201 | url无法解析 |
| 100202 | 请求缺少apikey |
| 100203 | 无效的apikey |
| 100204 | api不存在 |
| 100205 | api已经关闭 |
| 100206 | 后端服务响应status非200 |
| 100207 | 后端服务未正确接入 |
| 100208 | 请求方式不支持 |
| 100301 | Api商城 内部错误 |
| 100302 | 请求后端服务过程中错误 |
| 100303 | 系统繁忙稍候再试 |
| 100403 | 您输入的apikey不正确 |
| 错误码 | 说明 |
|---|---|
| 200201 | 传进参数为空 |
| 200202 | 用户ID为空 |
| 200203 | 请输入要查询的关键词 |
| 2 | 002 | 01 |
|---|---|---|
| 服务器错误(1:为系统级别错误) | 服务模块代码(即数据ID) | 具体错误代码 |
| 名称 | 价格 | 次数 | 说明 |
|---|---|---|---|
| 首次试用套餐 | 0.00 | 100 | |
| 套餐一 | 500.00 | 10000 | |
| 套餐二 | 3000.00 | 100000 | |
| 套餐三 | 15000.00 | 1000000 | |
| 套餐四 | 75000.00 | 10000000 |
<?php$host = "http://apis.5118.com";$path = "/keyword/baijiahao";$method = "POST";$apikey = "你要调用API的apikey,到 https://account.5118.com/signin/myapi 获取";$headers = array();array_push($headers, "Authorization:" . $apikey);//根据API的要求,定义相对应的Content-Typearray_push($headers, "Content-Type".":"."application/x-www-form-urlencoded; charset=UTF-8");$querys = "";$bodys = "keyword=查询关键词&platform=pc";$url = $host . $path;$curl = curl_init();curl_setopt($curl, CURLOPT_CUSTOMREQUEST, $method);curl_setopt($curl, CURLOPT_URL, $url);curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);curl_setopt($curl, CURLOPT_FAILONERROR, false);if (1 == strpos("$".$host, "https://")){curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);}curl_setopt($curl, CURLOPT_POSTFIELDS, $bodys);curl_exec($curl);?>