> ## Documentation Index
> Fetch the complete documentation index at: https://help.decodo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 地理定位

> 网页抓取 API 中 Google 模板的 Geo 参数使用

<Danger>
  核心版和高级版套餐已停止销售。请考虑迁移到一体化网络爬虫 API；[请点击此处查看指南](https://help.decodo.com/docs/cn/web-scraping-api-migration-guide).
</Danger>

Google 模板的 geo 参数可以通过几种不同的方式使用：

1. 使用 Google CSV 中提供的**完整位置名称**（`城市,地区,国家`）进行定位，可在[**此处**](https://developers.google.com/adwords/api/docs/appendix/geotargeting)找到：
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "laptop",
         "geo": "London,England,United Kingdom"
     }
     ```
   </CodeGroup>
2. 使用**州名**（`州,国家`）进行定位。与美国、澳大利亚、印度和其他拥有联邦州的国家兼容：
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "laptop",
         "geo": "Texas,United States"
     }
     ```
   </CodeGroup>
3. 仅使用**国家名称**进行定位：
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "laptop",
         "geo": "United Kingdom"
     }
     ```
   </CodeGroup>
4. 使用 **ISO 国家代码**进行定位：
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "laptop",
         "geo": "GB"
     }
     ```
   </CodeGroup>
5. 使用**坐标和半径**进行定位
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "laptop",
         "geo": "lat: 32.4827, lng: -22.9384, rad: 5000"
     }
     ```
   </CodeGroup>
6. 使用 Google 的规范位置名称或条件 ID 进行定位，可在[此处](https://developers.google.com/adwords/api/docs/appendix/geotargeting)找到列表：
   <CodeGroup>
     ```json JSON theme={null}
     {
         "target": "google_search",
         "query": "pilaptopzza",
         "geo": "1000010"
     }
     ```
   </CodeGroup>

<Note>
  存在例外情况，上述格式可能并非在所有情况下都有效，在这种情况下，您将收到一条错误消息说明这一点。
</Note>

***

<Columns cols={2}>
  <Card title="支持" href="https://direct.lc.chat/12092754" cta="让我们聊聊！">
    需要帮助或只是想打个招呼？我们的支持团队全天候为您服务。 \
    您也可以随时通过电子邮件 [support@decodo.com](mailto:support@decodo.com) 联系我们。
  </Card>

  <Card title="反馈" href="mailto:feedback@decodo.com" cta="分享反馈">
    找不到您要找的内容？请求一篇文章！ \
    有反馈意见？分享您对我们如何改进的想法。
  </Card>
</Columns>
