Google Maps Scraper

Google Maps Scraper

by crawlerbros

Extract business data from Google Maps including ratings, reviews, contact info, prices, coordinates, and images. Fast scraper with automatic paginati...

112 runs
31 users
Try This Actor

Opens on Apify.com

About Google Maps Scraper

Extract business data from Google Maps including ratings, reviews, contact info, prices, coordinates, and images. Fast scraper with automatic pagination for any location or search query.

What does this actor do?

Google Maps Scraper is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Google Maps Business Scraper A powerful Apify Actor for scraping business listings from Google Maps using browser automation with Playwright. Extract comprehensive business information including ratings, reviews, contact details, locations, and more. ## πŸš€ Features - 🎯 Comprehensive Data Extraction: Names, ratings, reviews, addresses, phones, websites, descriptions, and more - πŸ“ Location Flexibility: Search any location worldwide (cities, neighborhoods, addresses) - πŸ” Any Search Query: Restaurants, hotels, cafes, pharmacies, shops, services, etc. - πŸ’° Price Information: Extract price levels and ranges where available - πŸ“Έ Image URLs: Get business images from Google Maps - πŸ—ΊοΈ Geographic Data: Extract coordinates, Place IDs, and Plus Codes - 🌐 Clean Data: Automatic text cleaning (addresses, websites, descriptions) - πŸ’Ύ Structured Output: JSON format with all fields properly formatted ## πŸ“‹ Input Parameters The actor accepts the following input parameters: | Parameter | Type | Required | Default | Description | | ------------- | ------- | -------- | -------------- | ------------------------------------------------------ | | searchQuery | string | Yes | "restaurant" | What to search for (e.g., 'cafe', 'hotel', 'pharmacy') | | location | string | Yes | "New York" | Where to search (e.g., 'Manhattan, NY', 'Los Angeles') | | maxResults | integer | No | 20 | Maximum number of businesses to scrape (1-100) | ### Example Input json { "searchQuery": "restaurant", "location": "Manhattan, New York", "maxResults": 50 } ## πŸ“Š Output Fields Each business listing in the output dataset contains: ### Basic Information - index - Sequential index in results (e.g., 0, 1, 2) - name - Business name (e.g., "Gramercy Tavern") - category - Business type (e.g., "New American restaurant") - url - Google Maps URL for the business ### Ratings & Reviews - rating - Average rating from 1-5 stars (e.g., 4.7) - review_count - Total number of reviews (e.g., 4642) ### Contact Information - address - Full street address (e.g., "42 E 20th St, New York, NY 10003, United States") - phone - Phone number with country code (e.g., "+1 212-477-0777") - website - Business website URL (cleaned from Google redirects) ### Description & Pricing - description - Business description and services (cleaned text) - price_level - Price range indicator (e.g., "$$", "$50–100", "$100+") ### Location Data - latitude - Geographic latitude (e.g., 40.7384555) - longitude - Geographic longitude (e.g., -73.9885064) - place_id - Google Maps Place ID (e.g., "0x89c259a1820824bd:0x2b79dcdc251b8415") - plus_code - Plus Code location (e.g., "P2Q6+9H New York, USA") ### Media - images - Array of image URLs from Google Maps ### Metadata - scraped_at - ISO timestamp when data was scraped (e.g., "2025-10-22T16:20:31.874079") ### Example Output json { "index": 0, "url": "https://www.google.com/maps/place/Gramercy+Tavern/...", "scraped_at": "2025-10-22T16:20:31.874079", "name": "Gramercy Tavern", "rating": 4.6, "review_count": 4642, "category": "New American restaurant", "address": "42 E 20th St, New York, NY 10003, United States", "phone": "+1 212-477-0777", "website": "https://www.gramercytavern.com/", "description": "Michelin-starred Flatiron District tavern featuring a menu of modern, seasonal American dishes. Dine-in Takeaway Delivery", "price_level": "$100+", "place_id": "0x89c259a1820824bd:0x2b79dcdc251b8415", "plus_code": "P2Q6+9H New York, USA", "latitude": 40.7384555, "longitude": -73.9885064, "images": [ "https://lh3.googleusercontent.com/...", "https://lh3.googleusercontent.com/..." ] } ## πŸ› οΈ Usage Examples ### 1. Find Restaurants in a City json { "searchQuery": "restaurant", "location": "New York, NY", "maxResults": 50 } ### 2. Find Hotels in a Specific Area json { "searchQuery": "hotel", "location": "Manhattan, New York", "maxResults": 30 } ### 3. Find Cafes and Coffee Shops json { "searchQuery": "cafe", "location": "San Francisco, CA", "maxResults": 25 } ### 4. Find Pharmacies or Medical Services json { "searchQuery": "pharmacy", "location": "Los Angeles, CA", "maxResults": 20 } ## πŸš€ Running the Actor ### Via Apify Console 1. Go to Apify Console 2. Find the actor in the Store or your Actors 3. Configure the input parameters 4. Click "Start" to run ### Via Apify CLI (Local Development) bash # Install Apify CLI npm install -g apify-cli # Run locally apify run # Run with custom input apify run --input '{"searchQuery": "restaurant", "location": "New York", "maxResults": 20}' ### Via API bash curl -X POST https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "searchQuery": "restaurant", "location": "New York", "maxResults": 20 }' ## πŸ”§ Technical Details ### Technology Stack - Language: Python 3.11+ - Framework: Apify SDK 2.0+ - Browser Automation: Playwright (Chromium) - Data Parsing: BeautifulSoup4, Regular Expressions - Data Cleaning: Advanced text processing and URL parsing ### How It Works 1. Search Construction: Builds Google Maps search URL from query and location 2. Page Loading: Navigates to search results with optimized wait strategy 3. Scrolling: Automatically scrolls to load all results up to maxResults 4. URL Extraction: Collects business URLs from search results 5. Detail Extraction: Visits each business page to extract comprehensive data 6. Data Cleaning: Cleans addresses, websites, descriptions, and price values 7. Output: Saves structured JSON data to Apify dataset ### Data Quality Features - βœ… Address Cleaning: Removes newlines and extra whitespace - βœ… Website Extraction: Parses Google redirect URLs to get actual websites - βœ… Description Cleaning: Removes formatting symbols and newlines - βœ… Price Extraction: Flexible extraction supporting multiple formats ($$, $50-100, $100+) - βœ… Text Normalization: Proper text formatting across all fields ### Performance - Speed: ~5-7 seconds per business (including page load and extraction) - Success Rate: 95%+ data extraction success rate - Reliability: Robust error handling with graceful fallbacks - Scalability: Efficiently handles up to 100 businesses per run ## πŸ› Troubleshooting ### Common Issues 1. No Results Found - Verify the location exists and is spelled correctly - Try a more specific location (e.g., "Manhattan, NY" instead of "NY") - Check that the search query is valid for that location 2. Missing Data Fields - Some businesses may not have all fields (website, phone, price, etc.) - The actor extracts all available data - null values are expected - Try different businesses or locations for more complete data 3. Slow Performance - Google Maps pages can be slow to load - Network speed affects overall runtime - Consider reducing maxResults for faster runs 4. Rate Limiting - Google may temporarily block excessive requests - Wait a few minutes before retrying - Use residential proxies if running frequently ## οΏ½ Best Practices 1. Start Small: Test with maxResults: 5-10 first 2. Specific Locations: Use detailed locations (neighborhood/city) for better results 3. Relevant Queries: Use search terms that match real businesses 4. Monitor Output: Check the dataset to ensure data quality meets your needs 5. Respect Limits: Don't scrape excessively - respect rate limits ## πŸ“Š Use Cases - 🏒 Business Intelligence: Market research and competitor analysis - πŸ“ Location Data: Build location databases for apps - πŸ“ž Contact Lists: Generate business contact information - οΏ½ Sales Leads: Find potential customers by category/location - πŸ—ΊοΈ Mapping Projects: Create custom maps with business data - πŸ“ˆ Market Analysis: Analyze business density and competition ## πŸ“ Version History ### Version 2.0.0 (Current) - Simplified scraping logic for better reliability - Improved data cleaning (addresses, websites, descriptions) - Flexible price extraction supporting all formats - Removed unused fields (hours, menu_url, reservations_url, order_online_url) - Enhanced error handling and logging - Updated documentation and schemas ## 🀝 Support For issues, questions, or feature requests: - Check this README for troubleshooting tips - Review the output data structure - Contact support through Apify Console --- Disclaimer: This actor is for educational and research purposes. Always respect Google Maps' Terms of Service and robots.txt. Use responsibly and ethically.

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Google Maps Scraper now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
crawlerbros
Pricing
Paid
Total Runs
112
Active Users
31
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support