Method: accounts.locations.batchGetReviews

Returns the paginated list of reviews for all specified locations. This operation is only valid if the specified locations are verified.

HTTP request

POST https://mybusiness.googleapis.com/v4/{name=accounts/*}/locations:batchGetReviews

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

The name of the account from which to retrieve a list of reviews across multiple locations.

Request body

The request body contains data with the following structure:

JSON representation
{
  "locationNames": [
    string
  ],
  "pageSize": number,
  "pageToken": string,
  "orderBy": string,
  "ignoreRatingOnlyReviews": boolean
}
Fields
locationNames[]

string

A collection of locations to fetch reviews for, specified by their names.

pageSize

number

How many reviews to fetch per page. The default value is 200.

pageToken

string

If specified, it fetches the next page of reviews.

orderBy

string

Optional. Specifies the field to sort reviews by. If unspecified, the order of reviews returned will default to updateTime desc. Valid orders to sort by are rating, rating desc and updateTime desc. rating will return reviews in ascending order. updateTime(i.e. ascending order) is not supported.

ignoreRatingOnlyReviews

boolean

Whether to ignore rating-only reviews.

Response body

If successful, the response body contains data with the following structure:

Response message for MyBusiness.BatchGetReviews.

JSON representation
{
  "locationReviews": [
    {
      object (LocationReview)
    }
  ],
  "nextPageToken": string
}
Fields
locationReviews[]

object (LocationReview)

Reviews with location information.

nextPageToken

string

If the number of reviews exceeded the requested page size, this field is populated with a token to fetch the next page of reviews on a subsequent calls. If there are no more reviews, this field will not be present in the response.

Authorization Scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/plus.business.manage
  • https://www.googleapis.com/auth/business.manage

For more information, see the OAuth 2.0 Overview.

LocationReview

Represents a review with location information.

JSON representation
{
  "name": string,
  "review": {
    object (Review)
  }
}
Fields
name

string

Location resource name.

review

object (Review)

A review for the location.