Method: accounts.locations.reviews.list
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trả về danh sách bài đánh giá được đánh số trang cho vị trí được chỉ định. Thao tác này chỉ hợp lệ nếu vị trí đã chỉ định đã được xác minh.
Yêu cầu HTTP
GET https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*}/reviews
URL sử dụng cú pháp Chuyển mã gRPC.
Tham số đường dẫn
Tham số |
parent |
string
Tên của vị trí để tìm nạp bài đánh giá.
|
Tham số truy vấn
Tham số |
pageSize |
integer
Số bài đánh giá cần tìm nạp trên mỗi trang. pageSize tối đa là 50.
|
pageToken |
string
Nếu được chỉ định, Google sẽ tìm nạp trang tiếp theo của bài đánh giá.
|
orderBy |
string
Chỉ định trường để sắp xếp bài đánh giá. Nếu bạn chưa chỉ định, thứ tự của các bài đánh giá được trả về sẽ mặc định là updateTime desc . Các đơn đặt hàng hợp lệ để sắp xếp là rating , rating desc và updateTime desc .
|
Nội dung yêu cầu
Nội dung yêu cầu phải trống.
Nội dung phản hồi
Nếu thành công, phần nội dung phản hồi sẽ chứa dữ liệu có cấu trúc sau:
Thông báo phản hồi cho Reviews.ListReview.
Biểu diễn dưới dạng JSON |
{
"reviews": [
{
object (Review )
}
],
"averageRating": number,
"totalReviewCount": integer,
"nextPageToken": string
} |
Trường |
reviews[] |
object (Review )
Bài đánh giá.
|
averageRating |
number
Điểm xếp hạng trung bình theo sao của tất cả bài đánh giá cho địa điểm này trên thang điểm từ 1 đến 5, trong đó 5 là điểm xếp hạng cao nhất.
|
totalReviewCount |
integer
Tổng số bài đánh giá về địa điểm này.
|
nextPageToken |
string
Nếu số lượng bài đánh giá vượt quá kích thước trang đã yêu cầu, thì trường này sẽ được điền sẵn một mã thông báo để tìm nạp trang tiếp theo của các bài đánh giá trong lệnh gọi tiếp theo đến reviews.list. Nếu không có bài đánh giá nào khác, thì trường này sẽ không xuất hiện trong câu trả lời.
|
Phạm vi cấp phép
Yêu cầu một trong các phạm vi OAuth sau:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
Để biết thêm thông tin, hãy xem bài viết Tổng quan về OAuth 2.0.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\u003cp\u003eRetrieves a paginated list of reviews for a specified, verified Google My Business location.\u003c/p\u003e\n"],["\u003cp\u003eAllows filtering by page size, page token, and sorting order (rating, rating descending, or update time descending).\u003c/p\u003e\n"],["\u003cp\u003eReturns review details, average rating, total review count, and a token for retrieving subsequent pages if available.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with specific OAuth scopes for business management.\u003c/p\u003e\n"]]],["This content outlines the process of retrieving a paginated list of reviews for a verified location using a `GET` request to a specific URL. The URL utilizes path parameters like `parent` to identify the location. Query parameters such as `pageSize`, `pageToken`, and `orderBy` are used to manage pagination and sorting. The request body is empty. A successful response returns a JSON object containing a list of `reviews`, `averageRating`, `totalReviewCount`, and optionally `nextPageToken` for pagination. Authorization requires specific OAuth scopes.\n"],null,["# Method: accounts.locations.reviews.list\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.ListReviewsResponse.SCHEMA_REPRESENTATION)\n- [Authorization Scopes](#body.aspect)\n\nReturns the paginated list of reviews for the specified location. This operation is only valid if the specified location is verified.\n\n### HTTP request\n\n`GET https://mybusiness.googleapis.com/v4/{parent=accounts/*/locations/*}/reviews`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|---------------------------------------------------------|\n| `parent` | `string` The name of the location to fetch reviews for. |\n\n### Query parameters\n\n| Parameters ||\n|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `pageSize` | `integer` How many reviews to fetch per page. The maximum `pageSize` is 50. |\n| `pageToken` | `string` If specified, it fetches the next page of reviews. |\n| `orderBy` | `string` 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`. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nIf successful, the response body contains data with the following structure:\nResponse message for Reviews.ListReviews.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"reviews\": [ { object (/my-business/reference/rest/v4/accounts.locations.reviews#Review) } ], \"averageRating\": number, \"totalReviewCount\": integer, \"nextPageToken\": string } ``` |\n\n| Fields ||\n|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `reviews[]` | `object (`[Review](/my-business/reference/rest/v4/accounts.locations.reviews#Review)`)` The reviews. |\n| `averageRating` | `number` The average star rating of all reviews for this location on a scale of 1 to 5, where 5 is the highest rating. |\n| `totalReviewCount` | `integer` The total number of reviews for this location. |\n| `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 call to reviews.list. If there are no more reviews, this field is not present in the response. |\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]