google-maps-reviews-api-skill
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
- 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:
-
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,Tesla showroom
- Type:
-
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:
en
- Type:
-
country (Country)
- Type:
string - Description: Country or region bias for search results.
- Supported values:
us,gb,ca,au,jp, etc. - Default:
us
- Type:
🚀 Usage
Agent should use the following independent script to achieve "one-line command result":
# Example call
python -u ./scripts/google_maps_reviews_api.py "Keywords" "Language" "Country"
⏳ 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 reviewerauthor_profile_url: Profile URL of the reviewerrating: Star ratingtext: Review text contentcomment_date: Human-readable datelikes_count: Number of likesauthor_image_url: 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:
-
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 withError:or returns empty results), the Agent should automatically try to re-execute the script once.
- If the output contains
-
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
- 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.