5118助手
| 名称 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| keyword | string | 是 | 查询关键词 | |
| page_index | int | 否 | 1 | 当前分页 |
| page_size | int | 否 | 100 | 每页返回数据的数量(最大返回数量100条) |
| sort_fields | int | 否 | 4 | 排序字段(输入2-9下标,2:竞价公司数量,3:长尾词数量,4:流量指数,5:百度移动指数,6:360好搜指数,7:PC日检索量,8:移动日检索量,9:竞争激烈程度) |
| sort_type | string | 否 | desc | 升序或降序(asc:升序,desc:降序) |
| filter | int | 否 | 1 | 快捷过滤(输入1-9下标,1:所有词,2:所有流量词,3:流量指数词,4:移动指数词,5:360指数词,6:流量特点词,7:PC日检索量词,8:移动日检索量,9:存在竞价的词) |
| filter_date | string | 否 | 筛选日期(时间格式:yyyy-MM-dd) |
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| errcode | string | 0 | 返回的错误代码 |
| errmsg | string | 返回的错误说明 | |
| total | int | 总数量 | |
| page_count | int | 总页数 | |
| page_index | int | 1 | 当前分页 |
| page_size | int | 100 | 每页返回数据的数量(最大返回数量100条) |
| keyword | string | 关键词 | |
| index | int | 流量指数 | |
| mobile_index | int | 移动指数 | |
| douyin_index | int | 抖音指数 | |
| haosou_index | int | 好搜360指数 | |
| long_keyword_count | int | 长尾词数量 | |
| page_url | string | 推荐网站 | |
| bidword_company_count | int | 竞价公司数量 | |
| bidword_kwc | int | 竞价竞争度(1、高 2、中 3、低) | |
| bidword_pcpv | int | PC检索量 | |
| bidword_wisepv | int | 移动检索量 | |
| sem_reason | string | 流量特点 | |
| sem_price | string | SEM点击价格 |
{
"errcode": "0",
"errmsg": "",
"data": {
"total": 52,
"page_count": 18,
"page_index": 1,
"page_size": 3,
"word": [
{
"keyword": "衬衫",
"index": 1063,
"mobile_index": 919,
"haosou_index": 1163,
"long_keyword_count": 6045520,
"bidword_company_count": 185,
"page_url": "",
"bidword_kwc": 1,
"bidword_pcpv": 240,
"bidword_wisepv": 1433,
"sem_reason": "",
"sem_price": "0.35~4.57"
}
...
]
}
}
| 错误码 | 说明 |
|---|---|
| 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 | 请输入要查询的关键词 |
| 200406 | 输入时间格式有误,请按“yyyy-MM-dd”格式输入 |
| 200407 | 请输入长度大于1的关键词 |
| 200607 | 有重叠字符 |
| 200608 | 您搜索的关键词不支持查询 |
| 200999 | 查询条数超出最大上限 |
| 2 | 002 | 01 |
|---|---|---|
| 服务器错误(1:为系统级别错误) | 服务模块代码(即数据ID) | 具体错误代码 |
| 名称 | 价格 | 次数 | 说明 |
|---|---|---|---|
| 首次试用套餐 | 0.00 | 100 | |
| 套餐一 | 200.00 | 15000 | |
| 套餐二 | 1200.00 | 150000 | |
| 套餐三 | 6000.00 | 1500000 | |
| 套餐四 | 15000.00 | 7500000 |
<?php$host = "http://apis.5118.com";$path = "/keyword/word/v2";$method = "POST";$apikey = "你要调用API的apikey";$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=keyword&page_index=page_index";$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);curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);curl_setopt($curl, CURLOPT_HEADER, true);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);var_dump(curl_exec($curl));?>
using System.IO;using System.Text;using System.Net;using System.Net.Security;using System.Security.Cryptography.X509Certificates;private const String host = "http://apis.5118.com";private const String path = "/keyword/word/v2";private const String method = "POST";private const String apikey = "你要调用的接口apikey";static void Main(string[] args){String querys = "";String bodys = "keyword=keyword&page_index=page_index";String url = host + path;HttpWebRequest httpRequest = null;HttpWebResponse httpResponse = null;if (0 < querys.Length){url = url + "?" + querys;}if (host.Contains("https://")){ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);httpRequest = (HttpWebRequest)WebRequest.CreateDefault(new Uri(url));}else{httpRequest = (HttpWebRequest)WebRequest.Create(url);}httpRequest.Method = method;httpRequest.Headers.Add("Authorization", apikey);//根据API的要求,定义相对应的Content-TypehttpRequest.ContentType = "application/x-www-form-urlencoded; charset=UTF-8";if (0 < bodys.Length){byte[] data = Encoding.UTF8.GetBytes(bodys);using (Stream stream = httpRequest.GetRequestStream()){stream.Write(data, 0, data.Length);}}try{httpResponse = (HttpWebResponse)httpRequest.GetResponse();}catch (WebException ex){httpResponse = (HttpWebResponse)ex.Response;}Console.WriteLine(httpResponse.StatusCode);Console.WriteLine(httpResponse.Method);Console.WriteLine(httpResponse.Headers);Stream st = httpResponse.GetResponseStream();StreamReader reader = new StreamReader(st, Encoding.GetEncoding("utf-8"));Console.WriteLine(reader.ReadToEnd());Console.WriteLine("\n");}public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors){return true;}