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

# 按畅销榜 URL 发现 Amazon 产品

> 使用 Bright Data Scraper API 从畅销榜页面 URL 发现 Amazon 产品。发送 POST /datasets/v3/scrape 请求，dataset_id 为 gd_l7q7dkf244hwjntr0。

## 查询参数

<ParamField query="dataset_id" type="string" default="gd_l7q7dkf244hwjntr0" required>
  用于此请求的数据集 ID。

  <Warning>
    必须设置为 `gd_l7q7dkf244hwjntr0` 以收集 **按最畅销商品 URL 发现** 数据。
  </Warning>
</ParamField>

<ParamField query="type" type="string" default="discover_new">
  必须设置为 `discover_new`。
</ParamField>

<ParamField query="discover_by" type="string" default="best_sellers_url">
  必须设置为 `best_sellers_url`。
</ParamField>

<ParamField query="notify" type="boolean" default={false}>
  请求完成时是否发送通知。
</ParamField>

<ParamField query="include_errors" type="boolean" default={true}>
  是否在响应中包含错误。
</ParamField>

## 请求体

<ParamField body="input" type="object[]" required>
  输入对象的数组。

  <Expandable title="properties">
    <ParamField body="url" type="string" required>
      Amazon 畅销商品页面的 URL。
    </ParamField>
  </Expandable>

  #### 示例

  ```json wrap theme={null}
  {
    "input": [
      {"url": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics"}
    ]
  }
  ```
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"input":[{"url":"https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics"}],"limit_per_input":null}' \
    "https://api.brightdata.com/datasets/v3/scrape?dataset_id=gd_l7q7dkf244hwjntr0&notify=false&include_errors=true&type=discover_new&discover_by=best_sellers_url"
  ```

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

  response = requests.post(
      "https://api.brightdata.com/datasets/v3/scrape",
      params={
          "dataset_id": "gd_l7q7dkf244hwjntr0",
          "notify": "false",
          "include_errors": "true",
          "type": "discover_new",
          "discover_by": "best_sellers_url",
      },
      headers={"Authorization": "Bearer YOUR_API_KEY"},
      json={
          "input": [
              {
                  "url": "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics",
              },
          ],
          "limit_per_input": None,
      },
  )

  print(response.text)
  ```

  ```javascript Node.js (fetch) theme={null}
  const params = new URLSearchParams({
    dataset_id: "gd_l7q7dkf244hwjntr0",
    notify: "false",
    include_errors: "true",
    type: "discover_new",
    discover_by: "best_sellers_url",
  });

  const response = await fetch(`https://api.brightdata.com/datasets/v3/scrape?${params}`, {
    method: "POST",
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      input: [
        {
          url: "https://www.amazon.com/Best-Sellers-Electronics/zgbs/electronics",
        },
      ],
      limit_per_input: null,
    }),
  });

  console.log(await response.text());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "title": "Portable Bluetooth Speaker",
      "url": "https://www.amazon.com/dp/B09XY1234Z",
      "asin": "B09XY1234Z",
      "price": 39.99,
      "currency": "USD",
      "rating": 4.7,
      "reviews_count": 85200,
      "seller_name": "AudioTech Direct",
      "brand": "AudioTech",
      "availability": "In Stock",
      "main_image": "https://m.media-amazon.com/images/I/example-bestseller.jpg",
      "description": "Compact portable speaker with 20-hour battery and waterproof design.",
      "category": "Electronics > Portable Audio > Speakers"
    }
  ]
  ```
</ResponseExample>
