Google Maps Reviews Scraper
A Python package for scraping Google Maps reviews without browser dependencies using curl_cffi.
Features
- 🎭 Browser impersonation (Chrome 99-136, Edge, Safari, Chrome Android)
- 🔒 Proxy support with authentication
- ⚡ Async and sync interfaces
- 💾 Incremental saving (auto-saves during scraping)
- 📊 JSON and CSV output formats
- 🌍 UTF-8 encoding for all languages
Installation
pip install gmaps-review-scraper
Usage
Async Usage
import asyncio
from gmaps_review_scraper import GoogleMapsReviewsScraper
async def main():
scraper = GoogleMapsReviewsScraper(
proxy="http://username:password@ip:port", # Optional
request_interval=0.5,
random_impersonate=True
)
reviews = await scraper.scrape_reviews(
url="https://www.google.com/maps/place/...",
n_reviews=100, # None for all available reviews
hl="en",
output_format="json", # or "csv"
output_file="reviews.json"
)
print(f"Scraped {len(reviews)} reviews")
asyncio.run(main())
Sync Usage
from gmaps_review_scraper import GoogleMapsReviewsScraperSync
scraper = GoogleMapsReviewsScraperSync(
proxy="http://username:password@ip:port", # Optional
request_interval=0.5
)
reviews = scraper.scrape_reviews(
url="https://www.google.com/maps/place/...",
n_reviews=100,
output_format="csv",
output_file="reviews.csv"
)
print(f"Scraped {len(reviews)} reviews")
No Reviews Found Error?
- You have to select the proper url from place page.
- Go to the place page and click on the "Reviews" tab.
- The url will be like this:
https://www.google.com/maps/place/.../reviews- Copy the url and paste it in the code.
Output Formats
JSON Output:
reviews = scraper.scrape_reviews(
url=url,
output_format="json",
output_file="reviews.json"
)
CSV Output:
reviews = scraper.scrape_reviews(
url=url,
output_format="csv",
output_file="reviews.csv"
)
Proxy Configuration
scraper = GoogleMapsReviewsScraper(
proxy="http://username:password@ip:port"
)
Supported proxy types: HTTP, HTTPS, SOCKS5
Review Data Structure
Each review contains:
{
"review_id": "unique_id",
"user_name": "John Doe",
"user_url": "https://...",
"user_reviews": 42,
"rating": 5.0,
"relative_date": "2 weeks ago",
"text": "Great place!",
"text_date": "2024-01-15T10:30:00",
"response_text": "Thank you!",
"response_text_date": "2024-01-20T14:00:00",
"retrieval_date": "2024-02-01T12:00:00"
}
Important Notes
Incremental Saving
Data is automatically saved to a temporary file during scraping in a tmp folder in your current working directory:
- Location:
./tmp/gmaps_reviews_temp_<feature_id>.<format> - Auto-creation: The
tmpfolder is automatically created on first run if it doesn't exist
If the script is interrupted, your data is safe in the temporary file and can be recovered from the tmp folder.
Configuration Options
scraper = GoogleMapsReviewsScraper(
proxy="http://user:pass@ip:port", # Proxy URL (optional)
request_interval=0.5, # Seconds between requests
n_retries=10, # Retry attempts on failure
retry_time=30, # Wait time before retry (seconds)
random_impersonate=True, # Random browser rotation
log_level="INFO" # Logging level (DEBUG, INFO, WARNING, ERROR, CRITICAL)
)
Logging Configuration
Control logging verbosity:
# Minimal output (only errors)
scraper = GoogleMapsReviewsScraper(log_level="ERROR")
# Standard output (default)
scraper = GoogleMapsReviewsScraper(log_level="INFO")
# Detailed debugging
scraper = GoogleMapsReviewsScraper(log_level="DEBUG")
# Completely quiet (no progress bar, no logs)
reviews = scraper.scrape_reviews(url, verbose=False)
You can also customize the logger directly:
from gmaps_review_scraper import setup_logger
import logging
# Setup custom logger
setup_logger(level=logging.WARNING, colored=True)
# Then use scraper
scraper = GoogleMapsReviewsScraper()
License
MIT License - see LICENSE file for details.
Disclaimer
⚠️ IMPORTANT - READ CAREFULLY
This tool is provided for educational and research purposes only.
Legal Notice
- This scraper is intended for learning about web scraping techniques and API interactions
- Users must comply with Google's Terms of Service and robots.txt
- Scraping may violate Google's Terms of Service
- Use at your own risk
Ethical Guidelines
- Respect Rate Limits: Use reasonable request intervals (0.5-1 second minimum)
- Don't Overload Servers: Avoid excessive requests that could impact Google's services
- Data Privacy: Handle scraped data responsibly and respect user privacy
- Commercial Use: This tool should not be used for commercial purposes without proper authorization
- Legal Compliance: Ensure compliance with applicable laws and regulations in your jurisdiction
No Warranty
This software is provided "as is", without warranty of any kind. The authors and contributors:
- Are not responsible for any misuse or damages caused by this tool
- Do not guarantee the accuracy or completeness of scraped data
- Do not guarantee the tool will work continuously (Google may change their API)
- Are not liable for any legal consequences resulting from use of this tool
Use Responsibly
✅ Acceptable Use:
- Educational purposes and learning
- Research and academic studies
- Personal projects with limited scope
- Testing and development
❌ Unacceptable Use:
- Large-scale commercial data collection
- Violating Google's Terms of Service
- Excessive requests that impact Google's infrastructure
- Any illegal activities
- Selling or distributing scraped data without authorization
By using this tool, you acknowledge that you have read, understood, and agree to this disclaimer. You accept full responsibility for your use of this tool and any consequences that may arise.
Metadata
Release files for gmaps-review-scraper 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gmaps_review_scraper-0.1.0.tar.gz | 14.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gmaps_review_scraper-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.4 kB
Release files / gmaps_review_scraper-0.1.0.tar.gz
| Download URL | gmaps_review_scraper-0.1.0.tar.gz |
|---|---|
| Size | 14.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd80c0297b2e265a33c0b55f958f09242781b546b1a3e45e0269edfe4f590b30
|
|
BLAKE2b-256 checksum How to use checksums |
77244d11638af886e9e4a23963e856cf392277ebc8ff4956ca23f023269f376c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|
Release files / gmaps_review_scraper-0.1.0-py3-none-any.whl
| Download URL | gmaps_review_scraper-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23c9cde7d4e2343c891272a660ca5cd440ee8d83cee4876a3e663375053fba87
|
|
BLAKE2b-256 checksum How to use checksums |
08b543c124005ca881ecd456ff2543a7cd08b29222cf34aa3799fe1ade8e4847
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.0
|