Google Business Performance API มีเมธอด API
ใหม่ที่อนุญาตให้ดึง `DailyMetrics` หลายรายการในคําขอ API รายการเดียว
ตรวจสอบ
กําหนดการเลิกใช้งานและวิธีการย้ายข้อมูลจากเมธอด v4 reportInsights API ไปยัง API ประสิทธิภาพของ Google Business Profile
เรียกข้อมูลเชิงลึกเกี่ยวกับสถานที่ตั้ง
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
บทแนะนำนี้จะแสดงวิธีเรียกข้อมูลเมตริกสถานที่ตั้งใน Business Profile
Google My Business API ช่วยให้คุณทํางานกับเมตริกสถานที่ตั้งเพื่อดึงข้อมูลประเภทต่อไปนี้ได้
ก่อนเริ่มต้น
ก่อนใช้ Google My Business API คุณต้องลงทะเบียนแอปพลิเคชันและรับข้อมูลเข้าสู่ระบบ OAuth 2.0 ดูรายละเอียดเกี่ยวกับวิธีเริ่มต้นใช้งาน Google My Business API ได้ที่การตั้งค่าพื้นฐาน
ข้อมูลเชิงลึกที่รองรับ
ดูข้อมูลเชิงลึกที่รองรับได้ที่หน้าอ้างอิงเมตริก
ข้อมูลเชิงลึกเบื้องต้น
ดึงข้อมูลเชิงลึกพื้นฐานสําหรับรายการสถานที่หนึ่งๆ ใช้ accounts.locations.reportInsights
API เพื่อแสดงข้อมูลเชิงลึกที่เชื่อมโยงกับสถานที่ตั้ง
หากต้องการแสดงข้อมูลเชิงลึกพื้นฐานที่เชื่อมโยงกับสถานที่ ให้ใช้ข้อมูลต่อไปนี้
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"basicRequest": {
"metricRequests": [
{
"metric": "QUERIES_DIRECT"
},
{
"metric": "QUERIES_INDIRECT"
}
],
"timeRange": {
"startTime": "2016-10-12T01:01:23.045123456Z",
"endTime": "2017-01-10T23:59:59.045123456Z"
}
}
}
เส้นทางการขับขี่
ดึงข้อมูลเมตริกเส้นทางขับรถสําหรับรายการสถานที่ตั้งที่ระบุ ใช้ accounts.locations.reportInsights
API เพื่อแสดงผลเมตริกเส้นทางขับรถที่เชื่อมโยงกับสถานที่ตั้ง
หากต้องการแสดงเมตริกเส้นทางขับรถ ให้ใช้ข้อมูลต่อไปนี้
POST
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:reportInsights
{
"locationNames": [
"accounts/{accountId}/locations/{locationId}"
],
"drivingDirectionsRequest": {
"numDays": "NINETY"
}
}
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-01-29 UTC
[[["เข้าใจง่าย","easyToUnderstand","thumb-up"],["แก้ปัญหาของฉันได้","solvedMyProblem","thumb-up"],["อื่นๆ","otherUp","thumb-up"]],[["ไม่มีข้อมูลที่ฉันต้องการ","missingTheInformationINeed","thumb-down"],["ซับซ้อนเกินไป/มีหลายขั้นตอนมากเกินไป","tooComplicatedTooManySteps","thumb-down"],["ล้าสมัย","outOfDate","thumb-down"],["ปัญหาเกี่ยวกับการแปล","translationIssue","thumb-down"],["ตัวอย่าง/ปัญหาเกี่ยวกับโค้ด","samplesCodeIssue","thumb-down"],["อื่นๆ","otherDown","thumb-down"]],["อัปเดตล่าสุด 2025-01-29 UTC"],[[["This tutorial demonstrates how to retrieve location metrics, such as basic insights and driving directions, using the Google My Business API."],["Before using the API, you'll need to register your application and obtain OAuth 2.0 credentials as outlined in the basic setup guide."],["You can retrieve basic insights like direct and indirect queries for specific locations within a defined timeframe using the `accounts.locations.reportInsights` API."],["Driving direction metrics, including data for the past 90 days, can also be retrieved using the `accounts.locations.reportInsights` API with a driving directions request."],["Refer to the Metric reference page for a comprehensive list of supported insights available through the Google My Business API."]]],[]]