Google Maps place results for a query — rating, address
serpapi.x.google-mapsLive Google Maps place results for a keyword and location, or a Google place_id lookup — position, place_id, rating, address, phone, website
- 价格
- $0.015/success按供应商原价
- 成功率
- 100%近 30 天 · 13,370 次
- 延迟 p50
- 1.1 秒p95 4.1 秒
- 最后验证
- 2026年7月28日实测可用
GEThttps://toolswitch.dev/v1/tools/serpapi.x.google-maps?q=pizza&ll=%4040.7455096%2C-74.0083012%2C14z&type=search&engine=google_maps预览- 可用平台额度调用
- 同步返回
- 读取公开数据
参数
Keyword search answers arrive in `local_results`; a place_id lookup answers in `place_results`. Search: engine=google_maps type=search q=pizza ll=@…. Place lookup: engine=google_maps type=place q=<place name or place_id> place_id=ChIJifIePKtZwokRVZ-UdRGkZzs.
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| 查询参数 | ||||
q | 字符串 | 必填 | required for type=search (keyword). For a place_id lookup, Treg still requires q — send the place name, or the same place_id as q, alongside place_id. | pizza |
ll | 字符串 | 可选 | @latitude,longitude,zoom — alternative to location+z or lat/lon+z | @40.7455096,-74.0083012,14z |
type | 字符串 | 必填 | search (keyword list) or place (single-place lookup via place_id). Prefer type=place with place_id. Upstream does not require type when place_id is set (https://serpapi.com/google-maps-api); Treg still requires type — send type=place for a place_id lookup. | search |
start | 整数 | 可选 | pagination offset, increments of 20 | 0 |
engine | 字符串 | 必填 | google_maps | |
place_id | 字符串 | 可选 | Google place_id for a single-place lookup / NAP (name, address, phone, website). Prefer with type=place. Upstream accepts place_id without other optional params (https://serpapi.com/google-maps-api); Treg still requires type and q, so send type=place and a q (place name, or place_id as q) alongside place_id. | ChIJifIePKtZwokRVZ-UdRGkZzs |
- 查询参数
q字符串必填required for type=search (keyword). For a place_id lookup, Treg still requires q — send the place name, or the same place_id as q, alongside place_id.
示例:
pizzall字符串可选@latitude,longitude,zoom — alternative to location+z or lat/lon+z
示例:
@40.7455096,-74.0083012,14ztype字符串必填search (keyword list) or place (single-place lookup via place_id). Prefer type=place with place_id. Upstream does not require type when place_id is set (https://serpapi.com/google-maps-api); Treg still requires type — send type=place for a place_id lookup.
示例:
searchstart整数可选pagination offset, increments of 20
示例:
0engine字符串必填示例:
google_mapsplace_id字符串可选Google place_id for a single-place lookup / NAP (name, address, phone, website). Prefer with type=place. Upstream accepts place_id without other optional params (https://serpapi.com/google-maps-api); Treg still requires type and q, so send type=place and a q (place name, or place_id as q) alongside place_id.
示例:
ChIJifIePKtZwokRVZ-UdRGkZzs
代码示例
将 $TOOLSWITCH_KEY 替换为你在控制台创建的密钥。
curl -X GET 'https://toolswitch.dev/v1/tools/serpapi.x.google-maps?q=pizza&ll=%4040.7455096%2C-74.0083012%2C14z&type=search&engine=google_maps' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY"import os
import requests
response = requests.request(
"GET",
"https://toolswitch.dev/v1/tools/serpapi.x.google-maps?q=pizza&ll=%4040.7455096%2C-74.0083012%2C14z&type=search&engine=google_maps",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/serpapi.x.google-maps?q=pizza&ll=%4040.7455096%2C-74.0083012%2C14z&type=search&engine=google_maps", {
method: "GET",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());网关接口为预览版,地址与鉴权方式可能调整。 示例参数仅为样例数据。 调用按 $0.015/success 计费,已含服务费。