Google 地图 搜索 API
API 健康状态
健康 可用 受限 大多不可用 无数据
正在加载健康状态...
获取 Google 地图搜索数据,包括商家列表、评分和联系信息,以及坐标和位置定位,用于本地市场研究和潜在客户发现。
标签: Google 地图
请求参数
| 名称 | 必填 | 类型 | 默认值 | 说明 |
|---|---|---|---|---|
query | 是 | string | Google 地图的搜索查询(例如 '餐厅'、'纽约的医院')。 | |
ll | 否 | string | 搜索起点的 GPS 坐标。格式:'@<纬度>,<经度>,<缩放级别>'。精确定位和分页时需要。 | |
domain | 否 | string | google.com | 用于搜索的 Google 域名(例如 'google.com'、'google.co.uk')。请参阅 Google 域名。 |
language | 否 | string | en | 使用其两位字母代码设置结果语言(例如 'en' 表示英语,'fr' 表示法语)。请参阅 Google 语言。 |
country | 否 | string | us | 设置目标国家代码(例如 'us'、'uk')以本地化结果。请参阅 Google 国家/地区。 |
data | 否 | string | 高级 Google 地图数据参数,用于某些地图/地点特定的结果筛选和视图。可以从应用筛选后的 Google 地图 URL 中复制,或为特定地点搜索构建。此参数通常在 type = "place" 时使用。如果不熟悉,可以留空。 | |
place_id | 否 | string | 唯一的 Google 地点 ID,用于直接检索特定位置的信息。 | |
page | 否 | integer | 0 | 结果分页偏移量。从 0 开始,每页增加 20。 |
复制请求
bash
curl -X GET "https://api.justserpapi.com/api/v1/google/maps/search?query=coffee" \
-H "X-API-Key: YOUR_API_KEY"js
const res = await fetch("https://api.justserpapi.com/api/v1/google/maps/search?query=coffee", {
headers: { "X-API-Key": "YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);python
import requests
url = "https://api.justserpapi.com/api/v1/google/maps/search"
headers = { "X-API-Key": "YOUR_API_KEY" }
params = {
"query": "coffee"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())php
<?php
$url = "https://api.justserpapi.com/api/v1/google/maps/search?query=coffee";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: YOUR_API_KEY"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;go
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://api.justserpapi.com/api/v1/google/maps/search?query=coffee", nil)
req.Header.Set("X-API-Key", "YOUR_API_KEY")
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}响应
正在加载最新响应示例...
