Google Maps Scraper: B2B Leads & Emails
Pricing
$14.99/month + usage
Google Maps Scraper: B2B Leads & Emails
The Ultimate G-Maps Lead Machine is designed for marketing agencies, sales teams, and wholesalers who need fresh, accurate business data without paying for expensive lists. Stop searching manually. Start mining leads automatically today.
Pricing
$14.99/month + usage
Rating
0.0
(0)
Developer

anuj upadhyay
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
a day ago
Last modified
Categories
Share
๐บ๏ธ Google Maps Business Scraper (Lead Miner)
Extract local business data from Google Maps at scale with advanced anti-blocking protection
This Apify Actor efficiently scrapes business information from Google Maps, including names, addresses, phone numbers, websites, ratings, and reviews. Perfect for lead generation, market research, and competitive analysis.
Built with Apify SDK v3, Crawlee, and Playwright for maximum reliability and performance.
โจ What Can This Actor Do?
- ๐ Search Multiple Locations: Process multiple search queries simultaneously
- ๐ Extract Complete Data: Business names, addresses, phones, websites, ratings, reviews
- ๐ค Auto-Scroll Pagination: Automatically loads all results from Google Maps sidebar
- ๐ก๏ธ Advanced Anti-Blocking: Session management, proxy rotation, browser fingerprinting
- ๐ฑ Detail Page Scraping: Intelligently navigates to detail pages for missing information
- ๐พ Clean JSON Export: Structured data ready for CRM, spreadsheets, or databases
- โก High Performance: Scrape hundreds of businesses in minutes with concurrent processing
๐ Use Cases
- Lead Generation: Build targeted business contact lists for B2B sales
- Market Research: Analyze competitor locations and customer sentiment
- Local SEO: Monitor business listings and ratings in specific areas
- Directory Building: Create comprehensive business directories
- Competitive Analysis: Track competitor reviews and ratings over time
๐ Quick Start
Run on Apify Platform (Recommended)
- Open the Actor (or deploy this repo)
- Configure Input:
- Add search terms (e.g., "Coffee shops in San Francisco")
- Set maximum results per search
- Select proxy configuration (your Apify Proxy)
- Start the Run - Results appear in the Dataset
- Export Data - Download as JSON, CSV, Excel, or HTML
Run Locally
# Clone the repositorygit clone https://github.com/anuj123upadhyay/Gmap_Leads_Scraper.gitcd Gmap_Leads_Scraper# Install dependenciesnpm install# Set up environment (copy and edit .env)cp .env.example .env# Add your APIFY_TOKEN to .env# Run the scrapernpm start
๐ Input Configuration
The Actor accepts the following input parameters:
Example Input
{"searchTerms": ["Plumbers in New York","Dentists in London","Coffee shops in San Francisco"],"maxItems": 100,"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"]},"includeWebsite": true,"includePhone": true,"scrollDelay": 2000}
Input Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
searchTerms | Array<String> | Yes | - | List of search queries (e.g., "Pizza restaurants in Boston") |
maxItems | Integer | Yes | 100 | Maximum number of businesses to scrape per search term (1-500) |
proxyConfiguration | Object | Yes | - | Apify Proxy settings - required for reliable scraping |
includeWebsite | Boolean | No | true | Extract website URLs (may require navigating to detail pages) |
includePhone | Boolean | No | true | Extract phone numbers (may require navigating to detail pages) |
scrollDelay | Integer | No | 2000 | Delay in milliseconds between scroll actions (500-5000) |
๐ก Tip: Start with
maxItems: 10for testing, then scale up to your desired amount.
โ ๏ธ Important: Apify Proxy is required for reliable scraping. Without it, Google Maps will block requests after ~10-20 attempts.
๐ค Output Data
Each scraped business includes the following fields:
{"businessName": "Best Pizza Place","address": "123 Main Street, Boston, MA 02108","website": "https://bestpizza.com","phone": "+1 (617) 555-0123","rating": 4.7,"reviewCount": 450,"category": "Pizza restaurant","googleMapsUrl": "https://www.google.com/maps/place/...","searchTerm": "Pizza restaurants in Boston","scrapedAt": "2026-01-20T15:30:00.000Z"}
Output Fields
| Field | Type | Description |
|---|---|---|
businessName | String | Name of the business |
address | String | Full address |
website | String | Business website URL (if available) |
phone | String | Phone number (if available) |
rating | Float | Star rating (0-5) |
reviewCount | Int | Total number of reviews |
category | String | Business category/type |
googleMapsUrl | String | Direct link to Google Maps listing |
searchTerm | String | The search query used to find this business |
scrapedAt | String | ISO timestamp of when the data was collected |
Export Options
Results can be exported in multiple formats:
- JSON - For API integration
- CSV - For spreadsheets (Excel, Google Sheets)
- Excel - Direct .xlsx download
- HTML - For viewing in browser
- RSS - For feed readers
๐ก๏ธ Anti-Blocking Features
This Actor implements multiple layers of protection against blocking:
Session Management
- Session Pool: Manages up to 50 concurrent browser sessions
- Cookie Persistence: Maintains cookies across requests per session
- Automatic Rotation: Sessions rotate automatically to avoid detection
Proxy Integration
- Residential Proxies: Uses Apify's residential proxy network
- IP Rotation: Each session uses different IP addresses
- Geographic Distribution: Proxies from multiple countries
Browser Stealth
- Fingerprint Randomization: Unique browser fingerprints per session
- Navigator Masking: Removes automation detection flags
- Human-like Behavior: Random delays and realistic scrolling patterns
Error Recovery
- 5 Automatic Retries: Failed requests retry up to 5 times
- Exponential Backoff: Increasing delays between retries
- Graceful Degradation: Saves partial data if full extraction fails
๐ฐ Cost Breakdown
Typical Costs (using Apify Platform)
| Businesses | Compute Time | Proxy Requests | Total Cost* |
|---|---|---|---|
| 100 | ~10 min | ~200 | $0.10 |
| 500 | ~30 min | ~800 | $0.30 |
| 1,000 | ~1 hour | ~1,500 | $0.60 |
| 5,000 | ~5 hours | ~7,000 | $3.00 |
* Estimated with residential proxies. Actual costs may vary.
Free Tier: Apify's free tier includes 5 hours of compute time and 5,000 proxy requests per month - enough for ~2,000 businesses!
โ๏ธ How It Works
Step-by-Step Process
- URL Generation: Creates Google Maps search URLs from your search terms
- Page Loading: Opens each URL with stealth browser settings
- Auto-Scrolling: Intelligently scrolls the results sidebar to load all businesses
- Data Extraction: Extracts business information from each listing card
- Detail Navigation: If phone/website missing, clicks into detail page
- Data Cleaning: Removes Google redirects, formats phone numbers
- Dataset Storage: Saves clean, structured JSON to Apify Dataset
๐ฏ Best Practices
Search Terms
โ
Good: "Coffee shops in San Francisco, CA"
โ
Good: "Plumbers near Boston"
โ
Good: "Italian restaurants in Manhattan"
โ Avoid: "shops" (too generic)
โ Avoid: "business" (will return mixed results)
Performance Tips
- Start with
maxItems: 10-20for testing - Use Residential proxies for best success rate
- Increase
scrollDelayif experiencing blocks (try 3000-4000ms) - Run multiple smaller batches instead of one giant batch
Cost Optimization
- Set
includeWebsite: falseandincludePhone: falseif not needed (skips detail pages) - Use
maxItemsto limit results per search - Batch similar searches together in one run
๐ง Advanced Configuration
Custom Proxy Setup
{"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Performance Tuning
You can modify src/main.js to adjust:
maxConcurrency: Number of parallel pages (default: 5)navigationTimeoutSecs: Page load timeout (default: 60s)requestHandlerTimeoutSecs: Handler timeout (default: 180s)
๐ Documentation
- QUICKSTART.md - Get started in 5 minutes
- TECHNICAL_DOCS.md - Deep dive into implementation
- BUILD_SUMMARY.md - Complete build overview
๐ Troubleshooting
"Could not find results sidebar"
- Google Maps layout may have changed
- Try reducing
maxConcurrencyto 1-2 - Ensure proxy is configured correctly
"No businesses found"
- Check if search term is too specific
- Verify Google Maps has results for that search
- Try a different location or broader search
"Request timeout"
- Increase
navigationTimeoutSecsin code - Check internet connection
- Reduce concurrent requests
"Proxy errors"
- Verify you have Apify Proxy credits
- Try datacenter proxies for testing
- Check proxy configuration in input
๐ก Tips & Tricks
Extracting More Data
Want to extract additional fields? Modify src/routes.js:
// Add business hoursconst hours = await page.$eval('[aria-label*="Hours"]', (el) => el.textContent).catch(() => null);// Add price rangeconst priceRange = await page.$eval('[aria-label*="Price"]', (el) => el.textContent).catch(() => null);
Scheduling Runs
Set up automated daily/weekly scrapes:
- Go to your Actor's "Schedule" tab on Apify
- Click "Create new schedule"
- Set frequency (daily, weekly, monthly)
- Configure input parameters
Integrations
Export data directly to:
- Google Sheets: Use Apify's Google Sheets integration
- Slack: Get notifications when run completes
- Webhooks: Send data to your API endpoint
- Zapier/Make: Connect to 5,000+ apps
๐ค Contributing
Contributions are welcome! Feel free to:
- Report bugs via GitHub Issues
- Submit pull requests
- Suggest new features
- Improve documentation
๐ License
ISC License - See LICENSE file for details
๐ฌ Support & Community
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Apify Discord: Join Community
๐ Acknowledgments
Built with:
- Apify SDK - Actor framework
- Crawlee - Web scraping library
- Playwright - Browser automation
๐ Related Actors
Looking for similar solutions?
Made with โค๏ธ by @anuj123upadhyay
Star โญ this repo if you find it useful!
๐ Changelog
v1.0.0 (2026-01-20)
- โจ Initial release
- ๐ก๏ธ Multi-layer anti-blocking protection
- ๐ค Auto-scroll pagination
- ๐ฑ Smart detail page extraction
- ๐ Clean JSON output
- ๐ Comprehensive documentation