> 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">Google</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;米></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>

## Google

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

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

{% hint style="info" %}
你也可以使用 `results_language`, `locale` 参数来抓取 Google。了解更多 [**此处**](/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。了解更多 [**此处**](/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 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/products/cn/web-scraper-api/features/localization/serp-localization.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.
