“Google Maps API”常见的三种含义

选择接口前,先明确需要的数据或功能:

Google 介绍的 Places API 能力包括地点搜索、自动补全、详情和照片,参见Places API 官方概览。Serqo 的 Google Maps 结果 API 面向第三种用途,并非 Google Maps Platform 官方服务。

请求本地搜索结果

在 Serqo 统一搜索接口中设置 engine: "google" 和 type: "maps"。

curl https://api.serqo.io/v1/search \
  -H "x-api-key: $SERP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"西雅图咖啡店","engine":"google","type":"maps","gl":"us","hl":"en"}'

本地商家结果通常位于 data.features.localResults。根据结果页内容,每项可能包含 title、position、rating、reviews、price、category、address 和 placeId。不同搜索页返回的结果区块会有差异,应同时检查 data.features.localResults 和 data.results。响应字段与限制详见 Google Maps Results API 参考。

它不能替代哪些能力?

本地结果快照不是交互地图、地理编码、路线规划、地点自动补全,也不保证能按需查询完整地点详情。它反映的是搜索页针对查询展示的内容。如果应用需要浏览地图、解析地址或通过 Place ID 请求指定字段,应评估相应的 Google Maps Platform API。

如何选择?

需求适用接口
在应用中展示地图Google Maps Platform Maps API 或 SDK
搜索 Places 数据库或请求地点详情Google Places API
采集 Maps 查询展示的本地结果SERP API 的 Google maps 类型

常见问题

Serqo 返回的是 Google Maps 结果还是 Google Places 记录?

Serqo 提取 Google Maps 搜索页中的本地结果。具体字段和结果区块取决于查询页面;它不是完整的 Places API 响应。

能用它渲染地图或自动补全地点吗?

不能。地图渲染、地点自动补全、地点详情等能力应使用 Google Maps Platform 的 Maps 和 Places 产品。

Google Maps 结果能用 start 翻页吗?

不能。当前 Google maps 搜索类型不会应用 start。应检查响应和 API 参考,不要假设网页搜索的分页方式同样适用。

查看 Google Maps Results API 参考或 Google SERP API 指南。