接口参考
查询 Credits 余额 API
一次查询 Credits、Keyword Credits、Monitor Credits 三种余额。
GET
/v1/credits免费·api.etshop.ai/open-apiCredits 消耗规则
计费规则:店铺/商品列表与热销榜每返回 1 条扣 1 Credit,店铺详情每次扣 2 Credits;详情、趋势、每日数据、评论免费(需 3 天内在列表或详情中返回过)。关键词搜索每个词扣 1 Keyword Credit,30 天内同一个词免费。店铺监控每个店铺扣 1 Monitor Credit,监控 30 天,停止后不退还。空结果不扣费,服务器错误自动退还。
请求头
AUTHORIZATION
Authorization: {API Key}CONTENT-TYPE
application/jsonACCEPT
application/json请求示例
cURL
curl --location --request GET 'https://api.etshop.ai/open-api/v1/credits' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {API Key}' 请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
| 此接口不需要请求参数。 | ||
返回示例
返回示例 · JSON
{
"code": 200,
"message": "success",
"data": {
"default": {
"label": "Credits",
"total_credits": 200000,
"used_credits": 3460,
"credits": 196540,
"purchased_credits": 200000
},
"keyword_credits": {
"label": "Keyword Credits",
"total_credits": 50000,
"used_credits": 129,
"credits": 49871,
"purchased_credits": 50000
},
"monitor_credits": {
"label": "Monitor Credits",
"total_credits": 20,
"used_credits": 3,
"credits": 17,
"purchased_credits": 20
}
}
}
文档中的示例数据
返回数据结构
| 名称 | 类型 | 必选 | 约束 | 说明 |
|---|---|---|---|---|
| » code | integer | true | none | 业务状态码 |
| » message | string | true | none | 响应消息 |
| » data | object | true | none | 响应数据,键为 Credits 类型 |
| »» default | object | true | none | Credits(店铺、商品类接口使用) |
| »»» label | string | true | none | 类型名称,固定为 Credits |
| »»» total_credits | integer | true | none | 累计获得的 Credits 总数 |
| »»» used_credits | integer | true | none | 已使用的 Credits |
| »»» credits | integer | true | none | 当前剩余的 Credits |
| »»» purchased_credits | integer | true | none | 通过购买获得的 Credits |
| »» keyword_credits | object | true | none | Keyword Credits(关键词搜索使用) |
| »»» label | string | true | none | 类型名称,固定为 Keyword Credits |
| »»» total_credits | integer | true | none | 累计获得的 Keyword Credits 总数 |
| »»» used_credits | integer | true | none | 已使用的 Keyword Credits |
| »»» credits | integer | true | none | 当前剩余的 Keyword Credits |
| »»» purchased_credits | integer | true | none | 通过购买获得的 Keyword Credits |
| »» monitor_credits | object | true | none | Monitor Credits(店铺监控使用,1 个 = 监控 1 个店铺 30 天) |
| »»» label | string | true | none | 类型名称,固定为 Monitor Credits |
| »»» total_credits | integer | true | none | 累计获得的 Monitor Credits 总数 |
| »»» used_credits | integer | true | none | 已使用的 Monitor Credits |
| »»» credits | integer | true | none | 当前剩余的 Monitor Credits |
| »»» purchased_credits | integer | true | none | 通过购买获得的 Monitor Credits |
