Google Maps Business Data Extractor
Pricing
Pay per usage
Google Maps Business Data Extractor
Scrape business names, addresses, phone numbers, websites, emails, reviews, ratings, and opening hours from Google Maps by location and category. Local lead generation tool.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Richard P
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Share
An Apify Actor for extracting business data from Google Maps. Collects business names, addresses, phone numbers, websites, ratings, reviews, opening hours, categories, and coordinates.
Features
- Two extraction modes:
- Google Places API (recommended) — full structured data including hours, photos, coordinates, and price range
- Public HTML scraping — best-effort extraction from Google Maps search pages (JSON-LD, meta tags, embedded state)
- Multi-query support — run multiple searches in a single execution (e.g., "pizza in New York", "dentist in Los Angeles")
- Rate-limited — 2-second delay between requests to avoid rate limiting
- Graceful abort — clean shutdown when stop signal is received
- Apify dataset output — results pushed to dataset as they're collected
Input
| Field | Type | Required | Description |
|---|---|---|---|
queries | array | Yes | List of search queries. Each item has a search string (required) and optional location string. |
maxResults | integer | No | Max businesses to extract per query (default: 50, max: 500). |
apiKey | string | No | Google Places API key. Strongly recommended for full data. When empty, falls back to HTML scraping. |
Example Input
{"queries": [{"search": "pizza", "location": "New York"},{"search": "dentist", "location": "Los Angeles"},{"search": "coffee shop", "location": "Chicago"}],"maxResults": 50,"apiKey": ""}
Output
Each dataset item is a business with these fields:
| Field | Type | Description |
|---|---|---|
name | string | Business name |
address | string | Full street address |
phone | string | Phone number |
website | string | Website URL |
rating | number | Star rating (0.0–5.0) |
totalReviews | integer | Number of reviews |
priceRange | string | Price level (e.g., "$", "$$", "$$$") |
categories | array | Business type categories (e.g., ["restaurant", "food"]) |
latitude | number | Latitude coordinate |
longitude | number | Longitude coordinate |
hours | array | Opening hours by day |
placeId | string | Google Place ID (API mode only) |
image | string | Image URL (may be available) |
source | string | Data source: "places_api" or "jsonld" / "meta" / "html_body" |
scrapedAt | string | ISO 8601 timestamp of extraction |
Usage
Local Development
# Install dependenciespython3 -m venv .venvsource .venv/bin/activatepip install -r requirements.txt# Run with Apify CLIapify run --purge
Deploy to Apify Cloud
$apify push
Limitations
HTML Scraping Mode (without API Key)
Google Maps is a heavily JavaScript-rendered application. The static HTML that httpx fetches contains limited structured data. In HTML mode:
- JSON-LD may be present for featured or nearby businesses, but rarely for all search results
- Meta tags provide basic Open Graph data (usually for a single business)
- Embedded scripts may contain initialization state with some business data
Result: HTML scraping typically finds 0–5 businesses per query. For production use, always provide a Google Places API key.
Places API Mode
- Requires a Google Cloud API key with the Places API enabled
- Free tier: $200/month credit (roughly 40,000 text searches/month)
- API responses are limited to 60 results per query (20 per page, 3 pages max via
next_page_token) - The text search endpoint doesn't return phone numbers or websites directly — those require a follow-up Place Details call
Getting a Google Places API Key
- Go to Google Cloud Console
- Create a project (or select existing)
- Enable the Places API
- Create an API key under Credentials
- (Optional) Restrict the key to the Places API only
- Pass the key as
apiKeyin the Actor input
License
MIT