> 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/serp-localization.md).

# SERP 本地化

了解如何获取所需地理位置的 SERP 结果。

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

## 值格式

使用下面任一值格式。最后两列显示该格式是否会在各个引擎上本地化结果。

<table><thead><tr><th width="121.60546875">格式</th><th width="258.8046875">值模式</th><th width="204.9140625">示例</th><th width="94.42578125" align="center">谷歌</th><th width="80.62109375" align="center">Bing</th></tr></thead><tbody><tr><td>城市</td><td><code>城市,州,国家</code> （Google 的规范位置名称）</td><td><code>纽约,纽约,美国</code></td><td align="center">✓</td><td align="center">—</td></tr><tr><td>州</td><td><code>州,国家</code></td><td><code>加利福尼亚,美国</code></td><td align="center">✓</td><td align="center">—</td></tr><tr><td>国家</td><td>官方国家名称</td><td><code>英国</code></td><td align="center">✓</td><td align="center">✓</td></tr><tr><td>ISO 国家代码</td><td><a href="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzrXw45naRpCZ0Ku9AjY1%2Fuploads%2FB6LB4bYPdwi7hXuoCJ6Z%2Fcountries.json?alt=media&#x26;token=f5c16d44-6f91-4590-a0f7-cad79bc5dd3a">ISO-3166</a> alpha-2，转换为国家名称</td><td><code>GB</code></td><td align="center">✓</td><td align="center">✓</td></tr><tr><td>坐标 + 半径</td><td><code>lat: &#x3C;lat>, lng: &#x3C;lng>, rad: &#x3C;metres></code> — 适用于超本地结果，例如“我附近的餐厅”</td><td><code>lat: 47.6205, lng: -122.3493, rad: 25000</code></td><td align="center">✓</td><td align="center">—</td></tr><tr><td>Google Criteria ID</td><td>来自 Google 的数字 ID <a href="https://developers.google.com/google-ads/api/data/geotargets">geotargets 列表</a></td><td><code>1023191</code></td><td align="center">✓</td><td align="center">—</td></tr></tbody></table>

## 谷歌

拼写错误或无法识别的 `geo_location` 值不会被拒绝：请求会成功，但不会应用位置。请仔细检查拼写，并在需要精确匹配时使用 Criteria ID。

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

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

### 例外情况

#### Google Travel Hotels

* 使用城市级 `geo_location` 值（例如，“`西雅图，华盛顿州，美国`”）以获得准确结果。
* 大范围值（例如，“`美国`”）可以接受，但返回的是整个区域范围内的酒店，而不是某个城市。
* 请参阅附件中的文件，查看 `geo_location` 不会产生准确结果的值列表。

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

## Bing

对于 Bing， `geo_location` 会在 **国家级**：传入官方国家名称或 ISO-3166 alpha-2 代码（见上表）。城市级、州级和坐标级值均可接受，但只会应用其国家。

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


---

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