Guide
How to Scrape Google Maps Business Data
Learn how to extract business listings, reviews, and contact information from Google Maps using Python and scraping APIs.
Google Maps is the richest source of local business data. Scraping it powers lead generation, market analysis, and location intelligence.
What Data Can You Extract?
- Business name and category
- Address and coordinates
- Phone number and website
- Hours of operation
- Reviews and ratings
- Photos
- Popular times and wait times
- Price range
The Challenge
Google Maps is extremely hard to scrape directly:
- Fully JavaScript-rendered (no useful HTML without rendering)
- Aggressive bot detection and CAPTCHA
- Data loaded dynamically as you scroll
- Frequent layout changes
Method 1: Google Places API (Official)
The simplest approach uses Google's official Places API.
import requests
API_KEY = "YOUR_GOOGLE_API_KEY"
url = "https://maps.googleapis.com/maps/api/place/textsearch/json"
params = {
"query": "restaurants in San Francisco",
"key": API_KEY
}
resp = requests.get(url, params=params)
results = resp.json()["results"]
for place in results:
print(f"Name: {place['name']}")
print(f"Rating: {place.get('rating', 'N/A')}")
print(f"Address: {place['formatted_address']}")
Pricing: $17 per 1,000 requests for basic search, $32 for place details.
Method 2: ScraperAPI for Google Maps
For cost-effective large-scale extraction, ScraperAPI can scrape Google Maps search results.
import requests
API_KEY = "YOUR_SCRAPERAPI_KEY"
query = "plumbers+near+Chicago"
url = f"https://www.google.com/maps/search/{query}/"
resp = requests.get(
f"http://api.scraperapi.com?api_key={API_KEY}&url={url}&render=true"
)
Method 3: Google Maps Search Results
Scraping Google search results with local pack data is often easier than scraping Maps directly.
url = "https://www.google.com/search?q=dentists+near+me&gl=us"
resp = requests.get(f"http://api.scraperapi.com?api_key={API_KEY}&url={url}")
Data Comparison
| Approach | Cost | Data Depth | Reliability |
|---|---|---|---|
| Places API | $17-32/1K | High | Very high |
| ScraperAPI | Lower at scale | Medium | High |
| Direct scraping | Proxy costs | Medium | Low |
Best Practices
- Use the Places API for small volumes, It is reliable and official
- Switch to ScrapingAnt or ScraperAPI for scale, More cost-effective for large datasets
- Geocode your searches, Specify lat/lng for precise local results
- Extract reviews separately, They require additional API calls or page loads
- Store coordinates, Enable geographic analysis and mapping
- Deduplicate by Place ID, Google assigns unique IDs to each business