> For the complete documentation index, see [llms.txt](https://developers.oxylabs.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.oxylabs.io/api-targets/cn/dian-zi-shang-wu/amazon/sellers.md).

# 卖家

该 `amazon_sellers` 数据源旨在抓取 Amazon Sellers 页面。

{% hint style="info" %}
查看输出 [**数据字典**](#data-dictionary) 用于 Sellers，提供简短描述、截图、已解析的 JSON 代码片段，以及定义每个已解析字段的表格。可通过右侧导航或向下滚动页面查看详细信息。
{% endhint %}

## 请求示例

在下面的代码示例中，我们发起请求以获取卖家 ID 的卖家页面 `A2MUQS6AX5GGR` 在 `amazon.de` 市场。

{% tabs %}
{% tab title="cURL" %}

```shell
curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "amazon_sellers", 
        "domain": "de", 
        "query": "A2MUQS6AX5GGR",
        "parse": true
    }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
from pprint import pprint


# 结构化负载。
payload = {
    'source': 'amazon_sellers',
    'domain': 'de',
    'query': 'A2MUQS6AX5GGR',
    'parse': True
}


# 获取响应。
response = requests.request(
    'POST',
    'https://realtime.oxylabs.io/v1/queries',
    auth=('USERNAME', 'PASSWORD'),
    json=payload,
)

# 将美化后的响应打印到标准输出。
pprint(response.json())
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
const https = require("https");

const username = "USERNAME";
const password = "PASSWORD";
const body = {
    source: "amazon_sellers",
    domain: "de",
    query: "A2MUQS6AX5GGR",
    parse: true,
};

const options = {
    hostname: "realtime.oxylabs.io",
    path: "/v1/queries",
    method: "POST",
    headers: {
        "Content-Type": "application/json",
        Authorization:
            "Basic " + Buffer.from(`${username}:${password}`).toString("base64"),
    },
};

const request = https.request(options, (response) => {
    let data = "";

    response.on("data", (chunk) => {
        data += chunk;
    });

    response.on("end", () => {
        const responseData = JSON.parse(data);
        console.log(JSON.stringify(responseData, null, 2));
    });
});

request.on("error", (error) => {
    console.error("Error:", error);
});

request.write(JSON.stringify(body));
request.end();
```

{% endtab %}

{% tab title="HTTP" %}

```http
https://realtime.oxylabs.io/v1/queries?source=amazon_sellers&domain=de&query=A2MUQS6AX5GGR&parse=true&access_token=12345abcde
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php

$params = array(
    'source' => 'amazon_sellers',
    'domain' => 'de',
    'query' => 'A2MUQS6AX5GGR',
    'parse' => true
);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "https://realtime.oxylabs.io/v1/queries");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, "USERNAME" . ":" . "PASSWORD");

$headers = array();
$headers[] = "Content-Type: application/json";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
echo $result;

if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
```

{% endtab %}

{% tab title="Golang" %}

```go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
)

func main() {
	const Username = "USERNAME"
	const Password = "PASSWORD"

	payload := map[string]interface{}{
		"source": "amazon_sellers",
		"domain": "de",
		"query":  "A2MUQS6AX5GGR",
		"parse":  true,
	}

	jsonValue, _ := json.Marshal(payload)

	client := &http.Client{}
	request, _ := http.NewRequest("POST",
		"https://realtime.oxylabs.io/v1/queries",
		bytes.NewBuffer(jsonValue),
	)

	request.SetBasicAuth(Username, Password)
	response, _ := client.Do(request)

	responseText, _ := ioutil.ReadAll(response.Body)
	fmt.Println(string(responseText))
}

```

{% endtab %}

{% tab title="C#" %}

```csharp
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Json;
using System.Threading.Tasks;

namespace OxyApi
{
    class Program
    {
        static async Task Main()
        {
            const string Username = "USERNAME";
            const string Password = "PASSWORD";

            var parameters = new {
                source = "amazon_sellers",
                domain = "de",
                query = "A2MUQS6AX5GGR",
                parse = true
            };

            var client = new HttpClient();

            Uri baseUri = new Uri("https://realtime.oxylabs.io");
            client.BaseAddress = baseUri;

            var requestMessage = new HttpRequestMessage(HttpMethod.Post, "/v1/queries");
            requestMessage.Content = JsonContent.Create(parameters);

            var authenticationString = $"{Username}:{Password}";
            var base64EncodedAuthenticationString = Convert.ToBase64String(System.Text.ASCIIEncoding.UTF8.GetBytes(authenticationString));
            requestMessage.Headers.Add("Authorization", "Basic " + base64EncodedAuthenticationString);

            var response = await client.SendAsync(requestMessage);
            var contents = await response.Content.ReadAsStringAsync();

            Console.WriteLine(contents);
        }
    }
}
```

{% endtab %}

{% tab title="Java" %}

```java
package org.example;

import okhttp3.*;
import org.json.JSONObject;
import java.util.concurrent.TimeUnit;

public class Main implements Runnable {
    private static final String AUTHORIZATION_HEADER = "Authorization";
    public static final String USERNAME = "USERNAME";
    public static final String PASSWORD = "PASSWORD";
    public void run() {
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("source", "amazon_sellers");
        jsonObject.put("domain", "de");
        jsonObject.put("query", "A2MUQS6AX5GGR");
        jsonObject.put("parse", true);

        Authenticator authenticator = (route, response) -> {
            String credential = Credentials.basic(USERNAME, PASSWORD);

            return response
                    .request()
                    .newBuilder()
                    .header(AUTHORIZATION_HEADER, credential)
                    .build();
        };

        var client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .readTimeout(180, TimeUnit.SECONDS)
                .build();

        var mediaType = MediaType.parse("application/json; charset=utf-8");
        var body = RequestBody.create(jsonObject.toString(), mediaType);
        var request = new Request.Builder()
                .url("https://realtime.oxylabs.io/v1/queries")
                .post(body)
                .build();

        try (var response = client.newCall(request).execute()) {
            if (response.body() != null) {
                try (var responseBody = response.body()) {
                    System.out.println(responseBody.string());
                }
            }
        } catch (Exception exception) {
            System.out.println("Error: " + exception.getMessage());
        }

        System.exit(0);
    }

    public static void main(String[] args) {
        new Thread(new Main()).start();
    }
}
```

{% endtab %}

{% tab title="JSON" %}

```json
{
    "source": "amazon_sellers", 
    "domain": "de", 
    "query": "A2MUQS6AX5GGR",
    "parse": true
}
```

{% endtab %}
{% endtabs %}

我们使用同步的 [**Realtime**](/products/cn/web-scraper-api/integration-methods/realtime.md) 集成方法作为示例。如果您想使用 [**Proxy Endpoint**](/products/cn/web-scraper-api/integration-methods/proxy-endpoint.md) 或异步 [**Push-Pull**](/products/cn/web-scraper-api/integration-methods/push-pull.md) 集成，请参阅 [**集成方法**](/products/cn/web-scraper-api/integration-methods.md) 部分。

## 请求参数值

### 通用

抓取 Amazon Seller 页面时的基础设置和自定义选项。

<table><thead><tr><th width="222">参数</th><th width="350.3333333333333">说明</th><th>默认值</th></tr></thead><tbody><tr><td><mark style="background-color:green;"><strong>source</strong></mark></td><td>设置爬虫。</td><td><code>amazon_sellers</code></td></tr><tr><td><mark style="background-color:green;"><strong>query</strong></mark></td><td>卖家 ID 代码。</td><td>-</td></tr><tr><td><code>render</code></td><td>设置为 <code>html</code>. <a href="/spaces/ZwEHB9k4MH4pDy80n9mF/pages/9d7133837001de31de5dfd0796cfbc6fdd7c78c8#javascript-rendering"><strong>更多信息</strong></a><strong>.</strong></td><td>-</td></tr><tr><td><code>parse</code></td><td>设置为 <code>true</code>时返回解析后的数据。查看输出 <a href="#output-data-dictionary"><strong>数据字典</strong></a>.</td><td><code>false</code></td></tr><tr><td><code>callback_url</code></td><td>您的回调端点 URL。 <a href="/spaces/ZwEHB9k4MH4pDy80n9mF/pages/f93fe40aed5366f8033cd2ebfae30e61c16a4f51"><strong>更多信息</strong></a>.</td><td>-</td></tr><tr><td><code>user_agent_type</code></td><td>设备类型和浏览器。完整列表可在 <a href="/spaces/ZwEHB9k4MH4pDy80n9mF/pages/3e6a8ee6a2915a55b276cc31a20735fe1e0e4ed1"><strong>这里</strong></a>.</td><td><code>desktop</code></td></tr></tbody></table>

&#x20;   \- 必填参数

### 本地化

将结果适配到特定的地理位置、域名和语言。

| 参数             | 说明                                                                                                                                                                            | 默认值   |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
| `geo_location` | 该 *送达至* 位置。请参阅我们关于使用此参数的指南 [**这里**](/products/cn/web-scraper-api/features/localization/proxy-location.md#list-of-supported-geo_location-values).                              | -     |
| `域名`           | Amazon 的域名本地化。可用域名完整列表见 [**这里**](https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/amazon/broken-reference/README.md). | `com` |
| `locale`       | `Accept-Language` 标头值，用于设置 Amazon 页面界面语言。 [**更多信息**](/products/cn/web-scraper-api/features/localization/domain-locale.md#amazon).                                             | -     |

{% hint style="warning" %}
**重要：** 在大多数页面类型中，Amazon 会根据客户的配送地点来定制返回结果。因此，我们建议使用 `geo_location` 参数来设置您首选的配送地点。您可以阅读更多关于在 Amazon 中使用 `geo_location` 的内容 [**这里**](https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/amazon/broken-reference/README.md).
{% endhint %}

## 结构化数据

下面可以找到一个 **结构化输出示例** 用于 `amazon_sellers`。请注意，目前我们只支持以下内容的已解析输出 `desktop` 设备类型。不过，没有明显理由用其他设备类型获取 seller 页面，因为卖家数据在所有设备上都完全相同。

<details>

<summary><code>Amazon_sellers</code> <strong>结构化输出</strong></summary>

```json
{
    "results": [
        {
            "content": {
                "url": "https://www.amazon.com/sp?seller=A151FB8X73UXPJ",
                "query": "A151FB8X73UXPJ",
                "rating": 4.5,
                "page_type": "Seller",
                "description": "服务至上！Gamer Girlz LLC 通过提供最快的服务和最高质量的产品，致力于让客户满意。每一笔订单都会精心包装，并附上特别感谢，感谢您选择 Gamer Girlz 为您提供您应得的一流购物体验！",
                "business_name": "Gamer Girlz",
                "recent_feedback": [
                    {
                        "feedback": "产品从未送达，而且非常非常贵。由于某种原因，不能退款。",
                        "rated_by": "By Juli on May 8, 2022.",
                        "rating_stars": 1
                    },
                    {
                        "feedback": "最喜欢的游戏",
                        "rated_by": "By DF on May 8, 2022.",
                        "rating_stars": 5
                    },
                    {
                        "feedback": "它运行得非常完美，我喜欢上面的游戏。",
                        "rated_by": "By John on May 8, 2022.",
                        "rating_stars": 5
                    },
                    {
                        "feedback": "我买到的所有游戏都发货超级快，而且状态极佳！我一定会再次从他们那里购买，并推荐给其他人！",
                        "rated_by": "By Brianna c. on May 6, 2022.",
                        "rating_stars": 5
                    },
                    {
                        "feedback": "他们发货很快，且提供了优质商品。我买的游戏还附带了真实性标签，以确保我购买的是正品。",
                        "rated_by": "By anonymous  on May 6, 2022.",
                        "rating_stars": 5
                    }
                ],
                "business_address": "1020 Michigan St. Sandpoint ID 83864 US",
                "parse_status_code": 12000,
                "feedback_summary_table": {
                    "counts": {
                        "30_days": 44,
                        "90_days": 146,
                        "all_time": 7857,
                        "12_months": 611
                    },
                    "neutral": {
                        "30_days": "5%",
                        "90_days": "2%",
                        "all_time": "2%",
                        "12_months": "1%"
                    },
                    "negative": {
                        "30_days": "7%",
                        "90_days": "7%",
                        "all_time": "3%",
                        "12_months": "8%"
                    },
                    "positive": {
                        "30_days": "89%",
                        "90_days": "91%",
                        "all_time": "95%",
                        "12_months": "91%"
                    }
                }
            },
            "created_at": "2022-05-09 06:57:47",
            "updated_at": "2022-05-09 06:57:50",
            "page": 1,
            "url": "https://www.amazon.com/sp?seller=A151FB8X73UXPJ",
            "job_id": "6929323518437886977",
            "status_code": 200,
            "parser_type": ""
        }
    ]
}
```

</details>

## 输出数据字典

#### HTML 示例

<figure><img src="https://lh7-us.googleusercontent.com/Inq5Q93noPtfnzwbFnF09dP4mvi6G5D98J3gdVGDwULkj1oVYEFRggMr3ZuR7t9XrpBuG5fZoH3DGSQN4CK8X_IRems3mxSehKzzdSukHjux_3H35RljbZABkGSjJ2meVB2llVJn-Q3KY3iozLuEB0o" alt=""><figcaption></figcaption></figure>

#### JSON 结构

该 `amazon_sellers` 结构化输出包含诸如 `URL`, `query`, `rating`等字段。下表展示了我们解析的每个字段的详细列表，以及对应的描述和数据类型。表中还包括一些元数据。

<table><thead><tr><th width="262">键</th><th width="341">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>url</code></td><td>Amazon 卖家页面的 URL。</td><td>字符串</td></tr><tr><td><code>query</code></td><td>用于原始搜索词的 13 位卖家 ID。</td><td>字符串</td></tr><tr><td><code>rating</code></td><td>卖家的评分。</td><td>整数</td></tr><tr><td><code>page_type</code></td><td>Amazon 页面类型。</td><td>字符串</td></tr><tr><td><code>描述</code></td><td>关于卖家的简短描述。</td><td>字符串</td></tr><tr><td><code>seller_name</code></td><td>卖家名称。</td><td>字符串</td></tr><tr><td><code>business_name</code></td><td>企业名称。</td><td>字符串</td></tr><tr><td><code>recent_feedback</code></td><td>包含最近反馈条目及其各自详情的列表。</td><td>数组</td></tr><tr><td><code>business_address</code></td><td>企业地址。</td><td>字符串</td></tr><tr><td><code>parse_status_code</code></td><td>解析任务的状态码。你可以查看所描述的解析器状态码 <a href="https://github.com/oxylabs/gitbook-public-english/blob/master/scraping-solutions/web-scraper-api/targets/amazon/broken-reference/README.md"><strong>这里</strong></a>.</td><td>整数</td></tr><tr><td><code>feedback_summary_data</code></td><td>包含有关卖家评分的可用详情列表。</td><td>对象</td></tr><tr><td><code>created_at</code></td><td>抓取任务创建时的时间戳。</td><td>timestamp</td></tr><tr><td><code>updated_at</code></td><td>抓取任务完成时的时间戳。</td><td>timestamp</td></tr><tr><td><code>job_id</code></td><td>与抓取任务关联的任务 ID。</td><td>整数</td></tr><tr><td><code>status_code</code></td><td>抓取任务的状态码。你可以查看所描述的抓取器状态码 <a href="/spaces/ZwEHB9k4MH4pDy80n9mF/pages/3d4407f90bbe20d112e9eeb355b2d8d6a2289d82"><strong>这里</strong></a>.</td><td>整数</td></tr><tr><td><code>parser_type</code></td><td>用于解析数据的解析器类型。</td><td>字符串</td></tr></tbody></table>

{% hint style="info" %}
在以下部分中，当某种结果类型包含多个项目时，解析后的 JSON 代码片段会被缩短。
{% endhint %}

### 最近反馈

该 `recent_feedback` 数据展示了针对 Amazon 市场中某个特定商品列表留下的近期客户评价和反馈。

<figure><img src="/files/4bd5d3312f46b80b524e0cfff3f390a5a586055d" alt=""><figcaption></figcaption></figure>

```json
...
"recent_feedback": [
    {
        "feedback": "非常感谢您在百忙之中抽时间留下这么好的评价。作为一家小企业，我们非常喜欢与像您这样愿意分享积极体验的客户合作。",
        "rated_by": "By Troy on January 29, 2024.",
        "rating_stars": 5
    },
...
],
...

```

| 键 (recent\_feedback) | 说明             | 类型  |
| -------------------- | -------------- | --- |
| `feedback`           | 为卖家或卖家商品提交的反馈。 | 字符串 |
| `rated_by`           | 提交反馈和数据的用户信息。  | 字符串 |
| `rating_stars`       | 提交的星级数。        | 整数  |

### 反馈汇总数据

该 `feedback_summary_data` 是针对 Amazon 市场中某个特定商品列表提供的反馈统计信息。反馈汇总数据包含不同时间段的信息，帮助卖家和分析人员跟踪客户情绪随时间的变化。

<figure><img src="https://lh7-us.googleusercontent.com/0ww8aVbAgN2H8vV8PxPNKB8TWQAPr289gm9P4MfYusweXSwDqyO9EEiEwBtj1OIVuzibxe4obZWqyXWszR41Obxm1ehpAmlbvd-UrZx3Mb32ZAXnHgaYyLjRuLjnBSR9GnvMoyrUg6Pels63BrWKVy0" alt=""><figcaption></figcaption></figure>

```json
...               
 "feedback_summary_data": {
    "1_month": {
        "count": 3,
        "1_star": "33%",
        "2_star": "0%",
        "3_star": "0%",
        "4_star": "33%",
        "5_star": "33%"
    },
    "3_month": {
        "count": 10,
        "1_star": "10%",
        "2_star": "0%",
        "3_star": "0%",
        "4_star": "20%",
        "5_star": "70%"
    },
 ...
}
...
```

<table><thead><tr><th width="229">键 (content.feedback_summary_data)</th><th width="354">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>1_month/3_month/12_month/all_time</code></td><td>用于按定义的时间范围查看评分信息的筛选器。</td><td>对象</td></tr><tr><td><code>1_month-all_time.1_star-5_star</code></td><td>某个特定时间范围内可用评论的数量。</td><td>整数</td></tr><tr><td><code>百分比分布</code></td><td>某个特定时间范围内各星级评分的百分比分布。</td><td>百分比</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.oxylabs.io/api-targets/cn/dian-zi-shang-wu/amazon/sellers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
