Google Business Performance API 的
NEW API 方法可擷取單一 API 要求中的多個「DailyMetrics」。
請詳閱
淘汰時間表和從 v4 reportInsights API 方法遷移至 Google Business Profile Performance API 的操作說明。
Method: categories.batchGet
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[[["\u003cp\u003eThis document explains how to use the \u003ccode\u003ecategories:batchGet\u003c/code\u003e endpoint to retrieve business categories.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to provide GConcept IDs and a language code as query parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe response will include localized category names and other category details based on the specified \u003ccode\u003eview\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecategories:batchGet\u003c/code\u003e endpoint requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This content describes how to retrieve business categories using a `GET` request to `https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet`. Required query parameters include `names[]` (GConcept IDs), `languageCode` (BCP 47 code), and `view` (CategoryView enum). `regionCode` is an optional parameter. The request body is empty. The response body contains a JSON object with an array of `categories`, matching the requested GConcept IDs, under the authorization scope `https://www.googleapis.com/auth/business.manage`.\n"],null,["# Method: categories.batchGet\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetCategoriesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nReturns a list of business categories for the provided language and GConcept ids.\n\n### HTTP request\n\n`GET https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `names[]` | `string` Required. At least one name must be set. The GConcept ids the localized category names should be returned for. To return details for more than one category, repeat this parameter in the request. |\n| `languageCode` | `string` Required. The BCP 47 code of language that the category names should be returned in. |\n| `regionCode` | `string` Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language. |\n| `view` | `enum (`[CategoryView](/my-business/reference/businessinformation/rest/v1/CategoryView)`)` Required. Specifies which parts to the Category resource should be returned in the response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for BusinessCategories.BatchGetBusinessCategories.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"categories\": [ { object (/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Category) } ] } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `categories[]` | `object (`[Category](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Category)`)` Categories that match the GConcept ids provided in the request. They will not come in the same order as category ids in the request. |\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\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)."]]