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

# Amazon 定价

> 网页抓取 API Amazon 定价模板

<Danger>
  核心版和高级版套餐已停止销售。请考虑迁移到一体化网络爬虫 API；[请点击此处查看指南](https://help.decodo.com/docs/cn/web-scraping-api-migration-guide).
</Danger>

`amazon_pricing` 模板用于获取 Amazon 产品报价列表。

<Note>
  ### 有用链接

  * 此目标适用于 **Web API Advanced 计划**。
  * 此模板支持[**实时**](https://help.decodo.com/docs/cn/web-scraping-api-real-time-requests)和[**异步**](https://help.decodo.com/docs/cn/web-scraping-api-asynchronous-requests)集成方法。
  * 还支持[**批量**](https://help.decodo.com/docs/cn/web-scraping-api-asynchronous-requests#queue-multiple-tasks)请求。
</Note>

## 输入参数

Amazon 定价目标可用的请求参数：

| 参数            | 类型      | 必需 | 描述                                                                                                                                                                                                                                     |
| ------------- | ------- | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`      | string  | ✅  | 目标类型必须设置为 `amazon_pricing`。                                                                                                                                                                                                            |
| `query`       | string  | ✅  | 10 位字符的 Amazon 产品 ASIN 代码。                                                                                                                                                                                                             |
| `headless`    | string  |    | `html` 值启用 JavaScript 渲染。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-javascript-rendering-deprecated)<br />`png` 值启用截图响应。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-screenshot-response-deprecated) |
| `parse`       | boolean |    | 设置为 `true` 时自动解析结果。<br />默认值为 `false`。                                                                                                                                                                                                 |
| `geo`         | string  |    | 设置提交查询时使用的配送位置。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-amazon-geo-parameter-deprecated)                                                                                                                           |
| `domain`      | string  |    | 指定顶级域名。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-amazon-locale-deprecated)                                                                                                                                          |
| `locale`      | string  |    | 设置该值以更改您的 Amazon 网页界面语言。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-amazon-locale-deprecated)                                                                                                                         |
| `currency`    | string  |    | 设置货币。[**了解更多**](https://help.decodo.com/docs/cn/web-scraping-api-amazon-currency-deprecated)                                                                                                                                           |
| `device_type` | string  |    | 指定设备类型和浏览器。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-device-types-deprecated)                                                                                                                                       |
| `page_from`   | string  |    | 自定义起始页码。默认值为 `1`。                                                                                                                                                                                                                      |
| `xhr`         | boolean |    | 设置为 `true` 以检索 XHR 和 fetch 请求列表。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-fetch-and-xhr-deprecated)<br />默认值为 `false`。                                                                                              |
| `markdown`    | boolean |    | 设置为 `true` 以接收 Markdown 响应。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-markdown-response-deprecated)<br />默认值为 `false`。                                                                                               |

### 请求示例

<CodeGroup>
  ```shellscript cURL theme={null}
  # 将 'TOKEN VALUE' 更新为您的授权令牌
  curl --request 'POST' \
          --url 'https://scraper-api.decodo.com/v2/scrape' \
          --header 'Accept: application/json' \
          --header 'Authorization: Basic TOKEN VALUE' \
          --header 'Content-Type: application/json' \
          --data '
      {
        "target": "amazon_pricing",
        "query": "B0BS1QCFHX",
        "page_from": "1",
        "parse": true
      }
  '
  ```

  ```javascript Node theme={null}

  const scrape = async() => {
    const response = await fetch("https://scraper-api.decodo.com/v2/scrape", {
      method: "POST",
      body: JSON.stringify({
        "target": "amazon_pricing",
        "query": "B0BS1QCFHX",
        "page_from": "1",
        "parse": true
      }),
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Basic TOKEN VALUE" // 更新为您的授权令牌
      },
    }).catch(error => console.log(error));

    console.log(await response.json())
  }

  scrape()
  ```

  ```python Python theme={null}
  import requests
    
  url = "https://scraper-api.decodo.com/v2/scrape"
    
  payload = {
        "target": "amazon_pricing",
        "query": "B0BS1QCFHX",
        "page_from": "1",
        "parse": True
  }
    
  headers = {
      "accept": "application/json",
      "content-type": "application/json",
      "authorization": "Basic TOKEN VALUE" # 更新为您的授权令牌
  }
    
  response = requests.post(url, json=payload, headers=headers)
    
  print(response.text)
  ```
</CodeGroup>

## 输出

下表提供了已解析的 `JSON` `results` 部分中字段的描述。请注意，字段数量可能会根据提供的搜索查询而有所不同。

| 结果键            | 描述                               |
| -------------- | -------------------------------- |
| `url`          | Amazon 产品页面的 URL。                |
| `asin`         | Amazon 产品的唯一标识符，称为 Amazon 标准识别号。 |
| `page`         | 页码。                              |
| `title`        | 产品标题。                            |
| `pricing`      | 定价信息数组。                          |
| `asin_in_url`  | 产品 URL 中的 Amazon 标准识别号 (ASIN)。   |
| `review_count` | 产品的评论总数。                         |

#### 响应示例

<CodeGroup>
  ```json JSON expandable theme={null}
  {
      "results": {
          "url": "https://www.amazon.com/gp/product/ajax/aodAjaxMain/ref=dp_aod_unknown_mbc?asin=B0BS1QCFHX&pageno=1&language=en_US",
          "asin": "B0BS1QCFHX",
          "page": 1,
          "title": "Sony WH-CH720N Noise Canceling Wireless Headphones Bluetooth Over The Ear Headset with Microphone and Alexa Built-in, Black New",
          "pricing": [
              {
                  "price": 98,
                  "seller": "Adorama",
                  "currency": "USD",
                  "delivery": "Ships from Adorama",
                  "condition": "New",
                  "seller_id": "A17MC6HOH9AVE6",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A17MC6HOH9AVE6&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_0",
                  "rating_count": 581574,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Tomorrow, November 20"
                          },
                          "type": "FREE delivery"
                      }
                  ],
                  "price_with_prime": 90
              },
              {
                  "price": 74.14,
                  "seller": "Amazon Resale",
                  "currency": "USD",
                  "delivery": "Ships from Amazon.com",
                  "condition": "Used - Good",
                  "seller_id": "",
                  "seller_link": "https://www.amazon.com/Warehouse-Deals/b?ie=UTF8&node=10158976011",
                  "rating_count": 0,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Monday, November 24"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "Friday, November 21"
                          },
                          "type": "Prime members FREE delivery"
                      }
                  ]
              },
              {
                  "price": 75,
                  "seller": "Beach Camera Same Day Shipping",
                  "currency": "USD",
                  "delivery": "Ships from Beach Camera Same Day Shipping",
                  "condition": "Used - Like New",
                  "seller_id": "A13BNE3P7C8THK",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A13BNE3P7C8THK&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_2",
                  "rating_count": 356045,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Friday, November 21"
                          },
                          "type": "FREE delivery"
                      }
                  ]
              },
              {
                  "price": 89.99,
                  "seller": "MeimeiGo",
                  "currency": "USD",
                  "delivery": "Ships from MeimeiGo",
                  "condition": "Used - Like New",
                  "seller_id": "A24H8QAZNNLWWM",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A24H8QAZNNLWWM&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_3",
                  "rating_count": 261,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Wednesday, November 26"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "Tomorrow, November 20"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95,
                  "seller": "JZXN Tech",
                  "currency": "USD",
                  "delivery": "Ships from JZXN Tech",
                  "condition": "Used - Like New",
                  "seller_id": "A3JWQJ9F8N82T1",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A3JWQJ9F8N82T1&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_4",
                  "rating_count": 53,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "November 24 - 26"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "Friday, November 21"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95,
                  "seller": "NewConcept1",
                  "currency": "USD",
                  "delivery": "Ships from NewConcept1",
                  "condition": "Used - Like New",
                  "seller_id": "AGHAKUO0VEBNZ",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=AGHAKUO0VEBNZ&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_5",
                  "rating_count": 8,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Friday, November 28"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "Friday, November 21"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95.23,
                  "seller": "NAMA Technology LLC",
                  "currency": "USD",
                  "delivery": "Ships from NAMA Technology LLC",
                  "condition": "Used - Like New",
                  "seller_id": "AQH6BLIXB790D",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=AQH6BLIXB790D&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_6",
                  "rating_count": 41,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "November 24 - 26"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "November 20 - 24"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95.23,
                  "seller": "True Mart LLC",
                  "currency": "USD",
                  "delivery": "Ships from True Mart LLC",
                  "condition": "Used - Like New",
                  "seller_id": "A38NQ511PUC45R",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A38NQ511PUC45R&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_7",
                  "rating_count": 322,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "November 25 - 28"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "November 21 - 25"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95.23,
                  "seller": "Blue Sky Distribution",
                  "currency": "USD",
                  "delivery": "Ships from Blue Sky Distribution",
                  "condition": "Used - Like New",
                  "seller_id": "A3157HR2I6E5II",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A3157HR2I6E5II&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_8",
                  "rating_count": 81,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "November 25 - 28"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "November 24 - 25"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 95.23,
                  "seller": "SmartShopper LLC",
                  "currency": "USD",
                  "delivery": "Ships from SmartShopper LLC",
                  "condition": "Used - Like New",
                  "seller_id": "AJ98EZ5BUNORU",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=AJ98EZ5BUNORU&isAmazonFulfilled=0&asin=B0BS1QCFHX&ref_=olp_merch_name_9",
                  "rating_count": 113,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "November 25 - 28"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "November 21 - 25"
                          },
                          "type": "fastest delivery"
                      }
                  ]
              },
              {
                  "price": 0,
                  "seller": "Video & Audio Center - Same Day Shipping",
                  "currency": "USD",
                  "delivery": "Ships from Amazon.com",
                  "condition": "New",
                  "seller_id": "A13ACIRM091OJE",
                  "seller_link": "/gp/aag/main?ie=UTF8&seller=A13ACIRM091OJE&isAmazonFulfilled=1&asin=B0BS1QCFHX&ref_=olp_merch_name_10",
                  "rating_count": 67096,
                  "price_shipping": 0,
                  "delivery_options": [
                      {
                          "date": {
                              "by": "Tuesday, November 25"
                          },
                          "type": "FREE delivery"
                      },
                      {
                          "date": {
                              "by": "Saturday, November 22"
                          },
                          "type": "Prime members FREE delivery"
                      }
                  ]
              }
          ],
          "_warnings": [
              "Could not parse rating count.",
              "Could not parse pricing price."
          ],
          "asin_in_url": "B0BS1QCFHX",
          "review_count": 12983,
          "parse_status_code": 12000
      },
      "errors": [],
      "status_code": 12000,
      "task_id": "7396912499506832385"
  }
  ```
</CodeGroup>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
