EtshopAPI Platform
中文 / EN
接口参考

商品数据趋势 API

GET/v1/product/data-analysis-tread
免费·api.etshop.ai/open-api
Credits 消耗规则

计费规则:店铺/商品列表与热销榜每返回 1 条扣 1 Credit,店铺详情每次扣 2 Credits;详情、趋势、每日数据、评论免费(需 3 天内在列表或详情中返回过)。关键词搜索每个词扣 1 Keyword Credit,30 天内同一个词免费。店铺监控每个店铺扣 1 Monitor Credit,监控 30 天,停止后不退还。空结果不扣费,服务器错误自动退还。

请求头

AUTHORIZATIONAuthorization: {API Key}
CONTENT-TYPEapplication/json
ACCEPTapplication/json

请求示例

cURL
curl --location --request GET 'https://api.etshop.ai/open-api/v1/product/data-analysis-tread?product_id=1284567890&start_time=1794067200&end_time=1794326400' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: {API Key}'

请求参数 3 项

按参数标注的位置传入请求。

参数 类型 说明
product_id
query · 必填
integer 商品 ID
start_time
query · 可选
integer 开始时间(Unix 时间戳,秒),包含当天
end_time
query · 可选
integer 结束时间(Unix 时间戳,秒),不包含该时间点;只统计 start_time ≤ 日期 < end_time 的数据

返回示例

返回示例 · JSON
{
    "code": 200,
    "message": "success",
    "data": {
        "data": [
            {
                "favorites_count": 68,
                "views": 870,
                "review_count": 2,
                "day_time": 1794067200
            },
            {
                "favorites_count": 80,
                "views": 550,
                "review_count": 3,
                "day_time": 1794153600
            },
            {
                "favorites_count": 80,
                "views": 564,
                "review_count": 3,
                "day_time": 1794240000
            }
        ],
        "favorites_count": 160,
        "review_count": 6,
        "views": 1114
    },
    "credits": {
        "type": "default",
        "remaining_credits": 196531,
        "consumed_credits": 0,
        "total_credits": 196531
    }
}
文档中的示例数据

返回数据结构

名称 类型 必选 约束 说明
» code integer true none 业务状态码
» message string true none 响应消息
» data object true none 响应数据
»» data [object] true none 每日增长数据,按日期从旧到新排列
»»» day_time integer true none 日期(当天 00:00 的 Unix 时间戳,秒,UTC+8)
»»» review_count integer true none 当天评论增长
»»» favorites_count integer true none 当天收藏增长
»»» views integer true none 当天浏览增长
»» review_count integer true none 时间范围内的评论增长(最后一天减第一天)
»» favorites_count integer true none 时间范围内的收藏增长
»» views integer true none 时间范围内的浏览增长
» credits object true none 本次请求的 Credits 信息,见计费规则
»» type string true none Credits 类型,本接口为 default
»» remaining_credits integer true none 本次请求后剩余的 Credits
»» consumed_credits integer true none 本次请求消耗的 Credits,本接口为 0
»» total_credits integer true none 本次请求前的 Credits 余额(remaining_credits + consumed_credits)
来自现有接口目录与文档 · 支持接口名称和地址搜索