> ## Content Index
> Fetch the complete content index at: https://serpapi.com/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Scrape Google Maps Business Reviews with SerpApi's Google Sheets Extension [No Code]
- URL: https://serpapi.com/blog/scrape-google-maps-business-reviews-with-serpapis-google-sheets-extension-no-code/
- Published: 2024-08-23T21:22:09.000Z
- Updated: 2024-08-27T16:28:10.000Z
- Description: A step by step tutorial on how to use SerpApi to scrape user ratings and reviews from any business on Google Maps without any coding required.
- Author: Sonika Arora
- Tags: Google Maps, No Code, Tips&Tricks

## Introduction

This tutorial will teach you how to use SerpApi's [Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api) for getting user reviews for a business on Google Maps using the SerpApi Google Sheets Extension. 

If you would like, you can find the [entire google sheet we will be creating here](https://docs.google.com/spreadsheets/d/1gX94nYDs8TkLPWly4PJoZtVt067K1hsbSpRV1-Z5snw/edit?usp=sharing), and follow along to dive deeper into the details.

## Getting started

To begin extracting business reviews data, first, create a [free account on serpapi.com](https://serpapi.com/users/sign%5Fup). You'll receive one hundred free search credits each month to explore the API.

Next, install the [SerpApi extension](https://workspace.google.com/marketplace/app/serpapi%5Fsearch%5Fengine%5Fresults%5Fand%5Franks/562749385480) in Google Sheets. Simply go to Google Sheets, navigate to Extensions -> Add-ons -> Get add-ons, and search for 'SerpApi - Search Engine Results and Ranks'.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXd2BfGV-Wtou41fLp_tKm7Ke8NiWb1rxOJm0GBBeN3gztIKtRF-5Xh38xhkYCZIyUg9kh89Zbajbyqz_GYTIzgiB1C0m1lpWGqLaf5Be3LvKkUyLN-DkT6pIfmdiH8BRlODDuyQt1uIstqqoKkktEwRiOw?key=cz-UuSQm2tPlf14MWlhSQQ)

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfqdqsUkFU6tM9iOHfBlALjkNb-zOOwdmbvCfEj-4yMOS4xGx9upJyPDgPob5jOGYeghKlBshAF6DdgZDlewwSMY6tUdTcgXn-9BNuXWE4vsPaB8GOr8qLkVtMOLq8qr6-x55uNYY6x7jaLRBvVwLQAmao?key=cz-UuSQm2tPlf14MWlhSQQ)

After you install the add-on, you will be asked to connect your SerpApi account with it. You can get your API key here: <https://serpapi.com/manage-api-key>.

After adding that, you can start exploring SerpApi Google Sheets add-on capabilities.

## Google Maps Reviews API Details and Parameters

To get the reviews for a business listing, we will be using [Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api). I recommend heading to our [playground](https://serpapi.com/playground?engine=google%5Fmaps%5Freviews&data%5Fid=0x8644cd7fdc1bf17b%3A0x1eb1b9a3fe5dab90&hl=en), where you can test all the parameters and see what works best for you.

### Parameters 

`engine`: Set parameter to `google_maps_reviews` to use the Google Maps Reviews API engine.

`data_id`: Parameter defines the Google Maps data ID. Find the data ID by using our [Google Maps API](https://serpapi.com/google-maps-api) \[More on how to get this below\].

`api_key`: Parameter defines the SerpApi private key to use.

`sort_by`: Parameter is used for sorting and refining results. 

Available options:

- `qualityScore` \- the most relevant reviews (default).
- `newestFirst` \- the most recent reviews.
- `ratingHigh` \- the highest rating reviews.
- `ratingLow` \- the lowest rating reviews.

`topic_id`: Parameter defines the ID of the topic you want to use for filtering reviews. You can access IDs inside our structured JSON response \[More on how to get this below\].

There are a couple more parameters that can be used. You can check them all in our documentation, but we will focus on the essential ones.

### Expected Output

The API gives results in JSON format. The output includes JSON structured data for place information, topics, and reviews results.

A search status is accessible through `search_metadata.status`. 

> It flows this way: Processing -> Success || Error

If a search has failed, the error will contain an error message. `search_metadata.id` is the search ID inside SerpApi.

## Basics of SerpApi's Google Sheets Extension

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfo26H38nDRHS8C46fGV65DiViwYqfXFe5IyZ3GJatFw0wpgLrgRd9KVIhslFuRwYG1aG12w2s32PcLYszyS3VaauR_Z22e-7_GnYYYuywqbxeQLD8m995qCl2haiUsftwTEMYgQCk2R7BHnYzqQac0ca4?key=cz-UuSQm2tPlf14MWlhSQQ)

You will notice that the API request is composed of two separate elements - the query and the selector.

![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXfD-DYSJL3PJ8V3T_wC4YT3M_BanAR5kxqMm3Xg1OdXLQNXIqBjOJ8RyKdUj9zXZU1xmV6oIOrqWNV5iARjfuJ9mhfHJdwQzKTxA1n_tVYpeAm8lC-jZaf1ItCuoZSJX-D1sgV-XLNdxFbaz1tUYFGffds?key=cz-UuSQm2tPlf14MWlhSQQ)

You can think of Query as the parameters that make the search page and Selector as the location in the JSON file where to find the bit of data you are looking for.

For the rest of the review results, you will change 0 in the Selector part to 1, 2, and so on. 

An alternate way to build the query is by heading to our [playground](https://serpapi.com/playground?engine=google%5Fmaps%5Freviews&data%5Fid=0x8644cd7fdc1bf17b%3A0x1eb1b9a3fe5dab90&hl=en), and searching with the relevant parameter values (for example, if you wish to sort or filter by topic), and then using the 'Export to Code' option as demonstrated below:

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-22-at-11.59.36-AM-Large.jpeg)

If you decide to go with this method, please note that the selector part of the `SERPAPI_RESULT` function will not be generated correctly, so you may need to change that according to the data you want to get in a particular cell in the Google Sheet.

## Extract Business Reviews in Google Sheets

For this example, we will focus on extracting reviews for LifeTime Health Club in Austin, TX. 

First - we need the `data_id` in order to get the reviews for a given business. So if we want to get all the reviews for the LifeTime Health Club in Austin, TX, we first need to use the [Google Maps API](https://serpapi.com/google-maps-api) and [search](https://serpapi.com/playground?engine=google%5Fmaps&q=Life+Time+Health+Club+in+Austin%2C+TX&hl=en&type=search) for LifeTime Health Club. Let's do this in our [playground](https://serpapi.com/playground?engine=google%5Fmaps&q=Life+Time+Health+Club+in+Austin%2C+TX&hl=en&type=search).

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-2.03.13-PM.png)

Scroll down in the JSON output and find the relevant result, then get the `data_id` for it. 

Now we can go to Google Maps Reviews API in the playground, and [search](https://serpapi.com/playground?engine=google%5Fmaps%5Freviews&data%5Fid=0x8644cd7fdc1bf17b%3A0x1eb1b9a3fe5dab90&hl=en) using the `data_id`:

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-2.30.20-PM.png)

This should give you a good visualization of the fields that are present in the response.

Second - you must decide what parts of the JSON response you need, and create a table with a header for each element. In this example, I am going to extract two parts of the result:

1. Metadata about the place

This includes: `title`, `address`, `rating`, `reviews`, `type`

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-2.47.32-PM.png)

1. Reviews Data

This includes: `Index`, `iso_date_of_last_edit`, `User.Name`, `Rating`, `Snippet`, `Review_id`, `Likes`, `Link`, `Response`, `Response.Snippet`, `Response.iso_date`

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-2.47.17-PM.png)

The `Index` variable helps in referencing each result in our function. The other columns are the different parts of each review we wish to obtain.

I will elaborate more below on how to retrieve reviews after sorting and filtering them in different ways from our API.

### Extract the Metadata

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-2.06.32-PM.png)

To get the different parts of this metadata about the place, we will use the `SERPAPI_RESULT` function in Google Sheets along with the `engine` and `data_id` parameters. This information about a place is part of the `place_info` part of the JSON response. We will need to query for each item (`title`, `address`, etc.) individually.

Our query for title for will look something like this:

```google
=SERPAPI_RESULT("engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90", "place_info.title")
```

You can see that some variables can be replaced with the data from the Google Sheet cells, which will be used repeatedly (example: `data_id` and the parameter name). Below you can see the updated function for the title. 

```google
=SERPAPI_RESULT("engine=google_maps_reviews" & "&data_id=" & B2, "place_info." & A5)
```

You can adjust the selector part of the function to get the other metadata information.

For example, for extracting the overall rating, you can use `place_info.rating` as the selector.

### Get The Most Recent Reviews 

You can sort reviews by navigating to the reviews section on the Google Maps for LifeTime Health Club and clicking on "Sort By". This will display the available options to sort by. 

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-5.48.18-PM-1.png)

Corresponding options for the `sort_by` parameter in our Google Maps Reviews API are the following:

- `qualityScore` \- the most relevant reviews (default).
- `newestFirst` \- the most recent reviews.
- `ratingHigh` \- the highest rating reviews.
- `ratingLow` \- the lowest rating reviews.

To get the most recent reviews, we need to use the `sort_by` parameter with value `newestFirst`.

We have already set up our columns: `Index`, `iso_date_of_last_edit`, `User.Name`, `Rating`, `Snippet`, `Review_id`, `Likes`, `Link`, `Response`, `Response.Snippet`, `Response.iso_date`.

Our query for `iso_date_of_last_edit` for the first review will look something like this:

```google
=SERPAPI_RESULT("engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&sort_by=newestFirst", "reviews.0.iso_date_of_last_edit")
```

💡

Note: The reviews are indexed 0,1,2,3\. The first review is at index 0\. 

You can see that some variables can be replaced with the data from the Google Sheet cells, which will be used repeatedly (example: `data_id`, `Index`, parameter names). Below you can see the updated function for the `iso_date_of_last_edit` for the first review: 

```google
=SERPAPI_RESULT("engine=google_maps_reviews" & "&data_id=" & B2 & "&sort_by=" & B13, "reviews." & A16 & "." & LOWER(B15))
```

The columns `Index`, `iso_date_of_last_edit`, `User.Name`, `Rating`, `Review_id`, `Likes`, and `Link` are available for all reviews, so the method above works. However, not all reviews may have a snippet (text along with the rating), or a response from the owner. In that case, if you try to get those fields with the function above, it may throw this error because the field does not exist in the JSON response:

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-4.02.35-PM.png)

For columns, `Snippet`, `Response`, `Response.Snippet`, `Response.iso_date`, we should add a conditional statement to look for this error and populate the cell in the table appropriately with a relevant message such as "Field does not exist".

For extracting the snippet, this looks like: 

```google
=IF(
    IFERROR(
        SEARCH(
            "Oops field is not found", 
            SERPAPI_RESULT(
                "engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&sort_by=newestFirst", "reviews.0.snippet"
            )
        ), 
        0
    ) = 1, 
    "No review provided, only rating given by the reviewer", 
    SERPAPI_RESULT(
        "engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&sort_by=newestFirst", "reviews.0.snippet"
    )
)
```

What does this do?

- This function checks if the review `snippet` field is missing or not found by searching for the error message `"Oops field is not found"`.
- If the error message is found, it means only a rating (and no text review) was provided, so the function returns `"No review provided, only rating given by the reviewer"`.
- If the error message is not found, it means the desired review field exists, so the function returns the actual review data fetched by the `SERPAPI_RESULT` function.

Let's dive deeper into how this works.

- **SEARCH Function**
  - The `SEARCH` function looks for the substring `"Oops field is not found"` within the result returned by `SERPAPI_RESULT`.
  - This substring is returned by the API when a specific field (like the snippet) is missing or not found.
- **IFERROR Function**
  - `IFERROR` handles any potential errors that might occur in the `SEARCH` function. If `SEARCH` fails (e.g., because the field is missing), it returns `0` instead of an error.
  - If `SEARCH` finds `"Oops field is not found"` in the API response, it will return the position of the substring (which is `1` since it's at the beginning). If it doesn't find the substring, `SEARCH` returns an error, and `IFERROR` then returns `0`.
- **IF Statement**
  - The `IF` function checks whether the `IFERROR(SEARCH(...))` result equals `1`.
    - If **true** (meaning the `"Oops field is not found"` message was detected), it returns the string `"No review provided, only rating given by the reviewer"`.
    - If **false** (meaning the search didn't find the snippet), it runs `SERPAPI_RESULT` to fetch the actual data from the API and returns that result.

Similarly, we can form a function to check if there is an owner's response snippet and get that field in the Google Maps Reviews data:

```google_sheet
=IF(
    IFERROR(
        SEARCH(
            "Oops field is not found", 
            SERPAPI_RESULT(
                "engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&sort_by=newestFirst", "reviews.0.response.snippet"
            )
        ), 
        0
    ) = 1, 
    "No response from owner", 
    SERPAPI_RESULT(
        "engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&sort_by=newestFirst", "reviews.0.response.snippet"
    )
)

```

- It uses `SEARCH` to look for the phrase `"Oops field is not found"` in the data fetched by `SERPAPI_RESULT`.
- If the error message is found (meaning the owner's response snippet is missing), it returns `"No response from owner"`.
- If the message isn’t found, it returns the owner’s response snippet fetched by the API.

Following the example above for other columns, you now have a complete list of extracted parameters for the most recent review for a business. To retrieve results for following reviews, copy the function and paste it into the rows below the first one and increment the index. 

### Get Reviews Filtered By Topic

You can filter reviews by topic in the reviews section on the Google Maps page for LifeTime Health Club by clicking on one of the topic options present there.

![](https://storage.ghost.io/c/a5/00/a5004977-0dd2-4bcd-9292-dd0e05d4c59e/content/images/2024/08/Screenshot-2024-08-19-at-5.48.31-PM-1.png)

To get the most recent reviews, we need to use the `topic_id` parameter.

First, use the playground to make a [query](https://serpapi.com/playground?engine=google%5Fmaps%5Freviews&data%5Fid=0x8644cd7fdc1bf17b%3A0x1eb1b9a3fe5dab90&hl=en) to the [Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api) for the place, and find a `topic_id` for the topic you are interested in getting reviews for. 

The `topic_id` will look something like this: `/m/0f3yyn` (for Amenities)

We can create a new table for collecting reviews for a particular topic. We will use the same columns as before: `Index`, `iso_date_of_last_edit`, `User.Name`, `Rating`, `Snippet`, `Review_id`, `Likes`, `Link`, `Response`, `Response.Snippet`, `Response.iso_date`.

For example, our query for `iso_date_of_last_edit` for the first review will look something like this:

```google
=SERPAPI_RESULT("engine=google_maps_reviews" & "&data_id=0x8644cd7fdc1bf17b:0x1eb1b9a3fe5dab90" & "&topic_id=/m/0f3yyn", "reviews.0.iso_date_of_last_edit")
```

We can use the same kind of queries as in the earlier example, and just add `"&topic_id=<insert_topic_id>"` to filter by topic, and remove the sorting parameter if it is not needed.

Following the example above for other columns, you now have a complete list of extracted parameters for the most recent review for a business. To retrieve results for following reviews, copy the function and paste it into the rows below the first one and increment the index. 

💡

For getting more than 10 reviews, you will need to use the pagination parameter `next_page_token` to extract the next page of review results. For more details on how to implement this, please refer to the [Pagination section on the Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api#api-parameters-pagination). 

## Conclusion

We've covered how to scrape business reviews with [Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api) in a no-code way using the SerpApi Google Sheet Extension. 

You can find the full Google Sheets example I used for this blog post in [this Google Sheet](https://docs.google.com/spreadsheets/d/1gX94nYDs8TkLPWly4PJoZtVt067K1hsbSpRV1-Z5snw/edit?usp=sharing). 

I hope you found this tutorial helpful and straightforward. If you have any questions, don't hesitate to reach out to me at sonika@serpapi.com.

## Relevant Links

#### Documentation

- [Google Sheet with Complete Example](https://docs.google.com/spreadsheets/d/1gX94nYDs8TkLPWly4PJoZtVt067K1hsbSpRV1-Z5snw/edit?usp=sharing)
- [Google Maps API](https://serpapi.com/google-maps-api)
- [Google Maps Reviews API](https://serpapi.com/google-maps-reviews-api)

#### Related Posts

- [Getting Google Maps Business Listing with SerpApi Google Sheets Extension](https://serpapi.com/blog/getting-google-maps-business-listing-with-serpapi-google-sheets-extension/)
- [Scraping Google Maps with SerpApi - an Overview of the Google Maps API](https://serpapi.com/blog/scraping-business-reviews-from-google-maps-with-serpapi/)
- [No-Code Google Maps API Reviews Scraping with SerpApi Video](https://www.youtube.com/watch?v=9LParwDBaTQ)
- [Scraping Google Maps Place Reviews Results using SerpApi](https://serpapi.com/blog/using-google-maps-reviews-api-from-serpapi/)