Google Maps Reviews Automation Skill
📖 Introduction
This skill provides a one-stop review collection service using BrowserAct's Google Maps Reviews API template. It can extract structured review data directly from Google Maps search results. Simply provide the search keywords, language, and country to get clean, usable review data.
✨ Features
- 1. No Hallucinations: Pre-set workflows avoid AI generative hallucinations, ensuring stable and precise data extraction.
- No Captcha Issues: No need to handle reCAPTCHA or other verification challenges.
- No IP Restrictions: No need to handle regional IP restrictions or geofencing.
- Faster Execution: Tasks execute faster compared to pure AI-driven browser automation solutions.
- Cost-Effective: Significantly lowers data acquisition costs compared to high-token-consuming AI solutions.
🔑 API Key Setup
Before running, check the
BROWSERACT_API_KEY environment variable. If not set, do not take other measures; ask and wait for the user to provide it.
Agent must inform the user:
"Since you haven't configured the BrowserAct API Key, please visit the BrowserAct Console to get your Key."
🛠️ Input Parameters
The Agent should flexibly configure the following parameters when calling the script:
- 1. KeyWords (Search Keywords)
-
Type:
string
-
Description: The query used to find places on Google Maps (e.g., business names, categories).
-
Example:
coffee shop,
dental clinic, INLINECODE4
- 2. language (Language)
-
Type:
string
-
Description: Sets the UI language and the language of the returned text.
-
Supported values:
en,
zh-CN,
es,
fr, etc.
-
Default: INLINECODE10
- 3. country (Country)
-
Type:
string
-
Description: Country or region bias for search results.
-
Supported values:
us,
gb,
ca,
au,
jp, etc.
-
Default: INLINECODE17
🚀 Usage
Agent should use the following independent script to achieve "one-line command result":
CODEBLOCK0
⏳ Execution Monitoring
Since this task involves automated browser operations, it may take some time (several minutes). The script will
continuously output status logs with timestamps (e.g.,
[14:30:05] Task Status: running).
Agent Instructions:
- - While waiting for the script result, keep monitoring the terminal output.
- As long as the terminal is outputting new status logs, the task is running normally; do not mistake it for a deadlock or unresponsiveness.
- Only if the status remains unchanged for a long time or the script stops outputting without returning a result should you consider triggering the retry mechanism.
📊 Data Output
After successful execution, the script parses and prints results from the API response:
- -
author_name: Display name of the reviewer - INLINECODE20 : Profile URL of the reviewer
- INLINECODE21 : Star rating
- INLINECODE22 : Review text content
- INLINECODE23 : Human-readable date
- INLINECODE24 : Number of likes
- INLINECODE25 : Reviewer's avatar URL
⚠️ Error Handling & Retry
If an error occurs during script execution (e.g., network fluctuations or task failure), the Agent should follow this logic:
- 1. Check Output Content:
- If the output
contains "Invalid authorization", it means the API Key is invalid or expired.
Do not retry; guide the user to re-check and provide the correct API Key.
- If the output
does not contain "Invalid authorization" but the task failed (e.g., output starts with
Error: or returns empty results), the Agent should
automatically try to re-execute the script once.
- 2. Retry Limit:
- Automatic retry is limited to
one time. If the second attempt fails, stop retrying and report the specific error information to the user.
🌟 Typical Use Cases
- 1. Local Business Analysis: Find reviews for cafes or clinics in a specific area.
- Reputation Monitoring: Track feedback for a specific brand location.
- Competitive Benchmarking: Analyze reviews of competitor stores.
- Sentiment Analysis: Gather review text for emotion and topic modeling.
- Market Research: Evaluate service quality across different regions.
- Lead Qualification: Use review data to identify high-quality service providers.
- Customer Insight: Understand recurring complaints or praises.
- Venue Research: Collect testimonials for parks, museums, or attractions.
- Retail Monitoring: Gather feedback for newly opened stores.
- Service Quality Audit: Analyze ratings and comments for a specific service chain.
Google Maps 评论自动化技能
📖 简介
本技能利用 BrowserAct 的 Google Maps 评论 API 模板,提供一站式评论收集服务。它可以直接从 Google Maps 搜索结果中提取结构化的评论数据。只需提供搜索关键词、语言和国家,即可获得干净可用的评论数据。
✨ 功能特点
- 1. 无幻觉问题:预设工作流程避免了 AI 生成式幻觉,确保稳定精确的数据提取。
- 无验证码问题:无需处理 reCAPTCHA 或其他验证挑战。
- 无 IP 限制:无需处理区域 IP 限制或地理围栏问题。
- 执行速度更快:相比纯 AI 驱动的浏览器自动化方案,任务执行速度更快。
- 成本效益高:相比高 Token 消耗的 AI 方案,显著降低数据获取成本。
🔑 API 密钥设置
运行前,检查 BROWSERACT
APIKEY 环境变量。如果未设置,不要采取其他措施;询问并等待用户提供。
Agent 必须告知用户:
由于您尚未配置 BrowserAct API 密钥,请访问 BrowserAct 控制台 获取您的密钥。
🛠️ 输入参数
Agent 在调用脚本时应灵活配置以下参数:
- 1. KeyWords(搜索关键词)
-
类型:string
-
描述:用于在 Google Maps 上查找地点的查询内容(如商家名称、类别)。
-
示例:咖啡店、牙科诊所、特斯拉展厅
- 2. language(语言)
-
类型:string
-
描述:设置界面语言和返回文本的语言。
-
支持的值:en、zh-CN、es、fr 等
-
默认值:en
- 3. country(国家)
-
类型:string
-
描述:搜索结果的地区偏好。
-
支持的值:us、gb、ca、au、jp 等
-
默认值:us
🚀 使用方法
Agent 应使用以下独立脚本实现一行命令获取结果:
bash
调用示例
python -u ./scripts/google
mapsreviews_api.py 关键词 语言 国家
⏳ 执行监控
由于此任务涉及自动化浏览器操作,可能需要一些时间(几分钟)。脚本将
持续输出带时间戳的状态日志(例如 [14:30:05] 任务状态:运行中)。
Agent 指令:
- - 在等待脚本结果时,持续监控终端输出。
- 只要终端持续输出新的状态日志,任务就在正常运行;不要误认为是死锁或无响应。
- 仅当状态长时间未变化或脚本停止输出且未返回结果时,才考虑触发重试机制。
📊 数据输出
执行成功后,脚本会解析 API 响应并打印结果:
- - authorname:评论者显示名称
- authorprofileurl:评论者个人资料链接
- rating:星级评分
- text:评论文本内容
- commentdate:可读的日期格式
- likescount:点赞数
- authorimage_url:评论者头像链接
⚠️ 错误处理与重试
如果脚本执行过程中出现错误(如网络波动或任务失败),Agent 应遵循以下逻辑:
- 1. 检查输出内容:
- 如果输出
包含 Invalid authorization,表示 API 密钥无效或已过期。
不要重试;引导用户重新检查并提供正确的 API 密钥。
- 如果输出
不包含 Invalid authorization 但任务失败(例如输出以 Error: 开头或返回空结果),Agent 应
自动尝试重新执行脚本一次。
- 2. 重试限制:
- 自动重试限制为
一次。如果第二次尝试失败,停止重试并向用户报告具体的错误信息。
🌟 典型使用场景
- 1. 本地商业分析:查找特定区域的咖啡馆或诊所评论。
- 声誉监控:追踪特定品牌门店的反馈。
- 竞争对标分析:分析竞争对手门店的评论。
- 情感分析:收集评论文本进行情感和主题建模。
- 市场调研:评估不同地区的服务质量。
- 潜在客户筛选:利用评论数据识别优质服务提供商。
- 客户洞察:了解常见的投诉或表扬内容。
- 场地研究:收集公园、博物馆或景点的评价。
- 零售监控:收集新开门店的反馈。
- 服务质量审计:分析特定服务连锁店的评分和评论。