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

# 亚马逊研究

> 搜索商品、读取精确 ASIN、关键词量、筛选评论、历史价格与卖家报价，支持可选跨商家搜索和网页读取。

必须指定市场。action 为 search、product、keywords、keyword\_volume、reviews、price\_history、offers、merchant\_search、merchant\_page。先报价；超过 max\_charge\_usd 的请求在创建 Run 前拒绝。未知为 null。明确实际评论页及筛选条件，不能声称总体占比。保留价格序列、币种和观察时间；缓存报价不是核验后的结账价格。pending 使用原 result\_url 免费重读，原始证据保留在 Run。


## OpenAPI

````yaml /openapi.zh.json post /v1/solutions/gtm/amazon_research
openapi: 3.1.0
info:
  title: Glasser
  version: 0.0.1
  description: 一个 API Key，无需合同，按次付费，即可调用批量采购的付费 API。每个响应包含 x-request-id；所有错误正文采用统一结构。
servers:
  - url: https://api.glasser.ai
security: []
tags:
  - name: Solutions
  - name: Endpoints
  - name: Runs
  - name: Balance
paths:
  /v1/solutions/gtm/amazon_research:
    post:
      tags:
        - Solutions
      summary: 亚马逊研究
      description: >-
        搜索商品和精确 ASIN，读取相关词或精确词的需求估计、有界筛选评论、历史价格与独立卖家报价。必须指定市场。缺失值为
        null，估计值、样本和缺货保留原有边界。不支持的字段或超过 max_charge_usd 的请求在 Run 前拒绝。202
        返回带签名且需认证的 result_url，免费读取同一批 Run；原始输出在 GET /v1/runs/:id。auto 仅在
        Provider 错误、超时或受理 503 时兜底，空结果不兜底。
      operationId: gtm-amazon-research
      parameters:
        - name: idempotency-key
          in: header
          schema:
            type: string
            minLength: 1
            description: >-
              每次独立查询都生成新的唯一值（建议使用随机 UUID），即使参数相同且发生在同一天。仅在恢复同一次预期执行时沿用原键与参数，取回原
              Run，不再次扣费。同键更改执行参数返回 409；更换 task_id 或 metadata 不会创建新
              Run。旧的不透明键仍可用于恢复。
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  enum:
                    - search
                    - product
                    - keywords
                    - keyword_volume
                    - reviews
                    - price_history
                    - offers
                    - merchant_search
                    - merchant_page
                country:
                  type: string
                  minLength: 1
                  description: >-
                    必须明确亚马逊市场。常规取数支持 us、gb、de、fr、it、es、ca、jp、in、au；相关词只支持
                    us/en，精确词量另有已开放的地区/语言配对。
                provider:
                  anyOf:
                    - type: string
                      enum:
                        - auto
                        - serpapi
                        - dataforseo
                        - apify
                        - keepa
                        - serper
                      description: >-
                        默认为 auto，按 Glasser
                        偏好顺序选择第一家符合条件的数据提供商。指定的数据提供商必须支持请求且获得当前 API Key
                        的允许，不会切换到其他家。可用值见下方。
                    - type: 'null'
                max_charge_usd:
                  anyOf:
                    - type: string
                      pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                      description: >-
                        精确的美元十进制字符串，小数位数为 2–6，采用唯一规范格式。求和时使用十进制运算或乘以 10^6
                        转为整数，不使用浮点数。
                      maxLength: 20
                    - type: 'null'
                review_pages:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 10
                    - type: 'null'
                review_rating:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 5
                    - type: 'null'
                review_sort:
                  anyOf:
                    - type: string
                      enum:
                        - recent
                        - helpful
                    - type: 'null'
                verified_only:
                  anyOf:
                    - type: boolean
                    - type: 'null'
                review_keyword:
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 200
                    - type: 'null'
                url:
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 2048
                      pattern: ^https?:\/\/
                    - type: 'null'
                query:
                  anyOf:
                    - type: string
                      minLength: 1
                      maxLength: 200
                    - type: 'null'
                keywords:
                  anyOf:
                    - type: array
                      items:
                        type: string
                        minLength: 1
                      minItems: 1
                      maxItems: 1000
                    - type: 'null'
                asin:
                  anyOf:
                    - type: string
                      pattern: ^[A-Z0-9]{10}$
                    - type: 'null'
                page:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 20
                    - type: 'null'
                limit:
                  anyOf:
                    - type: integer
                      minimum: 1
                      maximum: 100
                    - type: 'null'
                offset:
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 10000
                    - type: 'null'
                language:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                days:
                  anyOf:
                    - type: integer
                      minimum: 1
                    - type: 'null'
                task_id:
                  anyOf:
                    - type: string
                      description: >-
                        将相关 Run，包括自动切换产生的 Run，归入同一个 Task。复用稳定字符串，并通过 Task 筛选 Run
                        列表。
                    - type: 'null'
                metadata:
                  anyOf:
                    - anyOf:
                        - type: object
                          additionalProperties:
                            type: string
                            minLength: 1
                            maxLength: 500
                          maxProperties: 20
                          propertyNames:
                            type: string
                            pattern: ^[a-z][a-z0-9_]{0,39}$
                        - {}
                      description: |-
                        可选追踪字段，随 Run 返回，也可用于筛选。不会发送给数据提供商，也不影响路由、价格或幂等。

                        - 最多 20 个键：小写字母、数字和下划线，以字母开头，最长 40 个字符。
                        - 值：长度为 1–500 的字符串。
                        - user_id：终端用户的不透明 ID，不得使用邮箱或姓名。

                        无效条目整体丢弃，不截断。请求继续执行，Run 返回实际保存的字段。
                    - type: 'null'
              required:
                - action
                - country
              additionalProperties: false
              description: >-
                merchant_search：query、可选 language；merchant_page：公开
                url。search：query、可选 page；product/reviews/offers：精确 asin。reviews
                支持
                review_pages、review_rating、review_sort、verified_only、review_keyword。keywords：query
                与可选 language/limit/offset，仅 us/en。keyword_volume：keywords 与
                language。max_charge_usd 在 Run 前限制最高费用。price_history：asin 与可选
                days，默认 180。不支持的字段在收费前拒绝。不修改商品、不估算费用、不创建自动监控。
        required: true
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AmazonResearchResult'
        '202':
          description: 成功
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/AmazonResearchResult'
        '400':
          description: ValidationFailed | IdempotencyKeyRequired
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
                  - $ref: '#/components/schemas/IdempotencyKeyRequiredEncoded'
                  - $ref: '#/components/schemas/ValidationFailedEncoded'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedEncoded'
        '402':
          description: InsufficientBalance
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InsufficientBalanceEncoded'
        '403':
          description: EndpointNotPermitted | Forbidden
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/EndpointNotPermittedEncoded'
                  - $ref: '#/components/schemas/ForbiddenEncoded'
        '409':
          description: IdempotencyConflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdempotencyConflictEncoded'
        '429':
          description: RateLimited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitedEncoded'
        '503':
          description: ServiceUnavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServiceUnavailableEncoded'
      security:
        - bearer: []
components:
  schemas:
    AmazonResearchResult:
      type: object
      properties:
        id:
          type: string
        run_url:
          type: string
          description: 在控制台打开 Run，需要工作空间成员权限。
        provider:
          type: string
          pattern: ^[a-z0-9][a-z0-9-]*$
        endpoint:
          type: string
          pattern: ^\/.+$
        endpoint_version:
          type: integer
          exclusiveMinimum: 0
        status:
          type: string
          enum:
            - QUEUED
            - RUNNING
            - COMPLETED
            - FAILED
            - STOPPED
          description: >-
            QUEUED 或 RUNNING 表示仍在执行。COMPLETED 表示已有数据提供商响应，包括非 2xx 响应。FAILED 请读取
            failure。STOPPED 表示分派前停止。charge_usd 与状态分别检查。
        failure:
          anyOf:
            - type: object
              properties:
                kind:
                  type: string
                  enum:
                    - TIMED_OUT
                    - INTERNAL
                message:
                  type: string
              required:
                - kind
                - message
              additionalProperties: false
            - type: 'null'
          description: Run 失败原因，仅在 status 为 FAILED 时非 null。
        input:
          anyOf:
            - type: object
            - type: array
              items:
                type: object
        output:
          anyOf:
            - anyOf:
                - type: object
                  properties:
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          asin:
                            anyOf:
                              - type: string
                              - type: 'null'
                          title:
                            anyOf:
                              - type: string
                              - type: 'null'
                          url:
                            anyOf:
                              - type: string
                              - type: 'null'
                          brand:
                            anyOf:
                              - type: string
                              - type: 'null'
                          image_url:
                            anyOf:
                              - type: string
                              - type: 'null'
                          price:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          price_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          currency:
                            anyOf:
                              - type: string
                              - type: 'null'
                          rating:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          reviews:
                            anyOf:
                              - type: integer
                              - type: 'null'
                            description: Provider 报告的展示评论总数，可能合并变体；不是采集到的评论样本量。
                          position:
                            anyOf:
                              - type: integer
                              - type: 'null'
                          sponsored:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          bought_past_month_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          stock_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          condition_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          price_basis:
                            type: string
                            enum:
                              - displayed_listing_price
                          variants:
                            type: array
                            items:
                              type: object
                              properties:
                                asin:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                label:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                selected:
                                  anyOf:
                                    - type: boolean
                                    - type: 'null'
                              required:
                                - asin
                                - label
                                - selected
                              additionalProperties: false
                          attributes:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                value:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                              required:
                                - name
                                - value
                              additionalProperties: false
                        required:
                          - asin
                          - title
                          - url
                          - brand
                          - image_url
                          - price
                          - price_text
                          - currency
                          - rating
                          - reviews
                          - position
                          - sponsored
                          - bought_past_month_text
                          - stock_text
                          - condition_text
                          - price_basis
                          - variants
                          - attributes
                        additionalProperties: false
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    total_matches:
                      anyOf:
                        - type: integer
                        - type: 'null'
                    next_page:
                      anyOf:
                        - type: integer
                        - type: 'null'
                  required:
                    - items
                    - amazon_domain
                    - total_matches
                    - next_page
                  additionalProperties: false
                - type: object
                  properties:
                    product:
                      type: object
                      properties:
                        asin:
                          anyOf:
                            - type: string
                            - type: 'null'
                        title:
                          anyOf:
                            - type: string
                            - type: 'null'
                        url:
                          anyOf:
                            - type: string
                            - type: 'null'
                        brand:
                          anyOf:
                            - type: string
                            - type: 'null'
                        image_url:
                          anyOf:
                            - type: string
                            - type: 'null'
                        price:
                          anyOf:
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: 'null'
                        price_text:
                          anyOf:
                            - type: string
                            - type: 'null'
                        currency:
                          anyOf:
                            - type: string
                            - type: 'null'
                        rating:
                          anyOf:
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: 'null'
                        reviews:
                          anyOf:
                            - type: integer
                            - type: 'null'
                          description: Provider 报告的展示评论总数，可能合并变体；不是采集到的评论样本量。
                        position:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        sponsored:
                          anyOf:
                            - type: boolean
                            - type: 'null'
                        bought_past_month_text:
                          anyOf:
                            - type: string
                            - type: 'null'
                        stock_text:
                          anyOf:
                            - type: string
                            - type: 'null'
                        condition_text:
                          anyOf:
                            - type: string
                            - type: 'null'
                        price_basis:
                          type: string
                          enum:
                            - displayed_listing_price
                        variants:
                          type: array
                          items:
                            type: object
                            properties:
                              asin:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              label:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              selected:
                                anyOf:
                                  - type: boolean
                                  - type: 'null'
                            required:
                              - asin
                              - label
                              - selected
                            additionalProperties: false
                        attributes:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                              value:
                                anyOf:
                                  - type: string
                                  - type: 'null'
                            required:
                              - name
                              - value
                            additionalProperties: false
                      required:
                        - asin
                        - title
                        - url
                        - brand
                        - image_url
                        - price
                        - price_text
                        - currency
                        - rating
                        - reviews
                        - position
                        - sponsored
                        - bought_past_month_text
                        - stock_text
                        - condition_text
                        - price_basis
                        - variants
                        - attributes
                      additionalProperties: false
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    purchase_options:
                      type: array
                      items:
                        type: object
                        properties:
                          condition:
                            anyOf:
                              - type: string
                              - type: 'null'
                          price:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          price_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          stock_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          seller_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - condition
                          - price
                          - price_text
                          - stock_text
                          - seller_text
                        additionalProperties: false
                  required:
                    - product
                    - amazon_domain
                    - purchase_options
                  additionalProperties: false
                - type: object
                  properties:
                    mode:
                      type: string
                      enum:
                        - related
                        - exact
                    location_code:
                      anyOf:
                        - type: integer
                        - type: 'null'
                    language:
                      anyOf:
                        - type: string
                        - type: 'null'
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          keyword:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dataforseo_search_volume:
                            anyOf:
                              - type: integer
                              - type: 'null'
                          updated_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - keyword
                          - dataforseo_search_volume
                          - updated_at
                        additionalProperties: false
                    total_matches:
                      anyOf:
                        - type: integer
                        - type: 'null'
                    next_offset:
                      anyOf:
                        - type: integer
                        - type: 'null'
                  required:
                    - mode
                    - location_code
                    - language
                    - items
                    - total_matches
                    - next_offset
                  additionalProperties: false
                  description: DataForSEO 的亚马逊关键词搜索次数估计，不是销量。不能把重叠关键词量相加作为市场规模。
                - type: object
                  properties:
                    asin:
                      anyOf:
                        - type: string
                        - type: 'null'
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          id:
                            anyOf:
                              - type: string
                              - type: 'null'
                          url:
                            anyOf:
                              - type: string
                              - type: 'null'
                          asin:
                            anyOf:
                              - type: string
                              - type: 'null'
                          title:
                            anyOf:
                              - type: string
                              - type: 'null'
                          text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          rating:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          published_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                          date_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          verified_purchase:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          vine:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          language:
                            anyOf:
                              - type: string
                              - type: 'null'
                          helpful_votes:
                            anyOf:
                              - type: integer
                              - type: 'null'
                          variation_asin:
                            anyOf:
                              - type: string
                              - type: 'null'
                          variant_attributes:
                            type: array
                            items:
                              type: string
                        required:
                          - id
                          - url
                          - asin
                          - title
                          - text
                          - rating
                          - published_at
                          - date_text
                          - verified_purchase
                          - vine
                          - language
                          - helpful_votes
                          - variation_asin
                          - variant_attributes
                        additionalProperties: false
                    sample_kind:
                      type: string
                      enum:
                        - recent_page
                        - filtered_pages
                    sampling:
                      type: object
                      properties:
                        requested_pages:
                          anyOf:
                            - type: integer
                            - type: 'null'
                        observed_pages:
                          type: array
                          items:
                            type: integer
                        sort:
                          anyOf:
                            - type: string
                            - type: 'null'
                        rating_filter:
                          anyOf:
                            - type: string
                            - type: 'null'
                        keyword_filter:
                          anyOf:
                            - type: string
                            - type: 'null'
                        reviewer_type:
                          anyOf:
                            - type: string
                            - type: 'null'
                        representative:
                          type: string
                          enum:
                            - not_established
                      required:
                        - requested_pages
                        - observed_pages
                        - sort
                        - rating_filter
                        - keyword_filter
                        - reviewer_type
                        - representative
                      additionalProperties: false
                    next_cursor:
                      type: 'null'
                  required:
                    - asin
                    - amazon_domain
                    - items
                    - sample_kind
                    - sampling
                    - next_cursor
                  additionalProperties: false
                  description: 受预算约束的评论页，可筛选星级、关键词或已验证购买。请求页数与实际观察页分开，不声称总体代表性。评论指控未经核实。
                - type: object
                  properties:
                    updated_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    asin:
                      anyOf:
                        - type: string
                        - type: 'null'
                    title:
                      anyOf:
                        - type: string
                        - type: 'null'
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    currency:
                      anyOf:
                        - type: string
                        - type: 'null'
                    series:
                      type: array
                      items:
                        type: object
                        properties:
                          price_type:
                            type: string
                            enum:
                              - AMAZON
                              - NEW
                              - LISTPRICE
                          points:
                            type: array
                            items:
                              type: object
                              properties:
                                observed_at:
                                  type: string
                                price:
                                  anyOf:
                                    - anyOf:
                                        - type: number
                                        - type: string
                                          enum:
                                            - Infinity
                                            - '-Infinity'
                                            - NaN
                                    - type: 'null'
                                available:
                                  type: boolean
                              required:
                                - observed_at
                                - price
                                - available
                              additionalProperties: false
                        required:
                          - price_type
                          - points
                        additionalProperties: false
                  required:
                    - updated_at
                    - asin
                    - title
                    - amazon_domain
                    - currency
                    - series
                  additionalProperties: false
                  description: >-
                    Keepa 的独立价格序列。缺货观察的 price=null。NEW 在 2026-02-23
                    变更定义，不跨该日连接基线。历史价格不是结账报价。
                - type: object
                  properties:
                    asin:
                      anyOf:
                        - type: string
                        - type: 'null'
                    title:
                      anyOf:
                        - type: string
                        - type: 'null'
                    amazon_domain:
                      anyOf:
                        - type: string
                        - type: 'null'
                    currency:
                      anyOf:
                        - type: string
                        - type: 'null'
                    updated_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                    refresh_success:
                      anyOf:
                        - type: boolean
                        - type: 'null'
                    parent_asin:
                      anyOf:
                        - type: string
                        - type: 'null'
                    number_of_items:
                      anyOf:
                        - type: integer
                        - type: 'null'
                    package_quantity:
                      anyOf:
                        - type: integer
                        - type: 'null'
                    size:
                      anyOf:
                        - type: string
                        - type: 'null'
                    color:
                      anyOf:
                        - type: string
                        - type: 'null'
                    material:
                      anyOf:
                        - type: string
                        - type: 'null'
                    fee_context:
                      type: object
                      properties:
                        fulfillment_fee:
                          anyOf:
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: 'null'
                        updated_at:
                          anyOf:
                            - type: string
                            - type: 'null'
                        referral_fee_percent:
                          anyOf:
                            - anyOf:
                                - type: number
                                - type: string
                                  enum:
                                    - Infinity
                                    - '-Infinity'
                                    - NaN
                            - type: 'null'
                      required:
                        - fulfillment_fee
                        - updated_at
                        - referral_fee_percent
                      additionalProperties: false
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          seller_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                          condition_code:
                            anyOf:
                              - type: integer
                              - type: 'null'
                          condition_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                          is_amazon:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          fulfilled_by_amazon:
                            anyOf:
                              - type: boolean
                              - type: 'null'
                          last_seen_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                          price_observed_at:
                            anyOf:
                              - type: string
                              - type: 'null'
                          price:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          shipping:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                          landed_price:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                        required:
                          - seller_id
                          - condition_code
                          - condition_text
                          - is_amazon
                          - fulfilled_by_amazon
                          - last_seen_at
                          - price_observed_at
                          - price
                          - shipping
                          - landed_price
                        additionalProperties: false
                  required:
                    - asin
                    - title
                    - amazon_domain
                    - currency
                    - updated_at
                    - refresh_success
                    - parent_asin
                    - number_of_items
                    - package_quantity
                    - size
                    - color
                    - material
                    - fee_context
                    - items
                  additionalProperties: false
                  description: >-
                    Keepa 对精确 ASIN 观察到的卖家报价。状态代码保留 Keepa
                    定义，最近出现时间与变价时间分开。缓存数据不是经过核验的结账报价。竞品费用只作背景，不是目标 SKU 成本。
                - type: object
                  properties:
                    items:
                      type: array
                      items:
                        type: object
                        properties:
                          title:
                            anyOf:
                              - type: string
                              - type: 'null'
                          url:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: Google Shopping 商品页面。
                          merchant_url:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: 数据提供商报告的商家报价 URL，取自 SerpApi link；Serper 为 null。
                          google_product_id:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: >-
                              Google Shopping 商品 ID，取自 Serper productId 或
                              SerpApi product_id。
                          price_text:
                            anyOf:
                              - type: string
                              - type: 'null'
                            description: 数据提供商的价格展示文本，例如 '$69.00'，不解析，币种取决于 country。
                          seller:
                            anyOf:
                              - type: string
                              - type: 'null'
                          rating:
                            anyOf:
                              - anyOf:
                                  - type: number
                                  - type: string
                                    enum:
                                      - Infinity
                                      - '-Infinity'
                                      - NaN
                              - type: 'null'
                            description: Google 平均星级评分，1–5。
                          reviews:
                            anyOf:
                              - type: integer
                              - type: 'null'
                            description: 评分对应的 Google 评论数。
                          image_url:
                            anyOf:
                              - type: string
                              - type: 'null'
                        required:
                          - title
                          - url
                          - merchant_url
                          - google_product_id
                          - price_text
                          - seller
                          - rating
                          - reviews
                          - image_url
                        additionalProperties: false
                  required:
                    - items
                  additionalProperties: false
                - type: object
                  properties:
                    url:
                      type: string
                      description: 请求的 URL；数据提供商报告最终 URL 时，使用最终 URL。
                    final_url:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: 数据提供商报告的重定向后 URL，适用于 Firecrawl、Exa。未报告时为 null。
                    title:
                      anyOf:
                        - type: string
                        - type: 'null'
                    text:
                      anyOf:
                        - type: string
                        - type: 'null'
                    markdown:
                      anyOf:
                        - type: string
                        - type: 'null'
                    html:
                      anyOf:
                        - type: string
                        - type: 'null'
                    raw_html:
                      anyOf:
                        - type: string
                        - type: 'null'
                    text_character_limit:
                      anyOf:
                        - type: integer
                        - type: 'null'
                      description: >-
                        Glasser 要求数据提供商应用的文本字符上限，Exa 为
                        10000。文本长度恰好达到此值时可能已截断；未设上限时为 null。
                    cached:
                      anyOf:
                        - type: boolean
                        - type: 'null'
                      description: >-
                        数据提供商是否从缓存返回页面，取自 Firecrawl cacheState 或 Exa status
                        source。未说明时为 null。
                    fetched_at:
                      anyOf:
                        - type: string
                        - type: 'null'
                      description: >-
                        数据提供商抓取页面的时间，ISO 8601 UTC，取自 DataForSEO fetch_time。未报告时为
                        null。
                    quality:
                      type: string
                      enum:
                        - unverified
                      description: 已弃用：始终为 unverified，不执行内容检查。为兼容保留，将在下一次不兼容修订中移除。
                  required:
                    - url
                    - final_url
                    - title
                    - text
                    - markdown
                    - html
                    - raw_html
                    - text_character_limit
                    - cached
                    - fetched_at
                    - quality
                  additionalProperties: false
            - type: 'null'
        response_file:
          type: object
          properties:
            body_field:
              type: string
              enum:
                - output
                - provider_response.error
            state:
              type: string
              enum:
                - available
                - link_pending
                - expired
                - unavailable
            download_url:
              anyOf:
                - type: string
                - type: 'null'
            link_expires_at:
              anyOf:
                - type: string
                  description: ISO 8601 UTC 时间戳。
                  format: date-time
                - type: 'null'
            file_expires_at:
              type: string
              description: ISO 8601 UTC 时间戳。
              format: date-time
            bytes:
              type: integer
              minimum: 0
            sha256:
              type: string
            content_type:
              type: string
              enum:
                - application/json
          required:
            - body_field
            - state
            - download_url
            - link_expires_at
            - file_expires_at
            - bytes
            - sha256
            - content_type
          additionalProperties: false
          description: >-
            以 JSON 文件完整交付较大的 Provider 正文。Glasser 对接收的正文和序列化文件应用 32 MiB
            的运行时资源保护。body_field 指明被替代的字段；output 为 null，或省略
            provider_response.error。下载链接最多一小时后过期。在文件的 7 天可用期内，通过已认证的 Get Run
            刷新链接。读取和下载不会再次执行 Run 或重复收费。state 为 link_pending 时，读取同一 Run
            即可准备链接，不会再次执行或重复收费。链接授予临时读取权限，请仅与预期接收者分享。
        provider_response:
          anyOf:
            - type: object
              properties:
                http_status:
                  type: integer
                  minimum: 100
                  maximum: 599
                  description: 数据提供商返回的 HTTP 状态，即使 Run 为 COMPLETED 也应检查。
                error:
                  anyOf:
                    - {}
                    - type: 'null'
              required:
                - http_status
              additionalProperties: false
            - type: 'null'
          description: |-
            仅在 status 为 COMPLETED 时非 null。

            - 2xx 响应：output 为任意结构的数据提供商原生 JSON；正文为空时为 null。
            - 非 2xx 响应：error 包含数据提供商错误正文，output 为 null。

            两种正文均会移除敏感字段。
        charge_usd:
          anyOf:
            - type: string
              pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
              description: 精确的美元十进制字符串，小数位数为 2–6，采用唯一规范格式。求和时使用十进制运算或乘以 10^6 转为整数，不使用浮点数。
            - type: 'null'
          description: >-
            所列 Run 的历史费用总和，包括重放或读取的 Run。所有 Run 结算前为
            null。这不是当前请求的新增支出；request_charge 单独报告新增费用。失败也可能收费。
        charge_basis:
          anyOf:
            - type: object
              properties:
                clause:
                  type: string
                  enum:
                    - rule
                    - NO_RESULT
                    - PROVIDER_ERROR
                    - TIMED_OUT
                    - INTERNAL
                quantity:
                  anyOf:
                    - type: integer
                      minimum: 0
                    - type: 'null'
              required:
                - clause
                - quantity
              additionalProperties: false
            - type: 'null'
          description: 单个 Run 的计费依据；多个 Run 汇总时为 null。各项费用请查看 runs[].charge_basis。
        stoppable:
          type: boolean
          description: 当前是否可接受停止请求。不保证能在分派前停止 Run。
        stop_requested_at:
          anyOf:
            - type: string
              description: ISO 8601 UTC 时间戳。
              format: date-time
            - type: 'null'
          description: 请求停止的时间。如果已开始分派，Run 仍可能继续。
        created_at:
          type: string
          description: ISO 8601 UTC 时间戳。
          format: date-time
        started_at:
          anyOf:
            - type: string
              description: ISO 8601 UTC 时间戳。
              format: date-time
            - type: 'null'
        completed_at:
          anyOf:
            - type: string
              description: ISO 8601 UTC 时间戳。
              format: date-time
            - type: 'null'
        task_id:
          anyOf:
            - type: string
            - type: 'null'
        metadata:
          type: object
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 500
          maxProperties: 20
          propertyNames:
            type: string
            pattern: ^[a-z][a-z0-9_]{0,39}$
          description: |-
            已保存的追踪字段，可用于筛选 Run，不发送给数据提供商，不影响路由、价格或幂等。

            - 最多 20 个键：小写字母、数字和下划线，以字母开头，最长 40 个字符。
            - 值：长度为 1–500 的字符串。
            - user_id：终端用户的不透明 ID，不得使用邮箱或姓名。
        review_invitation:
          type: object
          properties:
            run_id:
              type: string
            ratings:
              type: array
              items:
                type: string
                enum:
                  - exceeds_expectations
                  - meets_expectations
                  - partially_meets_expectations
                  - does_not_meet_expectations
                  - unable_to_assess
            instruction:
              type: string
          required:
            - run_id
            - ratings
            - instruction
          additionalProperties: false
          description: >-
            每个 Run 至多出现一次，只在部分已完成 Run 的首次交付中出现。用完本次结果后，按 instruction
            提交评价，然后继续任务。可选；不影响 Run 及其费用。
        action:
          type: string
          enum:
            - search
            - product
            - keywords
            - keyword_volume
            - reviews
            - price_history
            - offers
            - merchant_search
            - merchant_page
        result_status:
          type: string
          enum:
            - success
            - no_result
            - error
            - pending
        error:
          anyOf:
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
              required:
                - code
                - message
              additionalProperties: false
            - type: 'null'
        runs:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              run_url:
                type: string
                description: 在控制台打开 Run，需要工作空间成员权限。
              provider:
                type: string
                pattern: ^[a-z0-9][a-z0-9-]*$
              endpoint:
                type: string
                pattern: ^\/.+$
              endpoint_version:
                type: integer
                exclusiveMinimum: 0
              status:
                type: string
                enum:
                  - QUEUED
                  - RUNNING
                  - COMPLETED
                  - FAILED
                  - STOPPED
                description: >-
                  QUEUED 或 RUNNING 表示仍在执行。COMPLETED 表示已有数据提供商响应，包括非 2xx
                  响应。FAILED 请读取 failure。STOPPED 表示分派前停止。charge_usd 与状态分别检查。
              failure:
                anyOf:
                  - type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - TIMED_OUT
                          - INTERNAL
                      message:
                        type: string
                    required:
                      - kind
                      - message
                    additionalProperties: false
                  - type: 'null'
                description: Run 失败原因，仅在 status 为 FAILED 时非 null。
              input:
                type: object
                properties:
                  omitted:
                    type: boolean
                    enum:
                      - true
                required:
                  - omitted
                additionalProperties: false
              output:
                type: object
                properties:
                  omitted:
                    type: boolean
                    enum:
                      - true
                required:
                  - omitted
                additionalProperties: false
              response_file:
                type: object
                properties:
                  body_field:
                    type: string
                    enum:
                      - output
                      - provider_response.error
                  state:
                    type: string
                    enum:
                      - available
                      - link_pending
                      - expired
                      - unavailable
                  download_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                  link_expires_at:
                    anyOf:
                      - type: string
                        description: ISO 8601 UTC 时间戳。
                        format: date-time
                      - type: 'null'
                  file_expires_at:
                    type: string
                    description: ISO 8601 UTC 时间戳。
                    format: date-time
                  bytes:
                    type: integer
                    minimum: 0
                  sha256:
                    type: string
                  content_type:
                    type: string
                    enum:
                      - application/json
                required:
                  - body_field
                  - state
                  - download_url
                  - link_expires_at
                  - file_expires_at
                  - bytes
                  - sha256
                  - content_type
                additionalProperties: false
                description: >-
                  以 JSON 文件完整交付较大的 Provider 正文。Glasser 对接收的正文和序列化文件应用 32 MiB
                  的运行时资源保护。body_field 指明被替代的字段；output 为 null，或省略
                  provider_response.error。下载链接最多一小时后过期。在文件的 7 天可用期内，通过已认证的 Get
                  Run 刷新链接。读取和下载不会再次执行 Run 或重复收费。state 为 link_pending 时，读取同一 Run
                  即可准备链接，不会再次执行或重复收费。链接授予临时读取权限，请仅与预期接收者分享。
              provider_response:
                anyOf:
                  - type: object
                    properties:
                      http_status:
                        type: integer
                        minimum: 100
                        maximum: 599
                        description: 数据提供商返回的 HTTP 状态，即使 Run 为 COMPLETED 也应检查。
                    required:
                      - http_status
                    additionalProperties: false
                  - type: 'null'
              charge_usd:
                anyOf:
                  - type: string
                    pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                    description: >-
                      精确的美元十进制字符串，小数位数为 2–6，采用唯一规范格式。求和时使用十进制运算或乘以 10^6
                      转为整数，不使用浮点数。
                  - type: 'null'
                description: >-
                  最终费用，精确的美元十进制字符串。QUEUED 或 RUNNING 时为 null。FAILED 状态的 Run
                  仍可能按接口定价产生非零费用。
              charge_basis:
                anyOf:
                  - type: object
                    properties:
                      clause:
                        type: string
                        enum:
                          - rule
                          - NO_RESULT
                          - PROVIDER_ERROR
                          - TIMED_OUT
                          - INTERNAL
                      quantity:
                        anyOf:
                          - type: integer
                            minimum: 0
                          - type: 'null'
                    required:
                      - clause
                      - quantity
                    additionalProperties: false
                  - type: 'null'
                description: 计算费用所用的价格条款。结算前或未尝试调用数据提供商时为 null。
              stoppable:
                type: boolean
                description: 当前是否可接受停止请求。不保证能在分派前停止 Run。
              stop_requested_at:
                anyOf:
                  - type: string
                    description: ISO 8601 UTC 时间戳。
                    format: date-time
                  - type: 'null'
                description: 请求停止的时间。如果已开始分派，Run 仍可能继续。
              created_at:
                type: string
                description: ISO 8601 UTC 时间戳。
                format: date-time
              started_at:
                anyOf:
                  - type: string
                    description: ISO 8601 UTC 时间戳。
                    format: date-time
                  - type: 'null'
              completed_at:
                anyOf:
                  - type: string
                    description: ISO 8601 UTC 时间戳。
                    format: date-time
                  - type: 'null'
              task_id:
                anyOf:
                  - type: string
                  - type: 'null'
              metadata:
                type: object
                additionalProperties:
                  type: string
                  minLength: 1
                  maxLength: 500
                maxProperties: 20
                propertyNames:
                  type: string
                  pattern: ^[a-z][a-z0-9_]{0,39}$
                description: |-
                  已保存的追踪字段，可用于筛选 Run，不发送给数据提供商，不影响路由、价格或幂等。

                  - 最多 20 个键：小写字母、数字和下划线，以字母开头，最长 40 个字符。
                  - 值：长度为 1–500 的字符串。
                  - user_id：终端用户的不透明 ID，不得使用邮箱或姓名。
            required:
              - id
              - run_url
              - provider
              - endpoint
              - endpoint_version
              - status
              - failure
              - input
              - output
              - provider_response
              - charge_usd
              - charge_basis
              - stoppable
              - stop_requested_at
              - created_at
              - started_at
              - completed_at
              - task_id
              - metadata
            additionalProperties: false
        request_charge:
          type: object
          properties:
            charge_usd:
              anyOf:
                - type: string
                  pattern: ^(0|[1-9]\d*)\.(\d{2}|\d{2}\d{0,3}[1-9])$
                  description: >-
                    精确的美元十进制字符串，小数位数为 2–6，采用唯一规范格式。求和时使用十进制运算或乘以 10^6
                    转为整数，不使用浮点数。
                - type: 'null'
              description: >-
                仅计算当前请求新建 Run 的费用。重放 Run 与免费读取不增加费用。新建 Run 未结算或受理来源未知时为 null。这不是
                charge_usd 或 runs[].charge_usd 中的历史总费用。
            created_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
            replayed_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
            unknown_run_ids:
              type: array
              items:
                type: string
                pattern: >-
                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$
                format: uuid
          required:
            - charge_usd
            - created_run_ids
            - replayed_run_ids
            - unknown_run_ids
          additionalProperties: false
          description: >-
            当前请求的受理与费用证据。在同一件用户工作中保存 created_run_ids，每个已结算 Run 只计一次费用。更换 task_id
            不会把幂等重放变成新 Run。读取结果的费用为零，受理列表为空。
        result_url:
          type: string
          description: >-
            通过认证读取规范化结果和总费用的只读 URL 路径，配合 API 服务地址使用。不创建 Run，也不恢复切换。GET
            /v1/runs/:id 仍返回原生单个 Run。
      required:
        - id
        - run_url
        - provider
        - endpoint
        - endpoint_version
        - status
        - failure
        - input
        - output
        - provider_response
        - charge_usd
        - charge_basis
        - stoppable
        - stop_requested_at
        - created_at
        - started_at
        - completed_at
        - task_id
        - metadata
        - action
        - result_status
        - error
        - runs
        - result_url
      additionalProperties: false
    ValidationFailedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_failed
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    IdempotencyKeyRequiredEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - idempotency_key_required
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    UnauthorizedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - unauthorized
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    InsufficientBalanceEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - insufficient_balance
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    EndpointNotPermittedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - endpoint_not_permitted
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    ForbiddenEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    IdempotencyConflictEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - idempotency_conflict
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    RateLimitedEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - rate_limited
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
    ServiceUnavailableEncoded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - service_unavailable
            message:
              type: string
            reason:
              anyOf:
                - type: string
                - type: 'null'
            control:
              anyOf:
                - type: string
                - type: 'null'
            retry_after_ms:
              anyOf:
                - anyOf:
                    - type: integer
                    - type: 'null'
                - type: 'null'
            details:
              anyOf:
                - type: object
                - type: 'null'
          required:
            - code
            - message
          additionalProperties: false
        request_id:
          type: string
      required:
        - error
        - request_id
      additionalProperties: false
  securitySchemes:
    bearer:
      type: http
      scheme: Bearer

````

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