Google Maps Scraper: B2B Leads & Emails avatar
Google Maps Scraper: B2B Leads & Emails

Pricing

$14.99/month + usage

Go to Apify Store
Google Maps Scraper: B2B Leads & Emails

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

anuj upadhyay

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

๐Ÿ—บ๏ธ Google Maps Business Scraper (Lead Miner)

Apify Actor LICENSE package.json Maintained

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

  1. Open the Actor (or deploy this repo)
  2. Configure Input:
    • Add search terms (e.g., "Coffee shops in San Francisco")
    • Set maximum results per search
    • Select proxy configuration (your Apify Proxy)
  3. Start the Run - Results appear in the Dataset
  4. Export Data - Download as JSON, CSV, Excel, or HTML

Run Locally

# Clone the repository
git clone https://github.com/anuj123upadhyay/Gmap_Leads_Scraper.git
cd Gmap_Leads_Scraper
# Install dependencies
npm install
# Set up environment (copy and edit .env)
cp .env.example .env
# Add your APIFY_TOKEN to .env
# Run the scraper
npm 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

FieldTypeRequiredDefaultDescription
searchTermsArray<String>Yes-List of search queries (e.g., "Pizza restaurants in Boston")
maxItemsIntegerYes100Maximum number of businesses to scrape per search term (1-500)
proxyConfigurationObjectYes-Apify Proxy settings - required for reliable scraping
includeWebsiteBooleanNotrueExtract website URLs (may require navigating to detail pages)
includePhoneBooleanNotrueExtract phone numbers (may require navigating to detail pages)
scrollDelayIntegerNo2000Delay in milliseconds between scroll actions (500-5000)

๐Ÿ’ก Tip: Start with maxItems: 10 for 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

FieldTypeDescription
businessNameStringName of the business
addressStringFull address
websiteStringBusiness website URL (if available)
phoneStringPhone number (if available)
ratingFloatStar rating (0-5)
reviewCountIntTotal number of reviews
categoryStringBusiness category/type
googleMapsUrlStringDirect link to Google Maps listing
searchTermStringThe search query used to find this business
scrapedAtStringISO 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)

BusinessesCompute TimeProxy RequestsTotal 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

  1. URL Generation: Creates Google Maps search URLs from your search terms
  2. Page Loading: Opens each URL with stealth browser settings
  3. Auto-Scrolling: Intelligently scrolls the results sidebar to load all businesses
  4. Data Extraction: Extracts business information from each listing card
  5. Detail Navigation: If phone/website missing, clicks into detail page
  6. Data Cleaning: Removes Google redirects, formats phone numbers
  7. 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-20 for testing
  • Use Residential proxies for best success rate
  • Increase scrollDelay if experiencing blocks (try 3000-4000ms)
  • Run multiple smaller batches instead of one giant batch

Cost Optimization

  • Set includeWebsite: false and includePhone: false if not needed (skips detail pages)
  • Use maxItems to 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 maxConcurrency to 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 navigationTimeoutSecs in 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 hours
const hours = await page.$eval('[aria-label*="Hours"]', (el) => el.textContent).catch(() => null);
// Add price range
const priceRange = await page.$eval('[aria-label*="Price"]', (el) => el.textContent).catch(() => null);

Scheduling Runs

Set up automated daily/weekly scrapes:

  1. Go to your Actor's "Schedule" tab on Apify
  2. Click "Create new schedule"
  3. Set frequency (daily, weekly, monthly)
  4. 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

๐ŸŒŸ Acknowledgments

Built with:

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