> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> - Base URLs: models `https://api.aisa.one/v1` (Gemini GenerateContent: `https://api.aisa.one/v1beta`); data APIs `https://api.aisa.one/apis/v1`. The `servers` of each operation in https://aisa.one/openapi.yaml is authoritative.
> - Auth: `Authorization: Bearer $AISA_API_KEY`. Never print, log, or commit the key.
> - MCP (preferred for agents): `https://mcp.aisa.one/mcp`, signed in with OAuth, so there is no key to paste.
> - Agent Skill: `npx skills add AIsa-team/agent-skills --skill aisa`. Fallback with the AIsa CLI: `aisa skills install aisa`.
> - Spending: docs, https://aisa.one/models, https://aisa.one/api, `/v1/models`, and MCP `search`, `list_categories`, `get_details`, `batch_quote`, and the `account` operation are free. Quote the exact calls before running them (MCP `batch_quote`, CLI `aisa quote --json`). If the quote reports `auto_execute_eligible: true`, run it unless the user set a tighter limit or asked only for a quote. Otherwise, tell the user in one message the planned calls, the quoted price, and a total USD budget for the task, then wait for approval. Direct HTTP calls follow the stricter rule at https://aisa.one/docs/get-started/cli.md#direct-http-fallback. Do not make paid calls to test availability. Full rule: https://aisa.one/llms.txt

# 获取 Amazon 类目结构与市场洞察

> 浏览指定 Amazon 站点的根类目、按关键词搜索类目，或按 Browse Node 类目 ID 查询节点详情、父级路径与子类目列表。同时省略 category_id 和 query 时返回根类目；传 query 时搜索类目；传 category_id 时查询节点结构。在 US 站点传 category_id 并将 include_stats 设为 true 时，同步返回类目市场统计（商品/卖家/品牌数、均价、月均销量与销售额、评分、头部集中度及新品占比，按含市场统计档位计费）。按成功请求并依 include_stats 分档计费，无结果不收费。

上方请求和响应面板使用此 API 发布的 Schema。条件必填和参数组合限制属于请求契约；组合筛选条件或账号身份前，请查看完整 Schema。

## 计费

| 输入 | 计价单位 | 价格 (USD) |
| - | - | - |
| /input/include\_stats = false | 每次成功请求 | 0.0013 |
| /input/include\_stats = true | 每次成功请求 | 0.1213 |

仅表内参数值有价格；未列出的值不会回退到基础价格。
成功交付才收费；正常查空不收费。

发送相同请求并带上 `X-AISA-Cost-Mode: quote`，获取与输入对应的报价；报价不执行任务，也不预扣资金。实际执行时预扣预计请求费用，按上述规则结算。用 `X-AISA-Max-Price-USD` 设置价格上限。

执行任务时使用 `Idempotency-Key`。错误时查看 `error.code`、`error.request_id`、`error.retryable` 和 `error.retry_hint`。提示先核对结算时，应先查询原请求再决定是否重试；不能把待结算当作已退款。


## OpenAPI

````yaml zh/tasks/openapi.json POST /v1/tasks/commerce.amazon.get_category_insights
openapi: 3.1.0
info:
  title: AIsa Tasks
  version: '1'
  x-aisa-runtime-release:
    artifact_revision: 5e4f53bffbed8b98ca7b4a4b3fa1750f8a86f20cd6531c75e93d2c4fc68ceee3
    compiler_revision: 7d86aa782a15dad647ad8cac3a24b1267d937e98
    source_digest: 290c96cf57eb4693f5c39eb8644e07430868b718ebdcea81dec3f17e4ffbfd67
    generation: 16733
servers:
  - url: https://api.aisa.one
security:
  - bearer: []
paths:
  /v1/tasks/commerce.amazon.get_category_insights:
    post:
      tags:
        - 任务
      summary: 获取 Amazon 类目结构与市场洞察
      description: >-
        浏览指定 Amazon 站点的根类目、按关键词搜索类目，或按 Browse Node 类目 ID 查询节点详情、父级路径与子类目列表。同时省略
        category_id 和 query 时返回根类目；传 query 时搜索类目；传 category_id 时查询节点结构。在 US 站点传
        category_id 并将 include_stats 设为 true
        时，同步返回类目市场统计（商品/卖家/品牌数、均价、月均销量与销售额、评分、头部集中度及新品占比，按含市场统计档位计费）。按成功请求并依
        include_stats 分档计费，无结果不收费。
      operationId: task_commerce.amazon.get_category_insights
      parameters:
        - name: Idempotency-Key
          in: header
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/commerce.amazon.get_category_insights_request
      responses:
        '200':
          description: 成功交付或正常查空
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/commerce.amazon.get_category_insights_response
        default:
          description: 错误；以实际 HTTP 状态和重试指引为准
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/commerce.amazon.get_category_insights_error
components:
  schemas:
    commerce.amazon.get_category_insights_request:
      type: object
      required:
        - input
      properties:
        input:
          type: object
          properties:
            category_id:
              type: string
              maxLength: 32
              description: >-
                可选 Amazon Browse Node 数字类目 ID（例如 172282）。与 query 互斥；当
                include_stats 为 true 时必填。
            country:
              type: string
              enum:
                - CA
                - DE
                - ES
                - FR
                - GB
                - IT
                - JP
                - MX
                - US
              description: >-
                站点两位国家码（ISO 3166-1 alpha-2 大写，如 US、GB、DE、JP）。启用 include_stats
                时目前支持 US 站点。
            include_stats:
              type: boolean
              enum:
                - false
                - true
              default: false
              description: 设为 true 时（仅 US 站点且需提供 category_id）同步返回类目市场统计数据（按含市场统计档位计费）。
            month:
              type: string
              maxLength: 7
              description: >-
                自然月（YYYY-MM 格式），当 include_stats 为 true 且 period 为 calendar_month
                时必填。
            new_product_months:
              type: integer
              minimum: 1
              maximum: 24
              default: 6
              description: 启用 include_stats 时新品判定的上架月数阈值（1-24，默认 6）。
            period:
              type: string
              enum:
                - 30d
                - calendar_month
              default: 30d
              description: 启用 include_stats 时的统计周期（30d 或 calendar_month，默认 30d）。
            query:
              type: string
              maxLength: 200
              description: 可选类目搜索关键词（空格分隔，每个词至少 3 个字符）。与 category_id 互斥。
            top_n:
              type: integer
              minimum: 1
              maximum: 100
              default: 10
              description: 启用 include_stats 时头部集中度统计的样本数 Top N（1-100，默认 10）。
          required:
            - country
    commerce.amazon.get_category_insights_response:
      additionalProperties: false
      properties:
        meta:
          additionalProperties: false
          properties:
            approximate_fields:
              items:
                type: string
              type:
                - array
                - 'null'
            delivered:
              type: boolean
            missing_fields:
              additionalProperties:
                description: >-
                  A stable missing-field reason, or distinct reasons separated
                  by '; '. Unrecognized internal diagnostics are reported as
                  unspecified.
                pattern: >-
                  ^(not_returned|not_supported|unparseable|continuation_failed|reference_identity_unverifiable|page_limit_reached|report_part_failed|some_account_identities_unusable|some_creators_unanalyzed|insufficient_analyzable_creators|pagination_not_reported|page_or_item_limit_reached|some_distributions_unusable|quote_not_usable|quote_availability_not_returned|quote_price_not_returned|unspecified)(;
                  (not_returned|not_supported|unparseable|continuation_failed|reference_identity_unverifiable|page_limit_reached|report_part_failed|some_account_identities_unusable|some_creators_unanalyzed|insufficient_analyzable_creators|pagination_not_reported|page_or_item_limit_reached|some_distributions_unusable|quote_not_usable|quote_availability_not_returned|quote_price_not_returned|unspecified))*$
                type: string
              type:
                - object
                - 'null'
          required:
            - missing_fields
            - approximate_fields
            - delivered
          type: object
        result:
          anyOf:
            - anyOf:
                - properties:
                    categories:
                      description: 根类目或关键词搜索命中的类目节点列表。
                      items:
                        properties:
                          ancestors:
                            description: 从根类目到直接父类目的有序祖先链。
                            items:
                              properties:
                                category_id:
                                  description: 祖先类目的 Amazon Browse Node ID。
                                  type: string
                                name:
                                  description: 祖先类目名称。
                                  type: string
                              required:
                                - category_id
                                - name
                              type: object
                            type:
                              - array
                              - 'null'
                          category_id:
                            description: Amazon Browse Node 类目 ID。
                            type: string
                          child_ids:
                            description: 直接子类目 ID 列表（可用时）。
                            items:
                              type: string
                            type:
                              - array
                              - 'null'
                          name:
                            description: 类目名称。
                            type: string
                          parent_id:
                            description: 直接父类目 ID（根类目为 null）。
                            type:
                              - string
                              - 'null'
                          product_count:
                            description: 该类目节点下观测到的商品数量（可用时）。
                            type:
                              - integer
                              - 'null'
                        required:
                          - category_id
                          - name
                          - parent_id
                          - child_ids
                          - product_count
                          - ancestors
                        type: object
                      type:
                        - array
                        - 'null'
                    category:
                      description: node 模式下返回的指定类目节点详情（roots/search 模式为 null）。
                      properties:
                        ancestors:
                          description: 从根类目到直接父类目的有序祖先链。
                          items:
                            properties:
                              category_id:
                                description: 祖先类目的 Amazon Browse Node ID。
                                type: string
                              name:
                                description: 祖先类目名称。
                                type: string
                            required:
                              - category_id
                              - name
                            type: object
                          type:
                            - array
                            - 'null'
                        category_id:
                          description: Amazon Browse Node 类目 ID。
                          type: string
                        child_ids:
                          description: 直接子类目 ID 列表（可用时）。
                          items:
                            type: string
                          type:
                            - array
                            - 'null'
                        name:
                          description: 类目名称。
                          type: string
                        parent_id:
                          description: 直接父类目 ID（根类目为 null）。
                          type:
                            - string
                            - 'null'
                        product_count:
                          description: 该类目节点下观测到的商品数量（可用时）。
                          type:
                            - integer
                            - 'null'
                      required:
                        - category_id
                        - name
                        - parent_id
                        - child_ids
                        - product_count
                        - ancestors
                      type:
                        - object
                        - 'null'
                    country:
                      description: Amazon 站点两位国家码（ISO 3166-1 alpha-2）。
                      type: string
                    mode:
                      description: 本次查询模式：roots（根类目）、search（关键词搜索）或 node（指定类目节点）。
                      enum:
                        - roots
                        - search
                        - node
                      type: string
                    platform:
                      description: 电商平台标识（amazon）。
                      enum:
                        - amazon
                      type: string
                    stats:
                      description: US 站点启用 include_stats 时返回的类目市场统计（否则为 null）。
                      properties:
                        avg_price:
                          description: 类目样本商品平均价格。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        avg_profit_rate:
                          description: 类目样本商品平均利润率百分比。
                          type:
                            - number
                            - 'null'
                        avg_rating_count:
                          description: 类目样本商品平均评分数。
                          type:
                            - integer
                            - 'null'
                        avg_rating_score:
                          description: 类目样本商品平均评分。
                          type:
                            - number
                            - 'null'
                        avg_sales_amount:
                          description: 类目样本商品月均销售额。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        avg_sales_count:
                          description: 类目样本商品月均销量。
                          type:
                            - integer
                            - 'null'
                        avg_sales_rank:
                          description: 类目样本商品平均 BSR 排名。
                          type:
                            - integer
                            - 'null'
                        brand_count:
                          description: 类目样本中的品牌数。
                          type:
                            - integer
                            - 'null'
                        category_label_path:
                          description: 冒号分隔的类目名称路径。
                          type:
                            - string
                            - 'null'
                        category_path:
                          description: 冒号分隔的规范 Amazon 类目 ID 路径。
                          type: string
                        month:
                          description: 当 period 为 calendar_month 时对应的自然月（YYYY-MM）。
                          type:
                            - string
                            - 'null'
                        new_product_avg_price:
                          description: 类目新品的平均价格。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        new_product_avg_sales_amount:
                          description: 类目新品的月均销售额。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        new_product_avg_sales_count:
                          description: 类目新品的月均销量。
                          type:
                            - integer
                            - 'null'
                        new_product_count:
                          description: 在指定新品月数阈值内上架的新品数。
                          type:
                            - integer
                            - 'null'
                        new_product_share:
                          description: 新品在类目样本中的占比。
                          type:
                            - number
                            - 'null'
                        period:
                          description: 市场统计周期（30d 或 calendar_month）。
                          enum:
                            - 30d
                            - calendar_month
                          type: string
                        product_count:
                          description: 该类目下的商品总数。
                          type:
                            - integer
                            - 'null'
                        sample_product_count:
                          description: 用于计算类目均值的样本商品数。
                          type:
                            - integer
                            - 'null'
                        seller_count:
                          description: 类目样本中的卖家数。
                          type:
                            - integer
                            - 'null'
                        top_n_avg_price:
                          description: 头部 Top N 商品的平均价格。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        top_n_avg_sales_amount:
                          description: 头部 Top N 商品的月均销售额。
                          properties:
                            amount:
                              description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                              type: string
                            currency:
                              description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                              type: string
                          required:
                            - amount
                            - currency
                          type:
                            - object
                            - 'null'
                        top_n_avg_sales_count:
                          description: 头部 Top N 商品的月均销量。
                          type:
                            - integer
                            - 'null'
                        top_n_product_count:
                          description: 头部集中度统计覆盖的 Top N 商品数。
                          type:
                            - integer
                            - 'null'
                      required:
                        - period
                        - month
                        - category_path
                        - category_label_path
                        - product_count
                        - sample_product_count
                        - seller_count
                        - brand_count
                        - avg_price
                        - avg_sales_count
                        - avg_sales_amount
                        - avg_rating_score
                        - avg_rating_count
                        - avg_sales_rank
                        - avg_profit_rate
                        - top_n_product_count
                        - top_n_avg_price
                        - top_n_avg_sales_count
                        - top_n_avg_sales_amount
                        - new_product_count
                        - new_product_share
                        - new_product_avg_price
                        - new_product_avg_sales_count
                        - new_product_avg_sales_amount
                      type:
                        - object
                        - 'null'
                  required:
                    - platform
                    - country
                    - mode
                    - category
                    - categories
                    - stats
                  type: object
                - additionalProperties: false
                  properties:
                    by_source:
                      items:
                        additionalProperties: false
                        properties:
                          result:
                            anyOf:
                              - properties:
                                  categories:
                                    description: 根类目或关键词搜索命中的类目节点列表。
                                    items:
                                      properties:
                                        ancestors:
                                          description: 从根类目到直接父类目的有序祖先链。
                                          items:
                                            properties:
                                              category_id:
                                                description: 祖先类目的 Amazon Browse Node ID。
                                                type: string
                                              name:
                                                description: 祖先类目名称。
                                                type: string
                                            required:
                                              - category_id
                                              - name
                                            type: object
                                          type:
                                            - array
                                            - 'null'
                                        category_id:
                                          description: Amazon Browse Node 类目 ID。
                                          type: string
                                        child_ids:
                                          description: 直接子类目 ID 列表（可用时）。
                                          items:
                                            type: string
                                          type:
                                            - array
                                            - 'null'
                                        name:
                                          description: 类目名称。
                                          type: string
                                        parent_id:
                                          description: 直接父类目 ID（根类目为 null）。
                                          type:
                                            - string
                                            - 'null'
                                        product_count:
                                          description: 该类目节点下观测到的商品数量（可用时）。
                                          type:
                                            - integer
                                            - 'null'
                                      required:
                                        - category_id
                                        - name
                                        - parent_id
                                        - child_ids
                                        - product_count
                                        - ancestors
                                      type: object
                                    type:
                                      - array
                                      - 'null'
                                  category:
                                    description: >-
                                      node 模式下返回的指定类目节点详情（roots/search 模式为
                                      null）。
                                    properties:
                                      ancestors:
                                        description: 从根类目到直接父类目的有序祖先链。
                                        items:
                                          properties:
                                            category_id:
                                              description: 祖先类目的 Amazon Browse Node ID。
                                              type: string
                                            name:
                                              description: 祖先类目名称。
                                              type: string
                                          required:
                                            - category_id
                                            - name
                                          type: object
                                        type:
                                          - array
                                          - 'null'
                                      category_id:
                                        description: Amazon Browse Node 类目 ID。
                                        type: string
                                      child_ids:
                                        description: 直接子类目 ID 列表（可用时）。
                                        items:
                                          type: string
                                        type:
                                          - array
                                          - 'null'
                                      name:
                                        description: 类目名称。
                                        type: string
                                      parent_id:
                                        description: 直接父类目 ID（根类目为 null）。
                                        type:
                                          - string
                                          - 'null'
                                      product_count:
                                        description: 该类目节点下观测到的商品数量（可用时）。
                                        type:
                                          - integer
                                          - 'null'
                                    required:
                                      - category_id
                                      - name
                                      - parent_id
                                      - child_ids
                                      - product_count
                                      - ancestors
                                    type:
                                      - object
                                      - 'null'
                                  country:
                                    description: Amazon 站点两位国家码（ISO 3166-1 alpha-2）。
                                    type: string
                                  mode:
                                    description: >-
                                      本次查询模式：roots（根类目）、search（关键词搜索）或
                                      node（指定类目节点）。
                                    enum:
                                      - roots
                                      - search
                                      - node
                                    type: string
                                  platform:
                                    description: 电商平台标识（amazon）。
                                    enum:
                                      - amazon
                                    type: string
                                  stats:
                                    description: >-
                                      US 站点启用 include_stats 时返回的类目市场统计（否则为
                                      null）。
                                    properties:
                                      avg_price:
                                        description: 类目样本商品平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      avg_profit_rate:
                                        description: 类目样本商品平均利润率百分比。
                                        type:
                                          - number
                                          - 'null'
                                      avg_rating_count:
                                        description: 类目样本商品平均评分数。
                                        type:
                                          - integer
                                          - 'null'
                                      avg_rating_score:
                                        description: 类目样本商品平均评分。
                                        type:
                                          - number
                                          - 'null'
                                      avg_sales_amount:
                                        description: 类目样本商品月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      avg_sales_count:
                                        description: 类目样本商品月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      avg_sales_rank:
                                        description: 类目样本商品平均 BSR 排名。
                                        type:
                                          - integer
                                          - 'null'
                                      brand_count:
                                        description: 类目样本中的品牌数。
                                        type:
                                          - integer
                                          - 'null'
                                      category_label_path:
                                        description: 冒号分隔的类目名称路径。
                                        type:
                                          - string
                                          - 'null'
                                      category_path:
                                        description: 冒号分隔的规范 Amazon 类目 ID 路径。
                                        type: string
                                      month:
                                        description: >-
                                          当 period 为 calendar_month
                                          时对应的自然月（YYYY-MM）。
                                        type:
                                          - string
                                          - 'null'
                                      new_product_avg_price:
                                        description: 类目新品的平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      new_product_avg_sales_amount:
                                        description: 类目新品的月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      new_product_avg_sales_count:
                                        description: 类目新品的月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      new_product_count:
                                        description: 在指定新品月数阈值内上架的新品数。
                                        type:
                                          - integer
                                          - 'null'
                                      new_product_share:
                                        description: 新品在类目样本中的占比。
                                        type:
                                          - number
                                          - 'null'
                                      period:
                                        description: 市场统计周期（30d 或 calendar_month）。
                                        enum:
                                          - 30d
                                          - calendar_month
                                        type: string
                                      product_count:
                                        description: 该类目下的商品总数。
                                        type:
                                          - integer
                                          - 'null'
                                      sample_product_count:
                                        description: 用于计算类目均值的样本商品数。
                                        type:
                                          - integer
                                          - 'null'
                                      seller_count:
                                        description: 类目样本中的卖家数。
                                        type:
                                          - integer
                                          - 'null'
                                      top_n_avg_price:
                                        description: 头部 Top N 商品的平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      top_n_avg_sales_amount:
                                        description: 头部 Top N 商品的月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      top_n_avg_sales_count:
                                        description: 头部 Top N 商品的月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      top_n_product_count:
                                        description: 头部集中度统计覆盖的 Top N 商品数。
                                        type:
                                          - integer
                                          - 'null'
                                    required:
                                      - period
                                      - month
                                      - category_path
                                      - category_label_path
                                      - product_count
                                      - sample_product_count
                                      - seller_count
                                      - brand_count
                                      - avg_price
                                      - avg_sales_count
                                      - avg_sales_amount
                                      - avg_rating_score
                                      - avg_rating_count
                                      - avg_sales_rank
                                      - avg_profit_rate
                                      - top_n_product_count
                                      - top_n_avg_price
                                      - top_n_avg_sales_count
                                      - top_n_avg_sales_amount
                                      - new_product_count
                                      - new_product_share
                                      - new_product_avg_price
                                      - new_product_avg_sales_count
                                      - new_product_avg_sales_amount
                                    type:
                                      - object
                                      - 'null'
                                required:
                                  - platform
                                  - country
                                  - mode
                                  - category
                                  - categories
                                  - stats
                                type: object
                              - type: 'null'
                          status:
                            enum:
                              - found
                              - partial
                              - not_found
                              - failed
                            type: string
                        required:
                          - status
                          - result
                        type: object
                      type: array
                  required:
                    - by_source
                  type: object
                - additionalProperties: false
                  properties:
                    checked_count:
                      minimum: 0
                      type: integer
                    failed_count:
                      minimum: 0
                      type: integer
                    hit:
                      type: boolean
                    matches:
                      items:
                        additionalProperties: false
                        properties:
                          result:
                            anyOf:
                              - properties:
                                  categories:
                                    description: 根类目或关键词搜索命中的类目节点列表。
                                    items:
                                      properties:
                                        ancestors:
                                          description: 从根类目到直接父类目的有序祖先链。
                                          items:
                                            properties:
                                              category_id:
                                                description: 祖先类目的 Amazon Browse Node ID。
                                                type: string
                                              name:
                                                description: 祖先类目名称。
                                                type: string
                                            required:
                                              - category_id
                                              - name
                                            type: object
                                          type:
                                            - array
                                            - 'null'
                                        category_id:
                                          description: Amazon Browse Node 类目 ID。
                                          type: string
                                        child_ids:
                                          description: 直接子类目 ID 列表（可用时）。
                                          items:
                                            type: string
                                          type:
                                            - array
                                            - 'null'
                                        name:
                                          description: 类目名称。
                                          type: string
                                        parent_id:
                                          description: 直接父类目 ID（根类目为 null）。
                                          type:
                                            - string
                                            - 'null'
                                        product_count:
                                          description: 该类目节点下观测到的商品数量（可用时）。
                                          type:
                                            - integer
                                            - 'null'
                                      required:
                                        - category_id
                                        - name
                                        - parent_id
                                        - child_ids
                                        - product_count
                                        - ancestors
                                      type: object
                                    type:
                                      - array
                                      - 'null'
                                  category:
                                    description: >-
                                      node 模式下返回的指定类目节点详情（roots/search 模式为
                                      null）。
                                    properties:
                                      ancestors:
                                        description: 从根类目到直接父类目的有序祖先链。
                                        items:
                                          properties:
                                            category_id:
                                              description: 祖先类目的 Amazon Browse Node ID。
                                              type: string
                                            name:
                                              description: 祖先类目名称。
                                              type: string
                                          required:
                                            - category_id
                                            - name
                                          type: object
                                        type:
                                          - array
                                          - 'null'
                                      category_id:
                                        description: Amazon Browse Node 类目 ID。
                                        type: string
                                      child_ids:
                                        description: 直接子类目 ID 列表（可用时）。
                                        items:
                                          type: string
                                        type:
                                          - array
                                          - 'null'
                                      name:
                                        description: 类目名称。
                                        type: string
                                      parent_id:
                                        description: 直接父类目 ID（根类目为 null）。
                                        type:
                                          - string
                                          - 'null'
                                      product_count:
                                        description: 该类目节点下观测到的商品数量（可用时）。
                                        type:
                                          - integer
                                          - 'null'
                                    required:
                                      - category_id
                                      - name
                                      - parent_id
                                      - child_ids
                                      - product_count
                                      - ancestors
                                    type:
                                      - object
                                      - 'null'
                                  country:
                                    description: Amazon 站点两位国家码（ISO 3166-1 alpha-2）。
                                    type: string
                                  mode:
                                    description: >-
                                      本次查询模式：roots（根类目）、search（关键词搜索）或
                                      node（指定类目节点）。
                                    enum:
                                      - roots
                                      - search
                                      - node
                                    type: string
                                  platform:
                                    description: 电商平台标识（amazon）。
                                    enum:
                                      - amazon
                                    type: string
                                  stats:
                                    description: >-
                                      US 站点启用 include_stats 时返回的类目市场统计（否则为
                                      null）。
                                    properties:
                                      avg_price:
                                        description: 类目样本商品平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      avg_profit_rate:
                                        description: 类目样本商品平均利润率百分比。
                                        type:
                                          - number
                                          - 'null'
                                      avg_rating_count:
                                        description: 类目样本商品平均评分数。
                                        type:
                                          - integer
                                          - 'null'
                                      avg_rating_score:
                                        description: 类目样本商品平均评分。
                                        type:
                                          - number
                                          - 'null'
                                      avg_sales_amount:
                                        description: 类目样本商品月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      avg_sales_count:
                                        description: 类目样本商品月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      avg_sales_rank:
                                        description: 类目样本商品平均 BSR 排名。
                                        type:
                                          - integer
                                          - 'null'
                                      brand_count:
                                        description: 类目样本中的品牌数。
                                        type:
                                          - integer
                                          - 'null'
                                      category_label_path:
                                        description: 冒号分隔的类目名称路径。
                                        type:
                                          - string
                                          - 'null'
                                      category_path:
                                        description: 冒号分隔的规范 Amazon 类目 ID 路径。
                                        type: string
                                      month:
                                        description: >-
                                          当 period 为 calendar_month
                                          时对应的自然月（YYYY-MM）。
                                        type:
                                          - string
                                          - 'null'
                                      new_product_avg_price:
                                        description: 类目新品的平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      new_product_avg_sales_amount:
                                        description: 类目新品的月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      new_product_avg_sales_count:
                                        description: 类目新品的月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      new_product_count:
                                        description: 在指定新品月数阈值内上架的新品数。
                                        type:
                                          - integer
                                          - 'null'
                                      new_product_share:
                                        description: 新品在类目样本中的占比。
                                        type:
                                          - number
                                          - 'null'
                                      period:
                                        description: 市场统计周期（30d 或 calendar_month）。
                                        enum:
                                          - 30d
                                          - calendar_month
                                        type: string
                                      product_count:
                                        description: 该类目下的商品总数。
                                        type:
                                          - integer
                                          - 'null'
                                      sample_product_count:
                                        description: 用于计算类目均值的样本商品数。
                                        type:
                                          - integer
                                          - 'null'
                                      seller_count:
                                        description: 类目样本中的卖家数。
                                        type:
                                          - integer
                                          - 'null'
                                      top_n_avg_price:
                                        description: 头部 Top N 商品的平均价格。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      top_n_avg_sales_amount:
                                        description: 头部 Top N 商品的月均销售额。
                                        properties:
                                          amount:
                                            description: 以货币主单位计的非负金额，采用精确十进制字符串表示。
                                            type: string
                                          currency:
                                            description: 已确认的 ISO 4217 货币代码；不从货币符号猜测。
                                            type: string
                                        required:
                                          - amount
                                          - currency
                                        type:
                                          - object
                                          - 'null'
                                      top_n_avg_sales_count:
                                        description: 头部 Top N 商品的月均销量。
                                        type:
                                          - integer
                                          - 'null'
                                      top_n_product_count:
                                        description: 头部集中度统计覆盖的 Top N 商品数。
                                        type:
                                          - integer
                                          - 'null'
                                    required:
                                      - period
                                      - month
                                      - category_path
                                      - category_label_path
                                      - product_count
                                      - sample_product_count
                                      - seller_count
                                      - brand_count
                                      - avg_price
                                      - avg_sales_count
                                      - avg_sales_amount
                                      - avg_rating_score
                                      - avg_rating_count
                                      - avg_sales_rank
                                      - avg_profit_rate
                                      - top_n_product_count
                                      - top_n_avg_price
                                      - top_n_avg_sales_count
                                      - top_n_avg_sales_amount
                                      - new_product_count
                                      - new_product_share
                                      - new_product_avg_price
                                      - new_product_avg_sales_count
                                      - new_product_avg_sales_amount
                                    type:
                                      - object
                                      - 'null'
                                required:
                                  - platform
                                  - country
                                  - mode
                                  - category
                                  - categories
                                  - stats
                                type: object
                              - type: 'null'
                          status:
                            enum:
                              - found
                              - partial
                              - not_found
                              - failed
                            type: string
                        required:
                          - status
                          - result
                        type: object
                      type: array
                  required:
                    - hit
                    - checked_count
                    - failed_count
                    - matches
                  type: object
            - type: 'null'
        status:
          enum:
            - found
            - partial
            - not_found
          type: string
        task:
          const: commerce.amazon.get_category_insights
        version:
          const: 1
      required:
        - task
        - version
        - status
        - result
        - meta
      type: object
    commerce.amazon.get_category_insights_error:
      $ref: '#/components/schemas/commerce.amazon.get_category_insights_error.0_Error'
      $schema: https://json-schema.org/draft/2020-12/schema
    commerce.amazon.get_category_insights_error.0_Error:
      additionalProperties: false
      properties:
        error:
          $ref: >-
            #/components/schemas/commerce.amazon.get_category_insights_error.1_ErrorDetail
      required:
        - error
      type: object
    commerce.amazon.get_category_insights_error.1_ErrorDetail:
      additionalProperties: false
      else:
        properties:
          retryable:
            const: false
      if:
        properties:
          retry_hint:
            const: after_delay
      properties:
        code:
          enum:
            - invalid_request
            - invalid_input
            - unsupported_route
            - unsupported_capability
            - unsupported_identity
            - provider_rejected_input
            - invalid_cost_mode
            - cost_quote_payment_unsupported
            - cost_quote_unsupported
            - unpriced_request_value
            - missing_api_key
            - invalid_api_key
            - api_key_disabled
            - expired_api_key
            - unauthorized
            - forbidden
            - user_disabled
            - ip_not_allowed
            - api_key_access_denied
            - estimated_price_exceeds_max_price
            - insufficient_api_key_balance
            - insufficient_wallet_balance
            - task_not_found
            - endpoint_not_found
            - request_in_progress
            - request_already_completed
            - idempotency_conflict
            - request_id_conflict
            - request_too_large
            - method_not_allowed
            - rate_limit_exceeded
            - internal_error
            - service_unavailable
          type: string
        message:
          type: string
        param:
          type: string
        problems:
          items:
            type: string
          type: array
        request_id:
          minLength: 1
          type: string
        retry_hint:
          enum:
            - never
            - after_delay
            - reconcile_first
          type: string
        retryable:
          type: boolean
        similar_tasks:
          items:
            type: string
          type: array
        task_id:
          type: string
      required:
        - code
        - message
        - request_id
        - retryable
        - retry_hint
      then:
        properties:
          retryable:
            const: true
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.