Extract business leads from Google Maps with advanced scraping. Get contact info, reviews, ratings & export to Excel. Free alternative to paid tools.
A powerful command-line Google Maps business data scraper that extracts comprehensive business information including contact details, reviews, ratings, and more. Built with Puppeteer stealth technology and advanced API interception to avoid detection and ensure reliable data extraction.
- π― CLI-Based Interface - Easy-to-use command line interface for bulk scraping
- π Comprehensive Data Extraction - Name, address, phone, website, ratings, reviews, hours
- π Multiple Input Methods - Manual keyword input, batch keywords, or keyword file import
- π± Multiple Export Formats - Excel (.xlsx), CSV with automatic duplicate removal
- π‘οΈ Advanced Anti-Detection - Puppeteer Extra with stealth plugin and randomized delays
- π Batch Processing - Process multiple keywords simultaneously with parallel execution
- π Progress Tracking - Real-time progress monitoring with beautiful console output
- πΎ Database Integration - Optional MongoDB support for data storage
- π Detailed Logging - Comprehensive logging system with file output
- β‘ High Performance - Aggressive scrolling to extract up to 136+ results per search
- π Keyword File Support - Import keywords from
keyworddata.txtfile - ποΈ Configurable Options - Headless mode, parallel limits, max results per search
- Input Keywords: Enter search terms like "restaurants in New York" or "dentists near me"
- Advanced Scrolling: Automatically scrolls Google Maps to load ALL available listings
- API Interception: Captures Google's internal API responses for maximum data extraction
- Detail Enhancement: Visits individual business pages to extract phone numbers and websites
- Export Results: Saves data to Excel/CSV with automatic deduplication
- Node.js (v16 or higher)
- npm or yarn
- Chrome/Chromium browser
-
Clone the repository
git clone https://github.com/kunaldevelopers/Google-Maps-Business-Scraper.git cd Google-Maps-Business-Scraper -
Install dependencies
npm install
-
Start scraping
npm start
npm startThen choose option 1 and enter keywords one by one:
- "restaurants in London"
- "dentists near Manchester"
- "hotels in Birmingham"
-
Create/edit
keyworddata.txtin the project root:Vegan grocery stores near Camden London Best vegan food shops in Shoreditch Coffee shops in central London Organic restaurants near Westminster -
Run the scraper:
npm start
-
Choose option 3 to load keywords from file
npm startChoose option 2 and enter direct Google Maps search URLs:
https://www.google.com/maps/search/restaurants+in+london/
When running the CLI, you'll be prompted for:
- Parallel Processing: Number of simultaneous scraping processes (1-5 recommended)
- Max Results: Results per keyword (default: 136, can extract up to 150+)
- Headless Mode: Run browser in background (recommended: Yes)
- Include Photos: Extract business photos (warning: may cause Excel file issues)
| Field | Description | Source |
|---|---|---|
| Business Name | Name of the business | Google Maps listing |
| Phone Number | Contact phone number | Business detail page + API |
| Address | Full business address | Google Maps listing |
| Website | Business website URL | Business detail page |
| Rating | Google Maps rating (1-5 stars) | Google Maps API |
| Review Count | Total number of reviews | Google Maps API |
| Category | Business category/type | Google Maps listing |
| Hours of Operation | Business opening hours | Business detail page |
| Photos | Business photos URLs (optional) | Google Maps images |
Create a .env file in the root directory:
# Database Configuration (Optional)
MONGODB_URI=mongodb://localhost:27017/google-maps-scraper
# Scraping Configuration
MAX_CONCURRENT_PAGES=3
REQUEST_DELAY=2000
HEADLESS_MODE=true
# Export Configuration
OUTPUT_DIRECTORY=./google_maps_exportsThe keyworddata.txt file should contain one search query per line:
restaurants in New York
dentists near London Bridge
coffee shops in Manchester city center
vegan food stores near Camden
hotels in Birmingham UK
car repair shops in Leeds
- Parallel Limit: Start with 1-2, increase carefully to avoid IP blocking
- Max Results: Default 136 works well, higher numbers may trigger CAPTCHA
- Delays: Built-in randomized delays prevent detection
Start as API server:
npm start -- --server{
"query": "restaurants in London",
"maxResults": 50,
"headless": true,
"retries": 3,
"parallelLimit": 2
}Response:
{
"data": [
{
"name": "Restaurant Name",
"phone": "+44 20 1234 5678",
"rating": 4.5,
"ratingCount": "123",
"address": "123 Main St, London",
"category": "Restaurant",
"website": "https://restaurant.com",
"hoursOfOperation": "Mon: 9-17; Tue: 9-17...",
"photos": ["photo_url_1", "photo_url_2"]
}
],
"totalRecords": 45,
"newRecords": 45,
"duplicatesSkipped": 0,
"filePath": "./exports/data.xlsx",
"csvPath": "./exports/data.csv"
}google_maps_[keyword]_[timestamp].xlsxgoogle_maps_[keyword]_[timestamp].csv
all_data_[timestamp].xlsx- Contains all unique results from batch processingall_data_[timestamp].csv- CSV version of master file
scraper.log- Detailed operation logs
- Stealth Plugin: Hides automation indicators
- Randomized Delays: Human-like browsing patterns
- User Agent Rotation: Appears as real browser
- Resource Optimization: Only loads essential page elements
- CAPTCHA Detection: Automatic detection with screenshot capture
- IP Protection: Built-in request limiting
- Use specific locations: "restaurants in Camden, London" vs "restaurants"
- Include relevant qualifiers: "best", "near", "top rated"
- Try variations: "dentist", "dental clinic", "dental practice"
- Start with 1 parallel process for testing
- Monitor for CAPTCHAs if increasing parallel processing
- Use smaller batches (20-30 keywords) for stability
- Run during off-peak hours for better performance
- Respect Google's rate limits and terms of service
- Use scraped data responsibly and ethically
- Implement appropriate delays between requests
- Don't overwhelm Google's servers
- This tool is for educational and research purposes only
- Respect Google's Terms of Service and robots.txt
- Implement appropriate delays between requests
- Don't overload Google's servers
- Use scraped data responsibly and in compliance with data protection laws
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you encounter any issues or need support:
- Check the Issues page
- Create a new issue with detailed description
- Include log files and error messages
- Contact the developer (details below)
Kunal Kumar Pandit
- π§ Email: kunalkprnc@gmail.com
- π± WhatsApp: +91 9471376362
- πΌ LinkedIn: Kunal Kumar Pandit
- π Website: www.cyberkunal.com
- π GitHub: @kunaldevelopers
If this project helped you, please give it a β star on GitHub!
- Add GUI interface for non-technical users
- Implement proxy rotation for larger scale scraping
- Add email extraction from business websites
- Support for multiple countries/languages
- Add data validation and cleaning features
- Integration with CRM systems
- Real-time scraping dashboard
- Mobile app for on-the-go scraping
- Puppeteer for browser automation
- Puppeteer Extra for stealth capabilities
- Cheerio for server-side HTML parsing
- ExcelJS for Excel file generation
- Winston for logging
- Chalk for beautiful console output