Google Business PerformanceAPI has aNEWAPI method that allows fetching multiple `DailyMetrics` in a single API request. Review thedeprecation scheduleand instructions to migrate over from v4 reportInsights API method to Google Business Profile Performance API.
Stay organized with collectionsSave and categorize content based on your preferences.
This tutorial shows you how to list, return, reply, and delete a review. The
Google My Business API provides you with the ability to work with review data to
perform the following operations:
Before you use the Google My Business API, you need to register your
application and obtain OAuth 2.0 credentials. For details on how to get started
with the Google My Business API, seeBasic setup.
List all reviews
List all reviews of a location to audit reviews in bulk. Use theaccounts.locations.reviews.listAPI to return all of the reviews associated with a location.
To return all reviews associated with a location, use the following:
HTTP
GET
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews
Java
The following function usesMybusiness.Accounts.Locations.Reviews.List.
/*** Returns a list of reviews.* @param locationName Name of the location to retrieve reviews for.* @return List<Reviews> A list of reviews.* @throws Exception*/publicstaticList<Review>listReviews(StringlocationName)throwsException{Mybusiness.Accounts.Locations.Reviews.ListreviewsList=mybusiness.accounts().locations().reviews().list(locationName);ListReviewsResponseresponse=accountsList.execute();List<Reviews>reviews=response.getReviews();for(Reviewsreview:reviews){System.out.println(review.toPrettyString());}returnreviews;}
Get a specific review
Return a specific review by name. Use theaccounts.locations.reviews.getAPI to return a specific review associated with a location.
To return a specific review, use the following:
HTTP
GET
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}
Java
The following function usesMybusiness.Accounts.Locations.Reviews.Get.
/*** Demonstrates getting a review by name.* @param reviewName The name (resource path) of the review to retrieve.* @return Account The requested review.*/privatestaticReviewgetReview(StringreviewName)throwsException{Mybusiness.Accounts.Locations.Reviews.Getreview=mybusiness.accounts().locations().reviews().get(reviewName);Reviewresponse=review.execute();returnresponse;}
Additional data
The Java Client Library gives you access to additional field data for review
instances. Use the following methods to return additional data about reviews:
getReviewId()
getComment()
getReviewer()
getStarRating()
getCreateTime()
getReviewReply()
Get reviews from multiple locations
Get reviews from multiple locations. Use theaccounts.locations.batchGetReviewsAPI to return reviews from multiple locations in a single request.
To return reviews from multiple locations, use the following:HTTP
Reply to a specific review, or create a new reply if one doesn't exist. Use theaccounts.locations.reviews.updateReplyAPI to reply to a specific review associated with a location.
To reply to a specific review, use the following:
HTTP
PUT
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/reply
{
comment: "Thank you for visiting our business!"
}
Java
The following function usesMybusiness.accounts.locations.reviews.reply.
/** Updates the reply for a location review.* If a review does not exist, creates a new one.* @param reviewName Name of the review being responded to.* @param comment A string containing the review response body.* @throws IOException*/privatestaticReplyreply(StringreviewName,Stringcomment)throwsIOException{MyBusiness.Accounts.Locations.Reviews.Replyreply=mybusiness().accounts().locations().reviews().reply(reviewName,comment);Replyresponse=reviewReply.execute();returnresponse;}
Delete a review reply
Delete a reply to a specific review. Use theaccounts.locations.reviews.deleteReplyAPI to delete a reply to a specific review associated with a location.
To delete a specific reply to a review, use the following:
The following function usesMybusiness.Accounts.Locations.Reviews.DeleteReply.
/*** Demonstrates deleting a review reply by name.* @param reviewName The name (resource path) of the review reply to delete.* @return Account The requested review.*/privatestaticDeleteReplydeleteReply(StringreviewName)throwsException{Mybusiness.Accounts.Locations.Reviews.DeleteReplytoDelete=mybusiness.accounts().locations().reviews().deleteReply(reviewName);DeleteReplyresponse=toDelete.execute();returnresponse;}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis tutorial demonstrates how to interact with Google My Business reviews, including listing, retrieving, replying to, and deleting them using the Google My Business API.\u003c/p\u003e\n"],["\u003cp\u003eYou can manage reviews for individual or multiple locations, retrieve specific review details (like comment, rating, reviewer), and programmatically reply to or delete review responses.\u003c/p\u003e\n"],["\u003cp\u003eBefore using the API, ensure your application is registered and has obtained OAuth 2.0 credentials, and for reply functionality, your G Suite administrator has enabled the necessary Google services.\u003c/p\u003e\n"],["\u003cp\u003eThe tutorial provides code samples in Java and HTTP request formats for various review operations.\u003c/p\u003e\n"],["\u003cp\u003eAdditional data fields are accessible through the Java Client Library for more detailed review information.\u003c/p\u003e\n"]]],[],null,["# Work with review data\n\n\u003cbr /\u003e\n\nThis tutorial shows you how to list, return, reply, and delete a review. The\nGoogle My Business API provides you with the ability to work with review data to\nperform the following operations:\n\n- [List all reviews](#list_all_reviews).\n- [Get a specific review](#get_a_specific_review).\n- [Get reviews from multiple locations](#get_reviews_from_multiple_locations).\n- [Reply to a review](#reply_to_a_review).\n- [Delete a review reply](#delete_a_review_reply).\n\nBefore you begin\n----------------\n\nBefore you use the Google My Business API, you need to register your\napplication and obtain OAuth 2.0 credentials. For details on how to get started\nwith the Google My Business API, see\n[Basic setup](/my-business/content/basic-setup).\n\nList all reviews\n----------------\n\nList all reviews of a location to audit reviews in bulk. Use the\n[accounts.locations.reviews.list](/my-business/reference/rest/v4/accounts.locations.reviews/list)\nAPI to return all of the reviews associated with a location.\n\nTo return all reviews associated with a location, use the following:\nHTTP \n\n```\nGET\nhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews\n```\nJava\n\nThe following function uses `Mybusiness.Accounts.Locations.Reviews.List`. \n\n```java\n/**\n * Returns a list of reviews.\n * @param locationName Name of the location to retrieve reviews for.\n * @return List\u003cReviews\u003e A list of reviews.\n * @throws Exception\n */\npublic static List\u003cReview\u003e listReviews(String locationName) throws Exception {\n Mybusiness.Accounts.Locations.Reviews.List reviewsList =\n mybusiness.accounts().locations().reviews().list(locationName);\n ListReviewsResponse response = accountsList.execute();\n List\u003cReviews\u003e reviews = response.getReviews();\n\n for (Reviews review : reviews) {\n System.out.println(review.toPrettyString());\n }\n return reviews;\n}\n```\n\nGet a specific review\n---------------------\n\nReturn a specific review by name. Use the\n[accounts.locations.reviews.get](/my-business/reference/rest/v4/accounts.locations.reviews/get)\nAPI to return a specific review associated with a location.\n\nTo return a specific review, use the following:\nHTTP \n\n```\nGET\nhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}\n```\nJava\n\nThe following function uses `Mybusiness.Accounts.Locations.Reviews.Get`. \n\n```java\n/**\n * Demonstrates getting a review by name.\n * @param reviewName The name (resource path) of the review to retrieve.\n * @return Account The requested review.\n */\nprivate static Review getReview(String reviewName) throws Exception {\n Mybusiness.Accounts.Locations.Reviews.Get review =\n mybusiness.accounts().locations().reviews().get(reviewName);\n Review response = review.execute();\n\n return response;\n}\n```\n\n### Additional data\n\nThe Java Client Library gives you access to additional field data for review\ninstances. Use the following methods to return additional data about reviews:\n\n- `getReviewId()`\n- `getComment()`\n- `getReviewer()`\n- `getStarRating()`\n- `getCreateTime()`\n- `getReviewReply()`\n\nGet reviews from multiple locations\n-----------------------------------\n\nGet reviews from multiple locations. Use the\n[accounts.locations.batchGetReviews](https://developers.google.com/my-business/reference/rest/v4/accounts.locations/batchGetReviews)\nAPI to return reviews from multiple locations in a single request.\n\nTo return reviews from multiple locations, use the following:\nHTTP\n\n\u003cbr /\u003e\n\n```\nPOST\nhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:batchGetReviews\n\n{\n \"locationNames\": [\n string\n ],\n \"pageSize\": number,\n \"pageToken\": string,\n \"orderBy\": string,\n \"ignoreRatingOnlyReviews\": boolean\n}\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nReply to a review\n-----------------\n\n| **Important:** In order to use this functionality, you need to ensure that your G Suite Organization Administrator has enabled Google Search and/or Google Maps as services for your account, along with Business Profile. If you experience any issues, contact your Administrator. To learn more, see [Who is my administrator?](https://support.google.com/a/answer/6208960), [Control who can access G Suite and Google services](https://support.google.com/a/answer/182442), and [Apply policies to different users](https://support.google.com/a/topic/1227584).\n\nReply to a specific review, or create a new reply if one doesn't exist. Use the\n[accounts.locations.reviews.updateReply](/my-business/reference/rest/v4/accounts.locations.reviews/updateReply)\nAPI to reply to a specific review associated with a location.\n\nTo reply to a specific review, use the following:\nHTTP \n\n```\nPUT\nhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/reply\n\n{\n comment: \"Thank you for visiting our business!\"\n}\n```\nJava\n\nThe following function uses `Mybusiness.accounts.locations.reviews.reply`. \n\n```java\n/*\n * Updates the reply for a location review.\n * If a review does not exist, creates a new one.\n * @param reviewName Name of the review being responded to.\n * @param comment A string containing the review response body.\n * @throws IOException\n */\nprivate static Reply reply(String reviewName, String comment) throws IOException {\n\n MyBusiness.Accounts.Locations.Reviews.Reply reply =\n mybusiness().accounts().locations().reviews().reply(reviewName, comment);\n\n Reply response = reviewReply.execute();\n\n return response;\n}\n```\n\nDelete a review reply\n---------------------\n\nDelete a reply to a specific review. Use the\n[accounts.locations.reviews.deleteReply](/my-business/reference/rest/v4/accounts.locations.reviews/deleteReply)\nAPI to delete a reply to a specific review associated with a location.\n\nTo delete a specific reply to a review, use the following:\nHTTP \n\n```\nDELETE\nhttps://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/reply\n```\nJava\n\nThe following function uses `Mybusiness.Accounts.Locations.Reviews.DeleteReply`. \n\n```java\n/**\n * Demonstrates deleting a review reply by name.\n * @param reviewName The name (resource path) of the review reply to delete.\n * @return Account The requested review.\n */\nprivate static DeleteReply deleteReply(String reviewName) throws Exception {\n Mybusiness.Accounts.Locations.Reviews.DeleteReply toDelete =\n mybusiness.accounts().locations().reviews().deleteReply(reviewName);\n DeleteReply response = toDelete.execute();\n\n return response;\n}\n```"]]