Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
Method: categories.batchGet
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลรายการหมวดหมู่ธุรกิจสำหรับภาษาและรหัส GConcept ที่ระบุ
คำขอ HTTP
GET https://mybusiness.googleapis.com/v4/categories:batchGet
URL ใช้ไวยากรณ์การแปลง gRPC
พารามิเตอร์การค้นหา
พารามิเตอร์ |
languageCode |
string
ต้องระบุ รหัส BCP 47 ของภาษาที่ควรแสดงผลชื่อหมวดหมู่
|
categoryIds[] |
string
ต้องระบุ ต้องตั้งชื่ออย่างน้อยหนึ่งชื่อ รหัส GConcept ที่ควรแสดงผลชื่อหมวดหมู่ที่แปลแล้ว
|
regionCode |
string
ไม่บังคับ รหัสประเทศ ISO 3166-1 alpha-2 ที่ใช้อนุมานภาษาที่ไม่ใช่มาตรฐาน
|
view |
enum (CategoryView )
ต้องระบุ ระบุว่าควรแสดงผลส่วนใดของทรัพยากรหมวดหมู่ในการตอบกลับ
|
เนื้อหาของคำขอ
เนื้อหาของคำขอต้องว่างเปล่า
เนื้อหาการตอบกลับ
หากทำสำเร็จ เนื้อหาการตอบกลับจะมีข้อมูลซึ่งมีโครงสร้างดังต่อไปนี้
ข้อความตอบกลับสำหรับ BusinessCategory.BatchGetBusinessCategory
การแสดง JSON |
{
"categories": [
{
object (Category )
}
]
} |
ช่อง |
categories[] |
object (Category )
หมวดหมู่ที่ตรงกับรหัส GConcept ที่ระบุไว้ในคำขอ ซึ่งจะไม่เรียงตามลำดับเดียวกันกับรหัสหมวดหมู่ในคำขอ
|
ขอบเขตการให้สิทธิ์
ต้องใช้ขอบเขต OAuth รายการใดรายการหนึ่งต่อไปนี้
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
สำหรับข้อมูลเพิ่มเติม โปรดดูที่ภาพรวมของ OAuth 2.0
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eReturns localized business category names for specified GConcept IDs and language.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing GConcept IDs and language code as query parameters in a GET request.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes a list of categories matching the provided GConcept IDs.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ehttps://www.googleapis.com/auth/plus.business.manage\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope for authorization.\u003c/p\u003e\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.BatchGetBusinessCategoriesResponse.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://mybusiness.googleapis.com/v4/categories:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` Required. The BCP 47 code of language that the category names should be returned in. |\n| `categoryIds[]` | `string` Required. At least one name must be set. The GConcept ids the localized category names should be returned for. |\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/rest/v4/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\nIf successful, the response body contains data with the following structure:\nResponse message for BusinessCategories.BatchGetBusinessCategories.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------|---|\n| ``` { \"categories\": [ { object (/my-business/reference/rest/v4/categories#Category) } ] } ``` |\n\n| Fields ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `categories[]` | `object (`[Category](/my-business/reference/rest/v4/categories#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 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)."]]