Start free

How to scrape Google Maps

Pull business names, addresses, ratings, phone numbers and review counts from Google Maps as structured JSON, without wrestling with its single-page app.

Site:
google.com/maps
Difficulty:
Hard
Rendering:
Single-page app
Anti-bot:
Rate limiting, Bot detection, Consent walls

What you can extract from Google Maps

These are the fields teams most often pull from google.com/maps, and why a hand-written selector for each one tends to break over time.

Field Type Why selectors break
name string Maps renders the business name inside a dynamically generated container whose class names are obfuscated and rotated, so any hard-coded selector stops matching after a deploy.
address string The address is shown next to an icon with no stable label, and its position in the panel shifts depending on which business attributes are present.
rating number The numeric rating sits inside an aria-label alongside the review count, forcing fragile string parsing that breaks across languages.
review_count number Review counts are wrapped in parentheses and localized, so the same selector returns "(1,234)", "1.234" or "1,2 mil" depending on the locale.
phone string The phone number only appears after the side panel finishes hydrating, so reading the DOM too early returns nothing.

The schema-first approach

Instead of maintaining selectors, you hand Extracto a JSON schema describing the shape you want. Here is a schema that works for Google Maps:

{
  "name": "string",
  "address": "string",
  "rating": "number",
  "review_count": "number",
  "phone": "string",
  "category": "string"
}
  1. 1

    Describe the Google Maps fields you want

    Write a small JSON schema listing the fields to pull from google.com/maps (for example name, address, rating). No CSS selectors or XPath needed.

  2. 2

    Send the URL and schema to Extracto

    POST the Google Maps page URL and your schema to the Extracto API. Extracto renders the page in a real browser, handling JavaScript and dynamic content automatically.

  3. 3

    Get schema-validated JSON back

    Extracto returns JSON that matches your schema exactly, validated before it leaves the API, so your pipeline never receives broken or partial data.

Common pitfalls when scraping Google Maps

Is it legal to scrape Google Maps?

Google Maps is a single-page application governed by Google's Terms of Service, which restrict automated scraping. Business listing data such as name, address and rating is publicly visible, but reviewer names and review text are personal data and should be handled carefully under GDPR and CCPA. The sanctioned route for most listing data is the official Google Places API. Scrape only public listing fields, respect rate limits, and avoid collecting personal information about reviewers unless you have a clear legal basis.

Extracto follows robots.txt by default and rate-limits politely. You are responsible for compliance with Google Maps's terms and applicable law (GDPR, CCPA) in your use case.

Scraping Google Maps: FAQ

Is scraping Google Maps allowed?
Google's Terms of Service restrict automated scraping, and the official Places API is the sanctioned path for most listing data. Public fields like business name and rating are lower risk than reviewer names and text, which are personal data. Keep volume modest and avoid collecting personal information without a legal basis.
Why is the Google Maps HTML empty when I scrape it?
Maps is a single-page application that loads business data through JavaScript after the page shell arrives, so the raw HTML contains almost no content. You need a browser that executes the app and waits for hydration, which Extracto does before applying your schema.
How do I get past the Google Maps consent screen when scraping?
A real browser session can accept or dismiss the consent interstitial before the listing renders. Extracto runs the page in a managed browser and waits for the business panel to appear, so your schema is applied to the actual listing rather than the consent wall.
Can I extract review text from Google Maps?
Technically the text is visible, but reviewer names and review bodies are personal data under GDPR and CCPA. Prefer aggregate fields like average rating and review count, and if you must process review text, ensure you have a lawful basis and avoid storing identifiers.
Should I use the Google Places API instead of scraping Maps?
For most listing data the Places API is the sanctioned, more stable option and avoids terms-of-service risk. Scraping is mainly useful for fields the API does not expose or for one-off research; if you go that route, keep volume low and stick to public listing attributes rather than personal data.