Google Maps Scraper
Pricing
$4.00 / 1,000 results
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.
5.0 (2)
Pricing
$4.00 / 1,000 results
0
4
4
Last modified
6 days ago
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
{"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
{"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
{"searchQuery": "restaurant","location": "New York, NY","maxResults": 50}
2. Find Hotels in a Specific Area
{"searchQuery": "hotel","location": "Manhattan, New York","maxResults": 30}
3. Find Cafes and Coffee Shops
{"searchQuery": "cafe","location": "San Francisco, CA","maxResults": 25}
4. Find Pharmacies or Medical Services
{"searchQuery": "pharmacy","location": "Los Angeles, CA","maxResults": 20}
π Running the Actor
Via Apify Console
- Go to Apify Console
- Find the actor in the Store or your Actors
- Configure the input parameters
- Click "Start" to run
Via Apify CLI (Local Development)
# Install Apify CLInpm install -g apify-cli# Run locallyapify run# Run with custom inputapify run --input '{"searchQuery": "restaurant", "location": "New York", "maxResults": 20}'
Via API
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
- Search Construction: Builds Google Maps search URL from query and location
- Page Loading: Navigates to search results with optimized wait strategy
- Scrolling: Automatically scrolls to load all results up to maxResults
- URL Extraction: Collects business URLs from search results
- Detail Extraction: Visits each business page to extract comprehensive data
- Data Cleaning: Cleans addresses, websites, descriptions, and price values
- 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
maxResultsfor 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
- Start Small: Test with
maxResults: 5-10first - Specific Locations: Use detailed locations (neighborhood/city) for better results
- Relevant Queries: Use search terms that match real businesses
- Monitor Output: Check the dataset to ensure data quality meets your needs
- 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.
On this page
Share Actor:
