Google Maps Business Data Extractor avatar

Google Maps Business Data Extractor

Pricing

Pay per usage

Go to Apify Store
Google Maps Business Data Extractor

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

Richard P

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Actor on Apify Store Python

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

FieldTypeRequiredDescription
queriesarrayYesList of search queries. Each item has a search string (required) and optional location string.
maxResultsintegerNoMax businesses to extract per query (default: 50, max: 500).
apiKeystringNoGoogle 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:

FieldTypeDescription
namestringBusiness name
addressstringFull street address
phonestringPhone number
websitestringWebsite URL
ratingnumberStar rating (0.0–5.0)
totalReviewsintegerNumber of reviews
priceRangestringPrice level (e.g., "$", "$$", "$$$")
categoriesarrayBusiness type categories (e.g., ["restaurant", "food"])
latitudenumberLatitude coordinate
longitudenumberLongitude coordinate
hoursarrayOpening hours by day
placeIdstringGoogle Place ID (API mode only)
imagestringImage URL (may be available)
sourcestringData source: "places_api" or "jsonld" / "meta" / "html_body"
scrapedAtstringISO 8601 timestamp of extraction

Usage

Local Development

# Install dependencies
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run with Apify CLI
apify 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

  1. Go to Google Cloud Console
  2. Create a project (or select existing)
  3. Enable the Places API
  4. Create an API key under Credentials
  5. (Optional) Restrict the key to the Places API only
  6. Pass the key as apiKey in the Actor input

License

MIT