关于 google-maps
面向 Agent 的 Google Maps 数据技能,可搜索地点并获取详情和评论,提供 HTTP GET 接口及 MCP 连接,适用于需要位置相关商户数据的场景。
主要功能
- 01文本地点搜索
- 02按坐标锚定搜索
- 03按 feature ID 获取地点详情
- 04获取地点评论及单条评论
- 05按语言和国家/地区本地化
适用场景
- 01查找附近的咖啡馆或餐馆
- 02规划行程前查看地点信息
- 03获取最新或相关地点评论
MCP 相关
通过 https://google-maps.fetcher.sh/mcp 连接。MCP 客户端可查询端点信息、检查余额,并通过付费工具获取地点或评论数据。
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ fetcher-sh/ fetcher-skills --skill google-maps安装后在 Claude Code 中输入/google-maps确认已加载。
详细介绍
Google Maps API
以整洁的 JSON 格式搜索地点、获取地点详情和评论——每次调用只需发送一个普通 HTTP GET 请求,按用量付费。无需 Google Cloud 项目、无需 API 密钥限制规则,也无需按请求支付 Places API 费用。
基础 URL:https://google-maps.fetcher.sh
身份验证
两种付费方式,相同的数据——完整机制请参阅 fetcher
技能:
# 1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
# or via POST /api/credits/topup, see the fetcher skill)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://google-maps.fetcher.sh/api/place/search?query=coffee"
# 2. x402 pay-per-call — omit the header; a GET with no payment returns 402
# with machine-readable payment requirements (USDC on Base, Polygon,
# Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
每个响应的格式都是 { "status": number, "message": string, "data": ... };HTTP 状态码与 status 一致。
端点(4 个——全部为 GET,每次调用 $0.005)
| 端点 | 返回内容 |
|---|---|
/api/place/search | 与文本查询匹配的地点,可选择指定坐标作为搜索锚点 |
/api/place/{fid} | 按要素 ID 获取地点的完整详情 |
/api/place/{fid}/reviews | 地点的评论 |
/api/review/{id} | 按 ID 获取单条评论 |
搜索必填参数:query。可选参数:languageCode、countryCode、
latitude、longitude、offset、zoom(搜索半径/精度)。评论支持
sort(relevant、newest、highest、lowest)和 cursor。
使用场景
纯文本搜索:
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=ramen in brooklyn" -G \
"https://google-maps.fetcher.sh/api/place/search"
以坐标为搜索锚点(用于“附近”类查询):
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=coffee" -G \
--data-urlencode "latitude=40.7128" \
--data-urlencode "longitude=-74.0060" \
"https://google-maps.fetcher.sh/api/place/search"
获取地点详情,然后按最新排序获取评论:
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://google-maps.fetcher.sh/api/place/0x89c259af336b3341%3A0x8c584d6dfe89aa89"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=newest" -G \
"https://google-maps.fetcher.sh/api/place/0x89c259af336b3341%3A0x8c584d6dfe89aa89/reviews"
按 ID 获取单条评论:
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://google-maps.fetcher.sh/api/review/ChdDSUhNMG9nS0VJQ0FnSURDeGRXQnl3RRAB"
本地化结果(法语,加拿大地区):
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=boulangerie" -G \
--data-urlencode "languageCode=fr" \
--data-urlencode "countryCode=CA" \
"https://google-maps.fetcher.sh/api/place/search"
MCP
{
"mcpServers": {
"google-maps": {
"url": "https://google-maps.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}
免费:search_endpoints、describe_endpoint、check_balance。付费:
fetch_data(可使用上述任意端点)、topup_credits,以及命名快捷工具
google_maps_place_search。若要通过 x402 按次付费,请移除 headers 代码块——完整
流程请参阅 fetcher 技能。
错误
400— 参数缺失或无效(消息中会指出参数名称)401— 密钥未知或已轮换402— 需要付款(x402 挑战)或topup_required(余额已用尽)404— 非定价路径- 无速率限制;上游故障不退款(结算先于交付)
参考资料
- Agent 完整设置指南:https://google-maps.fetcher.sh/skill.md
- OpenAPI 3.1 契约:https://google-maps.fetcher.sh/openapi.json
- 精简目录:https://google-maps.fetcher.sh/llms.txt
- 付款、额度和 MCP 深入指南:
fetcher技能 - 网站:https://google-maps.fetcher.sh