> 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/products/cn/web-scraper-api/features/localization/e-commerce-localization.md).

# 电商本地化

了解如何抓取针对特定配送和门店位置定制的电商数据。

我们的网页爬虫API提供本地化选项，可检索按特定配送和门店位置定制的电商数据。本页说明如何使用 `geo_location` 和 `store_id` 及其他参数，使结果与本地可用性和偏好保持一致。

#### 网站特定本地化支持

<table data-full-width="false"><thead><tr><th width="160">域名</th><th width="187">地理位置 / 配送</th><th>门店 ID</th><th>履约类型</th></tr></thead><tbody><tr><td><a href="#amazon"><strong>Amazon</strong></a></td><td>邮政编码或 <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"><strong>2位国家代码</strong></a></td><td>-</td><td>-</td></tr><tr><td><a href="#bestbuy"><strong>Bestbuy</strong></a></td><td>邮政编码</td><td>支持</td><td>支持</td></tr><tr><td><a href="#bodega-aurrera"><strong>Bodega Aurrerá</strong></a></td><td>邮政编码</td><td>支持</td><td>支持</td></tr><tr><td><a href="#etsy"><strong>Etsy</strong></a></td><td>邮政编码或 <a href="https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2"><strong>2位国家代码</strong></a></td><td>支持</td><td>-</td></tr><tr><td><a href="#kroger"><strong>Kroger</strong></a></td><td>邮政编码</td><td>支持</td><td>支持</td></tr><tr><td><a href="#lowes"><strong>Lowes</strong></a></td><td>邮政编码</td><td>支持</td><td>-</td></tr><tr><td><a href="#menards"><strong>Menards</strong></a></td><td>-</td><td>支持</td><td>-</td></tr><tr><td><a href="#publix"><strong>Publix</strong></a></td><td>-</td><td>支持</td><td>-</td></tr><tr><td><a href="#sams-club"><strong>Sam's Club</strong></a></td><td>邮政编码</td><td>支持</td><td>支持</td></tr><tr><td><a href="#target"><strong>Target</strong></a></td><td>邮政编码</td><td>支持</td><td>支持</td></tr><tr><td><a href="#the-home-depot"><strong>The Home Depot</strong></a></td><td>邮政编码或国家</td><td>支持</td><td>-</td></tr><tr><td><a href="#walmart"><strong>Walmart</strong></a></td><td>邮政编码或国家</td><td>支持</td><td>支持</td></tr></tbody></table>

## Amazon

使用 `geo_location` 参数可根据配送偏好自定义 Amazon 结果，如下图所示：

<div><figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-77660421df5ff1ad750844391da513277f6107a2%2FScreenshot%202024-06-21%20at%2011.08.46.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-b33db6ba30643382e4ee6220cdbad15d514fa0aa%2FScreenshot%202024-06-21%20at%2011.19.14.png?alt=media" alt=""><figcaption></figcaption></figure></div>

对于大多数 Amazon 域名，您可以设置 `geo_location` ，可使用邮政编码或 [**2位国家代码**](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)。除少数情况外，这种方式覆盖两种主要本地化场景：

* 使用 **邮政编码** 用于 **在** 市场所在国家内的位置。示例组合：
  * `{ "domain": "com", "geo_location": "90210" }`
  * `{ "domain": "co.uk", "geo_location": "W105LT" }`
* 使用 **2位国家代码** 用于 **在……之外** 市场所在国家内的位置。示例组合：
  * `{ "domain": "com", "geo_location": "LT" }`
  * `{ "domain": "de", "geo_location": "US" }`

#### 例外

* **不支持的域名**: `cn`, `com.tr`, `com.be`，以及 `nl` 不支持自定义配送位置。
* **特殊情况**:
  * **澳大利亚（`com.au`)**：仅接受澳大利亚邮政编码。
  * **阿联酋（`.ae`)**：接受阿联酋城市名称作为 `geo_location`，例如 `"geo_location": "Abu Dhabi"`，或2位国家代码。

{% hint style="info" %}
您还可以使用 `domain` 和 `locale` 参数抓取 Amazon。了解更多 [**这里**](/products/cn/web-scraper-api/features/localization/domain-locale.md).
{% endhint %}

## Bestbuy

根据特定域名、门店和配送位置调整结果。

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-8e482805b779230e8bc71a082859d865601df672%2Fimage.png?alt=media" alt="" width="359"><figcaption></figcaption></figure>

<table><thead><tr><th width="212">参数</th><th width="180">说明</th><th width="135">默认值</th><th>类型</th></tr></thead><tbody><tr><td><code>domain</code></td><td>Bestbuy 的域名本地化。可用值： <code>com</code>, <code>ca</code>.</td><td><code>com</code></td><td>字符串</td></tr><tr><td><code>store_id</code></td><td>指定门店。</td><td>-</td><td>整数</td></tr><tr><td><code>delivery_zip</code></td><td>设置配送邮政编码位置。</td><td>-</td><td>字符串</td></tr><tr><td><code>fulfillment_type</code></td><td>指定订单履约方式。可用值： <code>pickup</code>, <code>shipping</code></td><td>-</td><td>字符串</td></tr></tbody></table>

## Etsy

根据特定门店和配送位置调整结果。

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-f6a8576b55da38fb1326639e9fb4d992aa437ccc%2Fimage.png?alt=media" alt="" width="375"><figcaption><p>选择 store_id</p></figcaption></figure>

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-47c985c12bdebead0550a23122216aa5f74e7def%2Fimage.png?alt=media" alt="" width="375"><figcaption><p>选择配送位置</p></figcaption></figure>

<table><thead><tr><th width="212">参数</th><th width="235">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。</td><td>整数</td></tr><tr><td><code>geo_location</code></td><td>设置收货地址。</td><td>字符串</td></tr></tbody></table>

## Kroger

<figure><img src="https://lh7-qw.googleusercontent.com/docsz/AD_4nXfi8IRb24cfhIXTYy2QciLGDjD2S3EOlCGo_W8ipSDjNXBJI8N1cN1a03TB-5sQTGzMwk5RZkrxoPkXWBGP0GhZo12T10V8jA38BpsKP4f7hPKUD_DQtwaNSmPAT-XkzdR4kAJbWHqVHKDmTytH5DBFXbGm?key=O8OPhOCjl3FoIrVoMiPnpgh4" alt="" width="375"><figcaption></figcaption></figure>

<table><thead><tr><th width="210">参数</th><th width="172.33333333333331">说明</th><th width="153">默认值</th><th>依赖项</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。请参见可用值 <a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FAsihGe7hi5yfauUl2JIQ%2Fkroger_stores.csv?alt=media&#x26;token=40fcd869-1845-47c5-bf76-96e74cabf685"><strong>这里</strong></a>。ID 必须以 '0' 开头。</td><td>-</td><td>在以下情况下必需 <code>fulfillment_type</code> 设置为 <code>pickup</code> 或 <code>in_store</code>.</td></tr><tr><td><code>delivery_zip</code></td><td>指定配送邮政编码。</td><td>-</td><td>在以下情况下必需 <code>fulfillment_type</code> 设置为 <code>delivery</code>.</td></tr><tr><td><code>fulfillment_type</code></td><td>指定订单履约方式。可用值： <code>pickup</code>, <code>delivery</code>, <code>in_store</code>.</td><td><code>pickup</code> （如果仅提供 <code>store_id</code> ）</td><td>需要 <code>store_id</code> 用于 <code>pickup</code> 和 <code>in_store</code>，或 <code>delivery_zip</code> 用于 <code>delivery</code>.</td></tr></tbody></table>

**依赖说明：**

* `pickup` 和 `in_store` 值使用 `store_id` 参数以确定正确的门店。
* `delivery` 使用 `delivery_zip` 参数指定配送位置。
* 如果仅提供 `store_id` ，并且 `fulfillment_type` 未指定，则默认类型为 `pickup`.

{% hint style="warning" %}
如果 `fulfillment_type` 和 `store_id`/`delivery_zip` 组合无效（Kroger 不支持），抓取页面将返回 404 状态。
{% endhint %}

{% hint style="warning" %}
请注意，与其他来源不同，Kroger 来源设置门店 ID 时不需要 context 参数。
{% endhint %}

## Lowe's

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-999d4086e3683e51e20f65cffd65e7180ba45642%2Fimage.png?alt=media" alt=""><figcaption><p>选择 store_id</p></figcaption></figure>

<table><thead><tr><th width="210">参数</th><th width="342.8841145833333">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。</td><td>整数</td></tr><tr><td><code>delivery_zip</code></td><td>指定配送邮政编码。</td><td>字符串</td></tr></tbody></table>

## Menards

根据特定门店和可用性选项调整结果。

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-a46c674b0588424f4e0fd46ed94218723e97abfc%2Fimage.png?alt=media" alt="" width="195"><figcaption><p>选择 store_id</p></figcaption></figure>

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-3c6942469c6544c8a24d961f9f77385e7f8d4f79%2Fimage.png?alt=media" alt="" width="244"><figcaption><p>选择可用性选项</p></figcaption></figure>

<table><thead><tr><th width="230">参数</th><th width="247.328125">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。</td><td>字符串</td></tr><tr><td><code>pickup_at_store_eligible</code></td><td>可在门店取货。</td><td>布尔值</td></tr><tr><td><code>in_stock_today</code></td><td>商品今日有库存。</td><td>布尔值</td></tr><tr><td><code>fulfillment_center</code></td><td>订单可从集中式 Menards 仓库发货。</td><td>布尔值</td></tr><tr><td><code>delivery_eligible</code></td><td>商品符合送货上门服务条件。</td><td>布尔值</td></tr></tbody></table>

## Publix

调整 [Publix](https://developers.oxylabs.io/api-targets/cn/e-commerce/publix) 基于门店位置的结果。

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-5cbb6e9a155b75da89e7fecf2e6ae2e3db49fe8d%2Fpublix_store.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

<table><thead><tr><th width="157.34375">参数</th><th width="383.1223958333333">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。请参见 <a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FBnY1mBp2TzLykr7HkhkR%2Fpublix_store_data.json?alt=media&#x26;token=6b66ce31-745b-4558-8b26-6d74c561ded2"><strong>此处的可用值</strong></a>.</td><td>整数</td></tr></tbody></table>

## Target

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-4c7d8df337ff2f3446d231b2d93f5499ee4f3090%2Fimage.png?alt=media" alt="" width="313"><figcaption><p>选择 geo_location 和 store_id</p></figcaption></figure>

<figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-151b675f28edaa8ec22ab8d5ec9be30482819c38%2Fimage.png?alt=media" alt="" width="375"><figcaption><p>选择 fulfillment_type</p></figcaption></figure>

<table><thead><tr><th width="230">参数</th><th width="298.41796875">说明</th><th>类型</th></tr></thead><tbody><tr><td><code>store_id</code></td><td>指定门店。</td><td>字符串</td></tr><tr><td><code>fulfillment_type</code></td><td>指定订单履约方式。可用值为： <code>pickup</code>, <code>shop_in_store</code>, <code>same_day_delivery</code>, <code>shipping</code>.</td><td>布尔值</td></tr></tbody></table>

## The Home Depot

使用 `geo_location` 参数按以下方式设置配送位置： **邮政编码** 或 **国家**.

您还可以添加 `store_id` 在 `context` 参数以获取门店特定数据。门店 ID 必须是4位数字。例如，如果门店 ID 是3位数字，请在前面加一个零（例如，618 -> `0618`）。查找 Home Depot 门店 ID 列表 [**这里**](https://www.homedepot.com/l/storeDirectory).

<div><figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-9213d746aab70e2829485a054dea3b03d019f446%2Fimage%20(27).png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-53850d9bf4bde80b54f2dfc0013b842b5347eb0b%2FScreenshot%202024-07-12%20at%2016.28.47.png?alt=media" alt=""><figcaption></figcaption></figure></div>

```json
...
"geo_location": "29576",
"context": [
    {
        "key": "store_id",
        "value": "2214"
    }
]
...  
```

## Walmart

使用 `delivery_zip` 用于指定 Walmart 配送位置的参数，依据 **邮政编码**.

您还可以添加 `store_id` 用于门店特定数据的参数。Walmart 门店 ID 列表请见此处：

{% file src="/files/a1fd89df42ba65b5b82eb8830835de0afcfd38c7" %}

Walmart 门店的官方页面是 [**这里**](https://www.walmart.com/store-directory)**.**

<div align="center"><figure><img src="https://3714446197-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FBQ7Zf9paoN3FTeGcyfY1%2Fuploads%2Fgit-blob-79fb4cc07999f1bf5d95da8e019e14f45947ff42%2FScreenshot%202024-11-13%20at%2014.22.18.png?alt=media" alt=""><figcaption></figcaption></figure></div>

```json
...
"delivery_zip": "60805",
"store_id": "2070"
...  
```

### 国际 Walmart 域名

以下 Walmart 域名也支持本地化。使用 `delivery_zip` 和 `store_id` 作为 context 参数，可设置配送或取货位置并指定特定门店。

对于 `walmart.com`, `walmart.com.mx`，以及 `walmart.ca`，您还可以传入 `fulfillment_type` 作为 context 参数来设置履约方式。

<table><thead><tr><th width="341">域名</th><th>支持的履约类型</th></tr></thead><tbody><tr><td><code>walmart.com</code></td><td><code>pickup</code>, <code>delivery</code>, <code>shipping</code></td></tr><tr><td><code>walmart.com.mx</code></td><td><code>pickup</code>, <code>delivery</code></td></tr><tr><td><code>walmart.ca</code></td><td><code>pickup</code>, <code>delivery</code></td></tr><tr><td><code>walmart.co.cr</code></td><td><code>pickup</code></td></tr></tbody></table>

```json
"context": [
    { "key": "delivery_zip", "value": "06600" },
    { "key": "store_id", "value": "1015" },
    { "key": "fulfillment_type", "value": "delivery" }
]
```

查找可用的 `store_id` 以下每个域名的值：

{% file src="/files/46899e4a5618d3d01f87817cfa6346a07e18bac6" %}

{% file src="/files/627397ac4f11a69d93c2ff8ed9a5679e04b086ad" %}

对于 `walmart.co.cr`，履约类型始终为 `pickup`。使用 `delivery_zip` 和 `store_id` 来定位特定位置。

```json
"context": [
    { "key": "delivery_zip", "value": "10101" },
    { "key": "store_id", "value": "4413" }
]
```

查找可用的 `store_id` 下面是 Costa Rica locale 的可用值：

{% file src="/files/6820d3e7b452344fc889cc51360075ef50fdb882" %}

### Bodega Aurrerá

使用 `delivery_zip` 参数通过 ZIP code 设置配送或取货位置，适用于 `despensa.bodegaaurrera.com.mx` 域名。您还可以指定门店，使用 `store_id` 并使用 `fulfillment_type`.

| 参数                 | 说明                                | 类型  |
| ------------------ | --------------------------------- | --- |
| `delivery_zip`     | 设置配送或取货位置。接受墨西哥邮政编码。              | 字符串 |
| `store_id`         | 指定门店。                             | 字符串 |
| `fulfillment_type` | 设置履约方式。可用值： `pickup`, `delivery`. | 字符串 |

```json
"delivery_zip": "06600",
"context": [
    { "key": "store_id", "value": "383" },
    { "key": "fulfillment_type", "value": "delivery" }
]
```

下面查找可用的 Bodega Aurrerá 门店 ID：

{% file src="/files/b11535bf786f980a7127a19215bac64f23f5b7fa" %}

### Sam's Club

以下两者都支持本地化： `samsclub.com` （US）以及 `sams.com.mx` （墨西哥）。使用 `delivery_zip` 和 `store_id` context 参数可设置配送或取货位置并指定特定门店。使用 `fulfillment_type` 来选择履约方式。

| 参数                 | 说明                                                                                                                   | 类型  |
| ------------------ | -------------------------------------------------------------------------------------------------------------------- | --- |
| `delivery_zip`     | 设置配送或取货位置。                                                                                                           | 字符串 |
| `store_id`         | 指定门店。                                                                                                                | 字符串 |
| `fulfillment_type` | <p>设置履约方式。可用值： <code>delivery</code>, <code>pickup</code>, <code>shipping</code>.</p><p>默认： <code>pickup</code>.</p> | 字符串 |

```json
"context": [
    { "key": "delivery_zip", "value": "60601" },
    { "key": "store_id", "value": "4702" },
    { "key": "fulfillment_type", "value": "pickup" }
]
```

查找可用的 `store_id` 以下每个域名的值：

{% file src="/files/fa0b0fd292c7c5639a4fec0bfb071f7d345a1354" %}

{% file src="/files/774bc8206a77c7bc050ec12400132f9a71f44699" %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.oxylabs.io/products/cn/web-scraper-api/features/localization/e-commerce-localization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
