> ## 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.

# 设置 Amazon 产品任务

> 此端点根据指定的关键词（产品名称）、位置和语言参数返回 Amazon 产品列表结果。



## OpenAPI

````yaml openapi/zh/dataforseo.json POST /dataforseo/merchant/amazon/products/task_post
openapi: 3.0.3
info:
  title: DataForSEO API
  version: 1.0.0
  description: 通过 AIsa 统一网关提供的 DataForSEO API 端点。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - BearerAuth: []
paths:
  /dataforseo/merchant/amazon/products/task_post:
    post:
      summary: 设置 Amazon 产品任务
      description: 此端点根据指定的关键词（产品名称）、位置和语言参数返回 Amazon 产品列表结果。
      operationId: post_dataforseo_merchant_amazon_products_task_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keyword:
                  type: string
                  description: >-
                    关键词，必填字段。此字段最多可指定 700 个字符。所有 %##
                    均会被解码（加号字符“+”将被解码为空格字符）。如果关键词中需要使用“%”字符，请将其指定为“%25”；有关
                    DataForSEO API 中 keyword 和 keywords 字段的规则与限制，请参阅此帮助中心文章。
                url:
                  type: string
                  description: >-
                    搜索查询的直接 URL，可选字段。您可以指定直接 URL，我们会将其解析为所需字段。请注意，此方法对我们的 API
                    而言处理难度最高，并且还要求您在 URL
                    中指定确切的语言和位置。在大多数情况下，我们不建议使用此方法。示例：https://www.amazon.com/s/?field-keywords=shoes&language=en_US
                priority:
                  type: integer
                  description: >-
                    任务优先级，可选字段，可采用以下值：1 – 普通执行优先级（默认设置）；2 –
                    高执行优先级。高执行优先级任务将收取额外费用。费用可在定价页面计算。
                location_name:
                  type: string
                  description: >-
                    搜索引擎位置的完整名称。如果未指定 location_code 或
                    location_coordinate，则为必填字段。如果使用此字段，则无需指定 location_code 或
                    location_coordinate。您可以通过向
                    https://api.dataforseo.com/v3/merchant/amazon/locations
                    单独发起请求，获取包含 location_name 参数的可用位置列表。示例：HA1,England,United
                    Kingdom
                location_code:
                  type: integer
                  description: >-
                    搜索引擎位置代码；如果未指定 location_name 或
                    location_coordinate，则为必填字段。如果使用此字段，则无需指定 location_name 或
                    location_coordinate。您可以向
                    https://api.dataforseo.com/v3/merchant/amazon/locations
                    单独发出请求，以获取可用位置及其 location_code 参数列表；示例：9045969
                location_coordinate:
                  type: string
                  description: >-
                    位置的 GPS 坐标。如果未指定 location_name 或
                    location_code，则此字段为必填字段。如果使用此字段，则无需指定 location_name 或
                    location_code。location_coordinate
                    参数应采用“latitude,longitude,radius”格式。“latitude”和“longitude”的最大小数位数：7；“radius”的最小值：199.9。示例：53.476225,-2.243572,200
                language_name:
                  type: string
                  description: >-
                    搜索引擎语言的完整名称。如果未指定 language_code，则为必填字段；如果使用此字段，则无需指定
                    language_code。您可以通过向
                    https://api.dataforseo.com/v3/merchant/amazon/languages
                    单独发出请求，获取包含 language_name 参数的可用语言列表。示例：English (United
                    Kingdom)
                language_code:
                  type: string
                  description: >-
                    搜索引擎语言代码；如果未指定 language_name，则此字段为必填项。如果使用此字段，则无需指定
                    language_name。你可以通过向
                    https://api.dataforseo.com/v3/merchant/amazon/languages
                    单独发起请求，获取带有 language_code 参数的可用语言列表。示例：en_GB
                se_domain:
                  type: string
                  description: >-
                    搜索引擎域名，可选字段；我们会根据您指定的位置和语言自动选择相关的搜索引擎域名，但您也可以在此字段中设置自定义搜索引擎域名；示例：amazon.com、amazon.co.uk、amazon.fr
                    等。
                depth:
                  type: integer
                  description: >-
                    解析深度，可选字段；要从 Amazon 结果页面检索的结果数量；默认值：100；最大值：700；每个最多包含 100
                    条结果的 SERP 都会计费；如果搜索引擎返回超过 100 条结果，将 depth 设置为高于 100
                    可能会产生额外费用；费用可在 Pricing 页面计算。
                max_crawl_pages:
                  type: integer
                  description: >-
                    页面抓取上限，可选字段。要抓取的搜索结果页面数，最大值：7。注意：max_crawl_pages 和 depth
                    参数相互补充；如需详细了解，请访问我们的帮助中心
                department:
                  type: string
                  description: >-
                    Amazon 商品部门。可选字段。指定以下 Amazon 部门之一以提取商品列表："Arts &
                    Crafts"、"Automotive"、"Baby"、"Beauty & Personal
                    Care"、"Books"、"Computers"、"Digital
                    Music"、"Electronics"、"Kindle Store"、"Prime Video"、"Women's
                    Fashion"、"Men's Fashion"、"Girls' Fashion"、"Boys'
                    Fashion"、"Deals"、"Health & Household"、"Home &
                    Kitchen"、"Industrial & Scientific"、"Luggage"、"Movies &
                    TV"、"Music, CDs & Vinyl"、"Pet Supplies"、"Software"、"Sports &
                    Outdoors"、"Tools & Home Improvement"、"Toys & Games"、"Video
                    Games"
                search_param:
                  type: string
                  description: >-
                    搜索查询的附加参数，可选字段；您可以使用以下 Amazon 搜索 URL
                    参数自定义搜索；示例：&low-price=52 – 搜索价格高于 52 USD 的产品；&high-price=45
                    – 搜索价格低于 45 USD 的产品；&sort=relevancerank –
                    按相关性对结果排序；&sort=featured-rank –
                    按精选产品排序结果；&sort=price-asc-rank –
                    按价格升序排序；&sort=price-desc-rank – 按价格降序排序；&sort=review-rank –
                    按客户平均评价值排序；&sort=date-desc-rank –
                    按最新上架时间排序；请注意，如果使用以下任一参数，search_param
                    值将被忽略：price_min、price_max、sort_by
                price_min:
                  type: integer
                  description: >-
                    最低商品价格，可选字段；针对指定查询返回的 Amazon 商品最低标价；示例：5；注意：如果指定
                    price_min，search_param 参数将被忽略
                price_max:
                  type: integer
                  description: >-
                    最高产品价格。可选字段，指定查询在 Amazon 上返回的产品列表中的最高价格。示例：100。注意：如果指定
                    price_max，search_param 参数将被忽略
                sort_by:
                  type: string
                  description: >-
                    结果排序规则 可选字段
                    支持以下排序规则：relevance、price_low_to_high、price_high_to_low、featured、avg_customer_review、newest_arrival
                    示例：sort_by:"relevance" 注意：如果指定 sort_by，search_param 参数将被忽略
                tag:
                  type: string
                  description: >-
                    用户定义的任务标识符。可选字段。字符数限制为 255。您可以使用此参数标识任务并将其与结果匹配；您将在响应的 data
                    对象中找到指定的 tag 值
                postback_url:
                  type: string
                  description: >-
                    用于发送任务结果的 URL，可选字段；任务完成后，我们会向指定的 postback_url 发送 POST
                    请求，其结果采用 gzip 格式压缩；可以使用字符串 ‘$id’ 作为 $id 变量，并使用 ‘$tag’ 作为经过
                    URL 编码的 $tag
                    变量。我们会在发送请求前设置必要的值。示例：http://your-server.com/postbackscript?id=$id
                    http://your-server.com/postbackscript?id=$id&tag=$tag
                    注意：postback_url 中的特殊字符将经过 URL 编码；例如，# 字符将被编码为
                    %23；有关更多信息，请参阅我们的帮助中心
                postback_data:
                  type: string
                  description: >-
                    postback_url 数据类型；如果指定
                    postback_url，则为必填字段；对应将发送到您服务器的数据类型；可选值：advanced、html
                pingback_url:
                  type: string
                  description: >-
                    已完成任务的通知 URL。可选字段。任务完成后，我们将通过向您指定的 URL 发送 GET
                    请求来通知您。您可以使用字符串 ‘$id’ 作为 $id 变量，并使用 ‘$tag’ 作为经过 urlencoded
                    编码的 $tag
                    变量。我们会在发送请求前设置必要的值。示例：http://your-server.com/pingscript?id=$id
                    http://your-server.com/pingscript?id=$id&tag=$tag
                    注意：pingback_url 中的特殊字符将经过 urlencoded 编码；例如，# 字符将被编码为
                    %23。请在我们的帮助中心了解更多信息
              required:
                - keyword
                - location_name
                - location_code
                - location_coordinate
                - language_name
                - language_code
                - postback_data
      responses:
        '200':
          description: 成功响应
          content:
            application/json:
              schema:
                type: object
                properties:
                  version:
                    type: string
                    description: API 的当前版本
                  status_code:
                    type: integer
                    description: 通用状态码；您可以在此处查看完整的响应码列表。注意：我们强烈建议设计必要的系统来处理相关异常或错误情况
                  status_message:
                    type: string
                    description: 常规信息消息；可在此处查看常规信息消息的完整列表
                  time:
                    type: string
                    description: 执行时间（秒）
                  cost:
                    type: number
                    description: 任务总成本（美元）
                  tasks_count:
                    type: integer
                    description: tasksarray 中的任务数量
                  tasks_error:
                    type: integer
                    description: 返回错误的 tasks 数组中的任务数量
                  tasks:
                    type: array
                    items:
                      type: string
                    description: 任务数组
                  tasks.id:
                    type: string
                    description: 系统中采用通用唯一标识符（UUID）格式的唯一任务标识符
                  tasks.status_code:
                    type: integer
                    description: DataForSEO 生成的任务状态码；范围可以是 10000-60000
                  tasks.status_message:
                    type: string
                    description: 任务的信息性消息
                  tasks.time:
                    type: string
                    description: 执行时间（秒）
                  tasks.cost:
                    type: number
                    description: 任务成本（美元）
                  tasks.result_count:
                    type: integer
                    description: 结果数组中的元素数量
                  tasks.path:
                    type: array
                    items:
                      type: string
                    description: URL 路径
                  tasks.data:
                    type: object
                    description: 包含 POST 请求中指定的参数
                  tasks.result:
                    type: array
                    items:
                      type: string
                    description: 结果数组；在此情况下，该值将为 null
        '400':
          description: 错误请求
        '401':
          description: 未授权
        '429':
          description: 超出速率限制
        '500':
          description: 内部服务器错误
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````