# SERP 本地化

使用 `geo_location` 用于调整搜索引擎结果页（SERP）的参数，使其显示与指定位置相关的结果，反映该地区用户所看到的内容。

## Google

该 `geo_location` 该参数可通过以下方式获取本地化的 Google（包括 Google Shopping）结果： **基于 UULE 的** 值，与大多数 Google 来源兼容。可选择多种方法：

1. **使用州名**:
   * 格式： `"州,国家"`
   * 示例： `"geo_location": "California,United States"`
2. **使用国家名称**:
   * 请填写官方国家名称。
   * 示例： `"geo_location": "United Kingdom"`
3. **使用 ISO-3166** **国家代码：**
   * 当提供 ISO 代码时，我们的系统会自动将其转换为相应的国家名称。查找  ISO 国家代码 [**这里**](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FB6LB4bYPdwi7hXuoCJ6Z%2Fcountries.json?alt=media\&token=f5c16d44-6f91-4590-a0f7-cad79bc5dd3a).&#x20;
   * 示例：  `"geo_location": "GB"` 对应的英国。&#x20;
4. **使用坐标和半径**:
   * 对于超本地结果（例如“我附近的餐厅”），请提供纬度、经度和半径值。
   * 示例： `"geo_location": "lat: 47.6205, lng: -122.3493, rad: 25000"`
5. **使用 Google 的规范位置名称** 或 **Criteria ID**:
   * 在最新的压缩 CSV 文件中查找值 [**这里**](https://developers.google.com/adwords/api/docs/appendix/geotargeting) 。
   * 示例： `"geo_location": "New York,New York,United States"` 或 `"geo_location": "1023191"`

如果您不小心输入了拼写错误的 `geo_location` 参数，我们的系统或 Google 可能会尝试为您纠正。不过请注意，指定现有的 Criteria ID 对于请求成功至关重要。

此外，还可以考虑将 `locale` 参数与正确的 `geo_location` 结构结合使用。此组合可提高精确度，并确保您的查询与预期的本地化偏好一致。

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

### 例外情况

#### Google Travel Hotels

* 仅支持城市级别的 `geo_location` 值（例如，“`Seattle,Washington,United States`").
* 广域位置（例如，“`美国`”）不受支持。
* 请参阅附加文件以获取 `geo_location` 不会产生准确结果的值列表。

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

## Bing

Bing 支持少量 `geo_location` 参数值格式。

* **城市级位置**。非常简单。只需在 `City,State,Country` 格式中传入城市级位置即可。\
  示例： `"geo_location": "New York,New York,United States"。`
* **州级位置**。去掉城市级位置的第一部分，并传入一个 `geo_location` 值，格式为 `"州,国家"` 格式中传入城市级位置即可。\
  示例： `"geo_location": "California,United States"`.
* **国家级位置**。要获取以国家地理中心点为本地化结果的结果，请传入官方国家名称。\
  示例： `"geo_location": "United Kingdom"`.
* **坐标级位置**。要获取超本地搜索结果（适用于“我附近的餐厅”等搜索），您可以传入纬度、经度和半径值。\
  以下示例传入了西雅图 WA 的 Space Needle 坐标： `"geo_location": "lat: 47.6205, lng: -122.3493, rad: 25000"`.

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


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
