接口地址: http://vip.http110.cn/api/wxKeyWordsSearch
返回格式: json
请求方式: post
请求示例: http://vip.http110.cn/api/wxKeyWordsSearch
请求参数说明:
参数名称 | 必填 | 类型 | 说明 |
---|---|---|---|
token | 否 | string | 用户token,注册即可获得试用token |
kw | 是 | string | 搜索关键字 |
page | 是 | string | 页码,默认为1(默认页码1为获取前20位结果) |
period | 是 | string | 1-720天内任意天数(超过180天获取数据较慢,预计25秒左右) |
返回参数说明:
参数名称 | 类型 | 说明 |
---|---|---|
code | number | 系统返回状态码 |
msg | string | 系统返回提示信息! |
data | string | 响应数据 |
totalPage | number | 总页数 |
nowPage | number | 当前页码 |
totalNum | number | 文章总数 |
url | string | 文章链接 |
title | string | 文章标题 |
avatar | string | 文章封面图 |
publishTime | number | 发布时间 |
wxName | string | 微信名称 |
wxId | number | 微信id |
响应文本:
{
"code": 200,
"msg": "OK",
"data": {
"totalPage": 0,
"nowPage": 1,
"totalNum": 15,
"list": [
{
"url": "http://mp.weixin.qq.com/s?__biz=MjM5NTE1OTQyMQ==&mid=2651247892&idx=1&sn=bd005588d8ee54279768861d403ac9ce&chksm=bd0eb9068a79301001bed146b100556adaa50b5906711533cb0a8174cbd18b4bb30cb33c49fb#rd",
"title": "超7000万消费券正在发放!为市民打造“一刻钟品质生活圈”",
"avatar": "https://mmbiz.qlogo.cn/mmbiz_jpg/Ow1RI6Hpia3pvgFHu6ibV7ozuGXXTibG25jicbZWiaibaCKFWrjicY9aNZx2MgWjoo3UoXtjict1los8uyJXf2Vk6sibxaQ/0?wx_fmt=jpeg",
"publishTime": 1679991786,
"wxName": "北京日报",
"wxId": "Beijing_Daily"
},
{
"url": "...",
"title": "...",
"avatar": "..",
"publishTime": 111,
"wxName": "...",
"wxId": "..."
}
]
}
}
状态码参考:
状态码 | 说明 | |
---|---|---|
200 | 请求成功 | |
201 | 余额不足! |
免费!
var settings = { "url": "http://vip.http110.cn/api/wxKeyWordsSearch", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json" }, "data": JSON.stringify({ "token": "your token", "kw": "消费券", "page": 1, "period": 1 }), }; $.ajax(settings).done(function (response) { console.log(response); });
CURL *curl; CURLcode res; curl = curl_easy_init(); if(curl) { curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST"); curl_easy_setopt(curl, CURLOPT_URL, "http://vip.http110.cn/api/wxKeyWordsSearch"); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https"); struct curl_slist *headers = NULL; headers = curl_slist_append(headers, "Content-Type: application/json"); curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers); const char *data = "{\n \"token\":\"your token\",\"kw\":\"消费券\",\"page\":1,\"period\":1\n}"; curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data); res = curl_easy_perform(curl); } curl_easy_cleanup(curl);
require_once 'HTTP/Request2.php'; $request = new HTTP_Request2(); $request->setUrl('http://vip.http110.cn/api/wxKeyWordsSearch'); $request->setMethod(HTTP_Request2::METHOD_POST); $request->setConfig(array( 'follow_redirects' => TRUE )); $request->setHeader(array( 'Content-Type' => 'application/json' )); $request->setBody('{\n "token":"your token","kw":"消费券","page":1,"period":1\n}'); try { $response = $request->send(); if ($response->getStatus() == 200) { echo $response->getBody(); } else { echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' . $response->getReasonPhrase(); } } catch(HTTP_Request2_Exception $e) { echo 'Error: ' . $e->getMessage(); }
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\n \"token\":\"your token\",\"kw\":\"消费券\",\"page\":1,\"period\":1\n}"); Request request = new Request.Builder() .url("http://vip.http110.cn/api/wxKeyWordsSearch") .method("POST", body) .addHeader("Content-Type", "application/json") .build(); Response response = client.newCall(request).execute();
import requests import json url = "http://vip.http110.cn/api/wxKeyWordsSearch" payload = json.dumps({ "token": "your token", "kw": "消费券", "page": 1, "period": 1 }) headers = { 'Content-Type': 'application/json' } response = requests.request("POST", url, headers=headers, data=payload) print(response.text)
package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "http://vip.http110.cn/api/wxKeyWordsSearch" method := "POST" payload := strings.NewReader(`{ "token":"your token","kw":"消费券","page":1,"period":1 }`) client := &http.Client { } req, err := http.NewRequest(method, url, payload) if err != nil { fmt.Println(err) return } req.Header.Add("Content-Type", "application/json") res, err := client.Do(req) if err != nil { fmt.Println(err) return } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }
curl --location --request POST 'http://vip.http110.cn/api/sogoLink2Wxlink' \ --header 'Content-Type: application/json' \ --data-raw '{ "token":"your token","url":"https://mp.weixin.qq.com/s?src=11×tamp=1680002812&ver=4434&signature=GSiBxNqLBTb5gOWjQio*aatCxhlfJJ7neUcEDpMFCrQ5FRDam0YF8THwm0joQKJI0tbloRQBY*vKIJP63*B20JcCrTwKdJffEHpamAqEuXrDDhACFnmL4Cpa9ZMlSdYi&new=1" }'