1. 竞争格局总览
xiyou-openapi
  • 西柚洞察OPENAPI-V2接入指引
  • 西柚洞察OPENAPI接入指引(已归档)
  • Release Notes
  • 西柚洞察OPENAPI-V1接入指引(该接入已归档)
  • asins
    • asin流量得分
      POST
    • asin基础信息变动趋势(天)
      POST
    • asin流量得分趋势(天)
      POST
    • asin流量得分趋势(周)
      POST
    • asin流量得分趋势(月)
      POST
    • asin广告信息变动趋势(天)
      POST
    • asin BSR排名趋势(天)
      POST
    • asin订单量趋势(月)
      POST
    • asin商品信息趋势图(天)
      POST
    • asin反查关键词列表(最近天)
      POST
    • asin反查关键词列表(月)
      POST
    • asin商品信息
      POST
    • asin近30天订单量
      POST
    • 获取asin变体接口
      POST
  • asinSearchTerms
    • asin词流量趋势(天)
      POST
    • asin词排名趋势(天)
      POST
    • asin词排名趋势(小时)
      POST
  • searchTerms
    • 关键词ABA数据趋势(周)
      POST
    • 关键词信息(最近一周)
      POST
    • 关键词分析列表(最近天)
      POST
    • 关键词分析列表(月)
      POST
  • client
    • 获取client Id的余额
      POST
  • 市场洞察
    • 资源生成
      • 生成类目洞察资源
        POST
      • 查询市场资源状态
        POST
    • 市场榜单
      • 获取类目月度销量榜
        POST
      • 获取类目年度销量榜
        POST
      • 获取类目月度新秀榜
        POST
      • 获取类目年度新秀榜
        POST
      • 获取类目月度飙升榜
        POST
      • 获取类目年度飙升榜
        POST
    • 关键词洞察
      • 获取类目关键词分析
        POST
      • 获取类目关键词搜索量趋势
        POST
      • 获取类目关键词列表
        POST
    • 类目销售走势
      • 获取类目市场规模趋势
        POST
      • 获取类目季节性分析
        POST
    • 新品机会分析
      • 类目新老品销量及数量趋势
        POST
    • 价格段机会分析
      • 获取各价格段市场销量趋势
        POST
    • 竞争格局总览
      • 获取价格段 ASIN 列表
        POST
      • 获取类目各品牌市场规模
        POST
      • 批量获取品牌销量趋势
        POST
      • 获取价格段父 ASIN 列表
        POST
    • 评分分析
      • 获取类目评分分布
        POST
      • 获取类目评分数分布
        POST
    • 基于关键词和 ASIN 搜索类目
      POST
  • foundation
    • 获取市场洞察的可用日期
      GET
  1. 竞争格局总览

批量获取品牌销量趋势

POST
/v1/marketInsights/sales/trends/brands
计费规则
本接口按品牌数量和计费月数计费。每个品牌每处理 6 个计费月(向上取整)计为 2 Credits 消耗;请求的 last30days 按额外 1 个计费月计算。
○ 计费月数 = startMonth 至 endMonth 的自然月数 + periods 中的周期数(当前 last30days 计 1 个月)
○ 公式:Credit 消耗 = 品牌数量 × ⌈计费月数 ÷ 6⌉ × 2
○ 示例:请求包含 5 个品牌,查询 12 个自然月并请求 last30days,计费月数为 13,将消耗 5 × ⌈13 ÷ 6⌉ × 2 = 30 Credits。
用于批量查询指定类目下多个品牌的月度销量与销售额趋势。
使用说明:
○ resourceId、country、categoryId、brands、startMonth 与 periods 为必填参数。
○ startMonth、endMonth 使用 YYYY-MM 格式,并复用 MonthDate 数据模型。
○ endMonth 为可选参数;不传或为空时默认查询至最新可用月份的数据。
○ periods 字段必传,但允许传空数组;元素使用 TrendPeriod 枚举,当前仅支持 last30days(近30天)。传 [] 时不返回周期数据且不增加周期计费;传 ["last30days"] 时返回近30天数据并按额外 1 个计费月计算。
可用日期: 调用 GET /v1/foundation/marketInsights/availableDates?country={country},传入与当前请求相同的国家;从 MarketInsightsAsinInfo 的 monthly 记录获取可查询月份范围。需要近30天数据时传入 periods: ["last30days"],不需要时传入 periods: []。

请求参数

Header 参数

Body 参数application/json必填

示例
{
  "resourceId": "3cdd069d0jj1f754",
  "country": "US",
  "categoryId": "us_202605_87_akde91",
  "brands": [
    "Acme"
  ],
  "startMonth": "2025-01",
  "endMonth": "2025-06",
  "periods": [
    "last30days"
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://openapi.xydc.com/v1/marketInsights/sales/trends/brands' \
--header 'X-Auth-Version: 2.0' \
--header 'X-Api-Key: your_api_key' \
--header 'Content-Type: application/json' \
--data '{
  "resourceId": "3cdd069d0jj1f754",
  "country": "US",
  "categoryId": "us_202605_87_akde91",
  "brands": [
    "Acme"
  ],
  "startMonth": "2025-01",
  "endMonth": "2025-06",
  "periods": [
    "last30days"
  ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "entities": [
        {
            "brand": "string",
            "trends": [
                {
                    "date": "2025-06",
                    "sales": {
                        "value": 12800,
                        "mom": {
                            "previous": 11950,
                            "amount": 850,
                            "rate": "string"
                        },
                        "yoy": {
                            "previous": 11950,
                            "amount": 850,
                            "rate": "string"
                        }
                    },
                    "salesRevenue": {
                        "value": "string",
                        "mom": {
                            "previous": "string",
                            "amount": "string",
                            "rate": "string"
                        },
                        "yoy": {
                            "previous": "string",
                            "amount": "string",
                            "rate": "string"
                        }
                    }
                }
            ],
            "periods": [
                {
                    "period": "last24hours",
                    "sales": {
                        "value": 12800,
                        "mom": {
                            "previous": 11950,
                            "amount": 850,
                            "rate": "string"
                        },
                        "yoy": {
                            "previous": 11950,
                            "amount": 850,
                            "rate": "string"
                        }
                    },
                    "salesRevenue": {
                        "value": "string",
                        "mom": {
                            "previous": "string",
                            "amount": "string",
                            "rate": "string"
                        },
                        "yoy": {
                            "previous": "string",
                            "amount": "string",
                            "rate": "string"
                        }
                    }
                }
            ]
        }
    ]
}
修改于 2026-07-28 09:29:13
上一页
获取类目各品牌市场规模
下一页
获取价格段父 ASIN 列表
Built with