京东H5ST
每次扣费1
基本信息
请求地址
https://api.apiparse.com/api/h5st
请求方法
POST
计费类型
收费 每次扣点: 1
请求参数
| 参数名 | 是否必填 | 类型 | 参数说明 | 示例值 |
|---|---|---|---|---|
| pin | 是 | string | 用户id | jd_xxx |
| appId | 是 | string | h5st第三段,5位字符串 | 01a47 |
| ua | 是 | string | user-agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0 |
| query | 是 | object |
{
"appid": "search-pc-java",
"client": "pc",
"clientVersion": "1.0.0",
"cthr": "1",
"loginType": "3",
"keyword": "iphone",
"functionId": "pc_search_searchWare",
"body": "{}"
}
|
|
| version | 否 | string | latest: 默认, xcx: 小程序 | latest |
| token | 是 | string | 付费接口在请求参数中传入 token |
请求示例
用示例值快速测试接口
{
"pin": "jd_xxx",
"appId": "01a47",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0",
"query": {
"appid": "search-pc-java",
"client": "pc",
"clientVersion": "1.0.0",
"cthr": "1",
"loginType": "3",
"keyword": "iphone",
"functionId": "pc_search_searchWare",
"body": "{}"
},
"version": "latest",
"token": ""
}
返回参数
| 参数名 | 类型 | 说明 | 示例 |
|---|---|---|---|
| success | boolean | true | |
| data | object |
{
"h5st": "xxxx"
}
|
返回示例
{
"success": true,
"data": {
"appid": "pc-rate-qa",
"body": "{}",
"client": "pc",
"clientVersion": "1.0.0",
"functionId": "getCommentListPage",
"t": 1771915060139,
"_stk": "appid,body,client,clientVersion,functionId,t",
"_ste": 2,
"h5st": "xxxx"
}
}
代码示例
const token = ""; // 请联系管理员获取token
fetch(`http://206.119.178.253:33001/api/token/${token}/h5st`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
pin: 'xxx',
query: {
appid: 'pc-rate-qa',
body: '{}',
client: 'pc',
clientVersion: '1.0.0',
functionId: 'getCommentListPage',
h5st: 'xxx', //可带可不带
t: '1769336207806',
},
ua: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0',
appId: 'abcde' //如果query中不带h5st,必须带此参数
})
}).then(response => response.json()).then(data => console.log(data));