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

> 网页抓取 API Amazon Sellers 模板

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

`amazon_sellers` 模板用于获取 Amazon Sellers 页面。

<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 Pricing 模板可用的请求参数：

| 参数            | 类型      | 必需 | 描述                                                                                                                                                                                                                                     |
| ------------- | ------- | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `target`      | string  | ✅  | 目标类型必须设置为 `amazon_sellers`。                                                                                                                                                                                                            |
| `query`       | string  | ✅  | 14 字符的 Amazon Seller ID 代码。                                                                                                                                                                                                            |
| `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)                                                                                                                                                     |
| `locale`      | string  |    | 设置该值以更改您的 Amazon 网页界面语言。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-amazon-locale-deprecated)                                                                                                                         |
| `device_type` | string  |    | 指定设备类型和浏览器。[**了解更多。**](https://help.decodo.com/docs/cn/web-scraping-api-device-types-deprecated)                                                                                                                                       |
| `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_sellers",
        "query": "A1R0Z7FJGTKESH",
        "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_sellers",
        "query": "A1R0Z7FJGTKESH",
        "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_sellers",
        "query": "A1R0Z7FJGTKESH",
        "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` 部分中字段的描述。请注意，字段数量可能会根据提供的搜索查询而有所不同。

| Results 键          | 描述                                |
| ------------------ | --------------------------------- |
| `url`              | Amazon Seller 页面的 URL。            |
| `query`            | 请求中使用的 14 字符 Amazon Seller ID 代码。 |
| `page_type`        | Amazon 页面的类型。                     |
| `description`      | 卖家的描述。                            |
| `seller_name`      | 卖家的名称。                            |
| `business_name`    | 企业名称。                             |
| `business_address` | 企业地址。                             |
| `rating`           | 卖家的评分。                            |

#### 响应示例

<CodeGroup>
  ```python JSON expandable theme={null}
  {
      "results": {
          "url": "https://www.amazon.com/sp?seller=A1R0Z7FJGTKESH&language=en_US",
          "query": "A1R0Z7FJGTKESH",
          "page_type": "Seller",
          "description": "A1R0Z7FJGTKESH is committed to providing each customer with the highest standard of customer service.",
          "seller_name": "A1R0Z7FJGTKESH",
          "business_name": "A1R0Z7FJGTKESH",
          "business_address": "Söderbyvägen 13 ARLANDASTAD Sweden 19560 SE",
          "parse_status_code": 12000
      },
      "errors": [],
      "status_code": 12000,
      "task_id": "7396916579893523457"
  }
  ```
</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>
