[Home](https://scrapfly.io/)/[Scrapers](https://scrapfly.io/scrapers)/Google Maps

Places · business details · ratings

# // Google Maps Scraper API

Get the places of a Google Maps search, and each place's name, category, address, phone, website, star rating and review counts, as clean JSON. Each request renders the Maps page in a browser, so you send the URL and read the place.

- **Clone it and run it.** An open-source Google Maps scraper that finds the places of a search and scrapes each place's details and ratings, tested against live Google Maps every night.
- **Every star level, not just the average.** Each place comes with its average rating, its review count and its number of reviews at each star level, from 5 down to 1.
 
 [Get free API key](https://scrapfly.io/register) [View GitHub scraper](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) [Read JavaScript rendering docs](https://scrapfly.io/docs/scrape-api/javascript-rendering) 

1,000 free credits. No credit card required.

 [  ](https://scrapeway.com/web-scraping-api/scrapfly) [  ](https://www.capterra.com/p/212653/Scrapfly/reviews/)  

 4.8/5 from 248 reviews 

 

 

 

 

 Google Maps place · illustration

 

 

 Place JSON**Output**

```
{
  <span class="c-str">"name"</span>: <span class="c-str">"Musée d'Orsay"</span>,
  <span class="c-str">"category"</span>: <span class="c-str">"Art museum"</span>,
  <span class="c-str">"website"</span>: <span class="c-str">"musee-orsay.fr"</span>,
  <span class="c-str">"phone"</span>: <span class="c-str">"+33 1 40 49 48 14"</span>,
  <span class="c-str">"review_count"</span>: <span class="c-str">"118,439 reviews"</span>,
  <span class="c-str">"stars"</span>: <span class="c-str">"4.8"</span>,
  <span class="c-str">"5_stars"</span>: <span class="c-str">"98229"</span>,
  <span class="c-str">"1_stars"</span>: <span class="c-str">"1327"</span>
}
```

Sample output of the open-source scraper[See the request ↓](#implementation)

  

What you can scrape from Google Maps

Four kinds of Google Maps data you can scrape with Scrapfly, from public search and place pages, no Google Cloud project required.

 

## // Scrape Google Maps search results

Send a search such as *museum in paris* and get the links of the places in its results list. The scraper opens `/maps/search/museum+in+paris/` with `hl=en`, reads the list's links once it has loaded and keeps the `/maps/place/` ones: 16 on its sample run.

- find\_google\_map\_places
- query
- /maps/search/
- /maps/place/

  

## // Scrape Google Maps place details

A place page gives the business name, its category, street address, website and phone number. The scraper reads most of them from the page's accessibility labels, such as *Address:* and *Phone:*, and returns null for a label the place does not have, such as a phone.

- name
- category
- address
- website
- phone

  

## // Scrape Google Maps ratings and review counts

Each place comes with its average star rating, its review count and the number of reviews at each star level. On the sample run, the five counts add up to the review count of each place: 118,439 for the Musée d'Orsay, 98,229 of them 5 stars.

- stars
- review\_count
- 5\_stars
- 4\_stars
- 3\_stars
- 2\_stars
- 1\_stars

  

## // Get the coordinates of each place

Each place link of the sample run carries the place's latitude after `!3d` and its longitude after `!4d`, as in `!3d48.8599614!4d2.3265614` for the Musée d'Orsay. The scraper does not parse them: read them from the link to map the places without geocoding them.

- !3d
- !4d
- /maps/place/

  



Reliability

## // Get Google Maps pages rendered, in English

Google Maps builds its pages with JavaScript, and the place details sit in English labels the parser matches. The open-source scraper renders every page in a browser, asks for the English interface, and turns the Unblocker on for its place pages.

`render_js=true`

Every request of the scraper renders the page in a browser and waits for a selector to show before the HTML comes back.



`hl=en`

The parser matches English labels such as *Address:* and *Phone:*, so the scraper's URLs ask Google Maps for English.



`unblocker=true`

Scrapfly's [Unblocker](https://scrapfly.io/products/unblocker) (formerly ASP) on every place page, with `country=US`, as in the scraper's settings.



 



Choose your tools

## // Scrapfly products for Google Maps scraping

Start with the Web Scraping API and JavaScript rendering. Add the organization extraction model, screenshots, a browser session or a URL-list crawl as your workflow needs them. One API key covers all five products.

 

### Web Scraping API for Google Maps

Send a Maps search or place URL with JavaScript rendering on, and get the rendered page back as HTML.

The scraper reads the place links from a search page and the details from each place page, with the Unblocker on for place pages.

```
GET /scrape?url=https://www.google.com/maps/search/museum+in+paris/?hl=en&render_js=true&country=US
```

 [Explore Web Scraping API →](https://scrapfly.io/products/web-scraping-api)  

### Data Extraction API for Google Maps places

Set `extraction_model` to `organization` to get a place page back as structured JSON, with no parser to write.

The schema has the organization's name, industry, address with its postal code, city and country, phone, website, average rating, review count and reviews.

```
GET /scrape?url=https://www.google.com/maps/place/Mus%C3%A9e+d%27Orsay/data=!4m7!3m6!1s0x47e66e2bb630941b:0xd071bd8cb14423d8!8m2!3d48.8599614!4d2.3265614!16zL20vMGYzYjk!19sChIJG5Qwtitu5kcR2CNEsYy9cdA?authuser=0%26hl=en%26rclk=1&render_js=true&unblocker=true&country=US&extraction_model=organization
```

 [Explore Data Extraction API →](https://scrapfly.io/products/extraction-api)  

### Screenshot API for Google Maps pages

A capture of a Maps search or place page as the browser renders it, at the resolution you set.

Keep a dated visual record of the places and their ratings next to your JSON.

```
GET /screenshot?url=https://www.google.com/maps/search/museum+in+paris/?hl=en&country=us&resolution=1920x1080&rendering_wait=3000&format=png
```

 [Explore Screenshot API →](https://scrapfly.io/products/screenshot-api)  

### Cloud Browser API for Google Maps sessions

Connect Playwright or Puppeteer to a hosted Chromium on a proxy in the country you choose.

Open a Maps search, wait for its results list and read the place links, as the scraper's script does in the Web Scraping API's browser.

```
chromium.connect_over_cdp("wss://browser.scrapfly.io?api_key=KEY&country=us")
```

 [Explore Cloud Browser API →](https://scrapfly.io/products/cloud-browser-api)  

### Crawler API for lists of Google Maps URLs

Submit the place links of your searches as one bounded job, with a `rendering_delay` so each page renders in a browser, and the [Unblocker](https://scrapfly.io/products/unblocker) (formerly ASP) applied to every URL.

Ask for HTML output and parse each place after the job finishes.

- url\_list
- rendering\_delay
- unblocker
- country
- content\_formats

 [Explore Crawler API →](https://scrapfly.io/products/crawler-api)  



One request

## // Scrape a Google Maps place and read its ratings

The JSON at the top is cut from the sample output the open-source scraper saved for three Paris museums, `results/google_map_places.json`: the Musée d'Orsay's place, eight of its twelve fields. This code is a cut-down version of the scraper's request and parser for that place page: rendered in a browser, Unblocker on, from the US.

Install `scrapfly-sdk` and `parsel`, which `result.selector` uses, then replace the key below. Swap the URL for any place link a Maps search returns.

**Prefer the full scraper?** The open-source [Google Maps scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) finds the place links of a Maps search and scrapes each place's details, rating and review counts, in Python 3.12. It runs against live Google Maps every night. Clone it, set `SCRAPFLY_KEY`, and run `poetry run python run.py`, which also runs its Google Search examples: that half of the scraper has [a page of its own](https://scrapfly.io/scrapers/google).

 

  Python · scrapfly-sdkscrape + parse

```
<span class="c-key">import</span> json
<span class="c-key">from</span> scrapfly <span class="c-key">import</span> ScrapeConfig, ScrapflyClient

client = ScrapflyClient(key=<span class="c-str">"YOUR_SCRAPFLY_KEY"</span>)
url = (<span class="c-str">"https://www.google.com/maps/place/Mus%C3%A9e+d%27Orsay/"</span>
       <span class="c-str">"data=!4m7!3m6!1s0x47e66e2bb630941b:0xd071bd8cb14423d8"</span>
       <span class="c-str">"!8m2!3d48.8599614!4d2.3265614!16zL20vMGYzYjk"</span>
       <span class="c-str">"!19sChIJG5Qwtitu5kcR2CNEsYy9cdA?authuser=0&hl=en&rclk=1"</span>)
result = client.scrape(ScrapeConfig(
    url,
    unblocker=<span class="c-key">True</span>,  <span class="c-com"># previously asp</span>
    country=<span class="c-str">"US"</span>,
    render_js=<span class="c-key">True</span>,
    <span class="c-com"># the scraper's browser steps before it reads the page</span>
    js_scenario=[
        {<span class="c-str">"click"</span>: {<span class="c-str">"selector"</span>: <span class="c-str">"button[aria-label='Search']"</span>}},
        {<span class="c-str">"wait_for_selector"</span>: {<span class="c-str">"selector"</span>:
            <span class="c-str">"//button[contains(@jsaction, 'reviewlegaldisclosure')]"</span>}},
    ],
))
sel = result.selector

<span class="c-key">def</span> label(text):
    <span class="c-str">"""the accessibility labels that contain text"""</span>
    <span class="c-key">return</span> sel.css(<span class="c-str">f"*[aria-label*='{text}']::attr(aria-label)"</span>)

<span class="c-key">def</span> after(text):
    <span class="c-str">"""what a label says after text, None when the place has none"""</span>
    found = label(text).get(<span class="c-str">""</span>)
    <span class="c-key">if</span> text <span class="c-key">not in</span> found:
        <span class="c-key">return</span> <span class="c-key">None</span>
    <span class="c-key">return</span> found.split(text, <span class="c-num">1</span>)[<span class="c-num">1</span>].strip()

place = {
    <span class="c-str">"name"</span>: <span class="c-str">""</span>.join(sel.css(<span class="c-str">"h1::text"</span>).getall()).strip(),
    <span class="c-str">"category"</span>: sel.xpath(
        <span class="c-str">"//button[contains(@jsaction, 'category')]/text()"</span>).get(),
    <span class="c-str">"address"</span>: after(<span class="c-str">"Address: "</span>),
    <span class="c-str">"website"</span>: after(<span class="c-str">"Website: "</span>),
    <span class="c-str">"phone"</span>: after(<span class="c-str">"Phone: "</span>),
    <span class="c-str">"review_count"</span>: label(<span class="c-str">" reviews"</span>).get(),
    <span class="c-str">"stars"</span>: label(<span class="c-str">" stars"</span>).re(<span class="c-str">r"\d+.*\d+"</span>)[<span class="c-num">0</span>],
}
<span class="c-com"># star rows read "5 stars, 95,576 reviews": keep the count's digits</span>
<span class="c-key">for</span> n <span class="c-key">in</span> range(<span class="c-num">5</span>, <span class="c-num">0</span>, -<span class="c-num">1</span>):
    place[<span class="c-str">f"{n}_stars"</span>] = label(<span class="c-str">f"{n} stars"</span>).re(
        <span class="c-str">r"([\d,]+) review"</span>)[<span class="c-num">0</span>].replace(<span class="c-str">","</span>, <span class="c-str">""</span>)
print(json.dumps(place, indent=<span class="c-num">2</span>, ensure_ascii=<span class="c-key">False</span>))
```

 

 



What the data is used for

## // Common Google Maps scraping use cases

### Local lead lists

Collect the name, phone number, website and address of the places a search returns for a category in a city.



### Rating tracking

Watch the average rating and review count of your locations and of the places listed beside them.



### Reputation monitoring

Follow the number of reviews at each star level and spot a rise in 1-star reviews early.



### Market research

Compare the places of one category in a city by rating and review count before you open or expand.



### Directory and CRM enrichment

Fill in the missing phones, websites, addresses and categories of the businesses you already track.



### Place maps

Plot the places of a search from the coordinates in their links, with no geocoding step.



 



Common questions

## // Google Maps scraping FAQ

 Is scraping Google Maps legal?

There is no universal answer. Legality depends on your jurisdiction, the data, the access method and how you use the result. Keep the workflow to public search and place pages, stay signed out, treat personal data such as the names attached to reviews under privacy rules like the GDPR, review Google's terms of service, and get legal advice for commercial use.

 Does Google Maps have an API?

Yes. Google's Places API returns place data, such as search results and place details, and bills it pay-as-you-go, by the method and the fields each request asks for. To use it, you enable billing on a Google Cloud project and send an API key or OAuth token with every request. These requests read the public Google Maps pages instead, so you need a Scrapfly API key, not a Google Cloud project.

 Can I scrape Google Maps reviews?

The open-source scraper returns each place's average star rating, its review count and the number of reviews at each star level, from 5 down to 1: for the Musée d'Orsay, 4.8 stars from 118,439 reviews, 98,229 of them 5 stars. The text of individual reviews is not part of its output.

 How many places does a Google Maps search return?

The scraper opens the search URL, waits for its results list, gives the list up to 5 seconds to show 10 links, then keeps the place links among the links it shows. Its sample run returned 16 place links for *museum in paris*.

 How do I get the coordinates of a place?

Read them from its link. In the place links of the sample run, the latitude follows `!3d` and the longitude follows `!4d`: `!3d48.8599614!4d2.3265614` for the Musée d'Orsay. The scraper does not parse them, so take them from the link with a regular expression.

 Can I scrape Google Maps from another country?

Yes. Set `country` to the proxy country you want, among 75+ countries: the scraper sends its requests from the US with `country=US`. With the Unblocker on, the country you set is kept unless the website refuses visitors from it, and the country that served the request is in the response, under `context.proxy.country`. Keep `hl=en` on the URL when your parser reads English labels, as the scraper's does.

 How much does scraping Google Maps cost?

A Google Maps page fetched as the scraper fetches it, rendered in a browser on the default datacenter proxies, costs 6 credits: 1 for the request and 5 for the browser, which includes 3 MB of bandwidth. Its place pages also turn the Unblocker on, which has no flat fee: a protected target can add its own fee and move the request to residential proxies, at 30 credits with the browser, and the scrape log shows the pool and the cost. The organization extraction model adds 5 credits, and 5 more for each 500 KB of page past the first 500 KB. A Screenshot API capture costs 60 credits by default. The Free plan includes 1,000 credits a month.

 What are the rate limits when scraping Google Maps?

Your maximum parallelism is the concurrency quota of your plan, from 5 requests at once on the Free plan to 100 on Enterprise, or a lower limit set on the project. Each request counts against it while it is in flight, and the scraper sends its place pages concurrently.

 



Start with one request

## Send the URL. Read the place.

Web Scraping API with JavaScript rendering, one call per Google Maps search or place URL.

Proxies across 75+ countries

 [Google Maps scraper on GitHub](https://github.com/scrapfly/scrapfly-scrapers/tree/main/google-scraper) [How to scrape Google Maps](https://scrapfly.io/blog/posts/how-to-scrape-google-maps) [Google Search Scraper API](https://scrapfly.io/scrapers/google) [All scraper pages](https://scrapfly.io/scrapers) 

 

 [Get free API key](https://scrapfly.io/register) [Read the docs](https://scrapfly.io/docs/scrape-api/javascript-rendering)