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

# Amazon 爬虫快速入门

> 设置 Bright Data Amazon 爬虫 API 并在 5 分钟内收集您的第一批产品数据。

本教程展示了如何使用 Bright Data Amazon Scraper API 抓取 Amazon 产品并获取结构化 JSON 数据。

## 前置条件

* 一个 [Bright Data 账户](https://www.bright.cn/cp/start)（每月含 5,000 个免费积分）
* 已安装 cURL、Python 3 或 Node.js 18+

<Steps>
  <Step title="获取您的 API 密钥">
    转到您 Bright Data 账户中的[用户设置页面](https://www.bright.cn/cp/setting/users)并复制您的 API 密钥。

    如果您还没有账户，请[在 brightdata.com 注册](https://www.bright.cn/cp/start)。新账户每月可获得 5,000 个免费积分，无需信用卡。请参阅[免费套餐](/cn/general/account/billing-and-pricing/free-tier)。

    <Warning>
      您的 API 密钥仅在创建时显示一次。请安全地复制并存储它。
    </Warning>
  </Step>

  <Step title="发送请求">
    我们将使用**产品端点**发送同步请求。将 `YOUR_API_KEY` 替换为您的实际密钥：

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST \
        "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l7q7dkf244hwjntr0&format=json" \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '[{"url": "https://www.amazon.com/dp/B0FQFB8FMG"}]'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.brightdata.com/datasets/v3/scrape",
          params={"dataset_id": "gd_l7q7dkf244hwjntr0", "format": "json"},
          headers={
              "Authorization": "Bearer YOUR_API_KEY",
              "Content-Type": "application/json",
          },
          json=[{"url": "https://www.amazon.com/dp/B0FQFB8FMG"}],
      )

      print(response.json())
      ```

      ```javascript Node.js theme={null}
      const response = await fetch(
        "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l7q7dkf244hwjntr0&format=json",
        {
          method: "POST",
          headers: {
            "Authorization": "Bearer YOUR_API_KEY",
            "Content-Type": "application/json",
          },
          body: JSON.stringify([
            { url: "https://www.amazon.com/dp/B0FQFB8FMG" }
          ]),
        }
      );

      const data = await response.json();
      console.log(data);
      ```
    </CodeGroup>

    您应该会看到 `200` 状态码。这需要 10-30 秒。
  </Step>

  <Step title="查看响应">
    Bright Data Amazon Scraper API 返回一个包含结构化产品数据的 JSON 数组：

    ```json theme={null}
    [
      {
        "title": "Apple AirPods Pro 3 Wireless Earbuds with Active Noise Cancellation",
        "asin": "B0FQFB8FMG",
        "brand": "Apple",
        "initial_price": 249,
        "final_price": 199.99,
        "currency": "USD",
        "rating": 4.4,
        "reviews_count": 14302,
        "seller_name": "Amazon.com",
        "availability": "In Stock",
        "image_url": "https://m.media-amazon.com/images/I/61solmQSSlL._AC_SL1500_.jpg",
        "url": "https://www.amazon.com/dp/B0FQFB8FMG"
      }
    ]
    ```

    每个产品对象包含涵盖定价、评分、卖家信息等的字段。请查看[完整响应架构](/api-reference/scrapers/e-commerce-apis/amazon-products-collect-by-url)。
  </Step>
</Steps>

您已成功使用 Bright Data Amazon Scraper API 抓取了第一个 Amazon 产品。

## 常见问题

<Accordion title="我可以在一个请求中抓取多个产品吗？">
  可以。将更多对象添加到输入数组中。同步请求支持最多 20 个 URL。对于较大的批次，请使用[异步 `/trigger` 端点](/products/scrapers/scrapers-library/async-requests)。

  ```json theme={null}
  [
    {"url": "https://www.amazon.com/dp/B0FQFB8FMG"},
    {"url": "https://www.amazon.com/dp/B09V3KXJPB"},
    {"url": "https://www.amazon.com/dp/B0BDJ279KF"}
  ]
  ```
</Accordion>

<Accordion title="收到 401 或 403 错误？">
  验证您的 API 密钥是否正确且未过期。从[账户设置](https://www.bright.cn/cp/setting/users)生成新密钥。有关详细信息，请参阅[身份验证指南](/api-reference/authentication)。
</Accordion>

<Accordion title="请求超时？">
  同步请求有 1 分钟的超时限制。如果请求超过此限制，它会自动切换到异步并返回一个 `snapshot_id`。对于大批次，请使用[异步工作流](/products/scrapers/scrapers-library/async-requests)。
</Accordion>

<Accordion title="响应数据为空或不完整？">
  验证 Amazon 产品 URL 是否可公开访问且格式正确。URL 应遵循 `https://www.amazon.com/dp/{ASIN}` 的格式。
</Accordion>

## 后续步骤

<CardGroup cols={3}>
  <Card title="发送您的第一个请求" icon="bolt" href="/products/scrapers/amazon/send-first-request">
    探索所有五种端点类型及完整示例。
  </Card>

  <Card title="异步批量请求" icon="layer-group" href="/products/scrapers/scrapers-library/async-requests">
    在单个批处理作业中抓取数百个 URL。
  </Card>

  <Card title="设置 webhooks" icon="webhook" href="/products/scrapers/scrapers-library/data-delivery">
    抓取完成时自动接收结果。
  </Card>
</CardGroup>
