登入開始免費試用
easyCoexistence 官方 API

Google Business Profile API(前稱 Google My Business API):完整指南

Google Business Profile API 是一組用於管理商家檔案資料的 API,包括 Account Management、Business Information、Performance、Verifications、Notifications、Lodging、Place Actions,以及用於評論、帖子和媒體的 v4.9 Google My Business API。存取以應用程式為單位,呼叫需要 business.manage 範圍的 OAuth。在你自己的檔案上,easyCoexistence 的 MCP 伺服器讓 ChatGPT 或 Claude 在你批准後管理評論和帖子。

business.manage

Business Profile API 所需的 OAuth 範圍;Google 僅為向後相容保留 plus.business.manage。

300 QPM

Google 限額頁面列出各 Business Profile API 的預設配額,由 Account Management 至 Performance。

無沙盒環境

Google 未提供這些 API 的測試環境;部分呼叫接受 validateOnly,可在不儲存的情況下檢查請求。

2025-11-03

Google 停用 My Business Q&A API 及其問題與答案通知類型的日期。

2023-03-30

v4 reportInsights 已停用;每日指標現改由 Performance API 的 fetchMultiDailyMetricsTimeSeries 提供。

30 天

Google 的 API 政策允許專案暫時儲存有限的 Content,且僅限用於改善效能。

什麼是 Google Business Profile API?

用於管理 Business Profile 帳戶及地點資料的一組程式介面,包括評論、帖子和相片等由人建立的內容。Google 表示,這些 API 提供的功能與 Business Profile 介面幾乎相同,Google 的更新也會同時推送至 API 用戶。它們適用於你擁有或獲授權管理的檔案;至於向最終用戶顯示的本地商家資訊,Google 建議改用 Google Maps Platform。

API 系列包括哪些?

Google 將以下 API 列為與 Business Profile 相關,每個 API 須在專案獲批准後,於 Google Cloud Console 分別啟用。評論、帖子、媒體及食品菜單仍保留於較舊的 Google My Business API v4.9:

Account Management APIAccounts, location access, invitations and administrators
Business Information APIGet, create, update and delete locations; update attributes; look up categories
Google My Business API v4.9Reviews and replies, local posts, media and food menus
Performance APIImpressions, calls, website clicks, direction requests and bookings, as daily values
Verifications APIStart verification and list the options for a location
Notifications APISend account events to a Cloud Pub/Sub topic
Lodging APIAmenities and policies for hotels and other lodging
Place Actions APILinks to book, reserve or order from the profile

如何取得存取權限?

以應用程式申請,按 Google Cloud 專案計算。Google 要求你管理的 Business Profile 已驗證、啟用超過 60 天,且商家須有網站;之後你需填寫 GBP API 聯絡表格,選擇 Application for Basic API Access,並使用檔案擁有者或管理員的電郵發送。Google 的常見問題指出,申請會在 14 天內審核,獲批後專案配額由 0 升至 300 QPM(每分鐘查詢數)。

授權如何運作?

每個請求都帶有 OAuth 2.0 存取權杖,權杖在商家擁有者以 Google 登入並同意後,按 https://www.googleapis.com/auth/business.manage 範圍取得。若採用離線存取,平台會安全地儲存重新整理權杖(refresh token),日後代擁有者行事,例如回覆評論或建立帖子,而擁有者可撤銷該存取權。商家亦可改為將合作夥伴加為檔案的管理員;Google 建議合作夥伴使用管理員而非擁有者身分。

每項任務使用哪個端點?

較新的 API 以 locations/{locationId} 定位地點,而 v4.9 API 則將其置於帳戶之下,即 accounts/{accountId}/locations/{locationId},因此整合程式須為所管理的每個地點同時儲存兩個 ID。以下是大多數整合程式首先使用的呼叫:

Main endpoints by task
# Accounts the signed-in user can reach
GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts

# Locations in an account
GET https://mybusinessbusinessinformation.googleapis.com/v1/accounts/{accountId}/locations?readMask=name,title

# Edit a location
PATCH https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?updateMask=profile.description

# Reviews, and a reply to one
GET https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews
PUT https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/reviews/{reviewId}/reply

# Reviews from up to 50 verified locations in one call
POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations:batchGetReviews

# Posts and photos
POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/localPosts
POST https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media

# Daily performance metrics
GET https://businessprofileperformance.googleapis.com/v1/locations/{locationId}:fetchMultiDailyMetricsTimeSeries

配額是多少?

各 API 在 Google 限額頁面的預設值為每分鐘 300 次查詢;Business Information API 的每日上限為 300 次地點建立、300 次 SearchGoogleLocation 請求,以及 10,000 次地點更新。每個 Business Profile 的編輯上限為每分鐘 10 次,Google 表示此限制無法提高。超出配額的請求會收到 HTTP 429 Too Many Requests;Google 建議平均分佈流量,並採用附隨隨機抖動的指數退避,同時會根據過往用量審視請求增幅。

資料附帶哪些規則?

Google 的 Business Profile API 政策,Google 會嚴格執行,並可能透過停用專案作為制裁。整合程式最先會遇到的規則如下:

  • 只處理你擁有或獲授權代表商家擁有者管理的商家資料。
  • 未經用戶事先明確且具體的同意,切勿自動化或觸發評論回覆、商家資料編輯或其他動作。
  • 切勿讓代理商或最終客戶以程式方式使用你的專案:若需自動使用,Google 要求其使用各自的專案,而你工具的最終用戶須手動登入。
  • 只可儲存有限的 Content 以改善效能:須安全儲存,不得操控或彙總,儲存期不得超過 30 個日曆天。
  • 若你的工具對最終客戶的帳戶作出任何變更(例如新增管理員),須於 48 小時內通知該客戶。
  • 切勿使用 API 自動撤銷 Google 所作的變更。

Google 已停用哪些項目?

近年 Google 已停用多項資源,詳見 Google 的停用時間表,另外 Business Messages 已於 2024 年關閉:

  • My Business Q&A API:於 2025 年 11 月 3 日停用,其問題與答案通知類型一併停用。
  • v4.9 accounts.locations.reportInsights:於 2023 年 3 月 30 日停用,改由 Performance API 的 fetchMultiDailyMetricsTimeSeries 取代。
  • My Business Business Calls API:於 2023 年 5 月 30 日停用。
  • locations.associate 及 locations.clearLocationAssociation:於 2023 年 5 月 30 日停用。
  • Business Messages:於 2024 年 7 月 31 日結束服務;此日期後其 API 會返回錯誤。

沒有沙盒,如何測試?

在真實商家資料上進行,且須小心,因為 Google 並無這些 API 的沙盒,而大多數虛假的地點都會被審核攔截並遭暫停。Google 建議使用公司總部的地點,或在非營業時間使用客戶的地點,前提是名稱、地址和類別等主要資料維持不變。在支援的呼叫中將 validateOnly 設為 true,使用你自己的用戶端 ID 在 OAuth 2.0 Playground 中嘗試請求,並對驗證等動作使用模擬 API 回應。

如何透過 ChatGPT 或 Claude 處理自己的檔案?

透過 easyCoexistence 的 MCP 伺服器,這是供人使用而非供軟件使用的途徑:你,或獲客戶授權的代理商,從 easyCoexistence 控制台以 Google 登入,選擇地點,然後將 https://easycoexistence.com/api/mcp 加入 Claude 或 ChatGPT。每個工具背後都對應上述其中一項 Google 呼叫,例如回覆評論使用 reviews.updateReply,而每次寫入都須等待擁有者批准:

  • list_google_reviews 及 reply_to_google_review 用於評論,回覆最長為 4,096 位元組。
  • get_google_business_profile 及 update_google_business_profile 用於描述、網站、主要電話及當週營業時間。
  • publish_google_business_post 及 add_google_business_photo 用於發布最新消息、活動、優惠及相片。
  • get_google_business_insights 用於查看瀏覽次數、致電次數、網站點擊及路線查詢請求,預設為過去 28 天。

設定方法

  1. 取得批准提交 Application for Basic API Access,並等待專案的配額顯示 300 QPM。
  2. 啟用 API在 Google Cloud 控制台的 API Library 中,開啟整合所需的 Business Profile APIs。
  3. 建立客戶端 ID在 Credentials 下,為網頁應用程式建立 OAuth 客戶端 ID,測試時以 https://developers.google.com/oauthplayground 作為重新導向 URI。
  4. 授權在 OAuth 2.0 Playground 中,切換至你自己的 OAuth 憑證,並授權 business.manage 範圍。
  5. 發出首個請求發送 GET https://mybusinessaccountmanagement.googleapis.com/v1/accounts,並預期返回 200 OK 及你可存取的帳戶。

常見錯誤

  • 省略地點列表的 readMask。Business Information API 要求此參數,而回應只會包含它指定的欄位。
  • 逐一輪詢各地點以查找新評論。Google 的限額頁面建議使用 Pub/Sub 通知,無須輪詢即可讓資料保持最新。
  • 把成功的編輯呼叫當作已即時生效。Google 會按其指引審核編輯,通常約 10 分鐘,最長 30 天;只要任何屬性仍在等待,metadata.hasPendingEdits 就會顯示 true。
  • 在未驗證的地點回覆評論。Google 的 reviews.list 和 updateReply 只適用於已驗證的地點,因此請先驗證商家。
使用 EasyCoexistence 完成這項設定

easyCoexistence 透過其 MCP 伺服器,把 Google 商家檔案帶入 ChatGPT 或 Claude:擁有者,或獲客戶授權的代理商,以 Google 登入後,助手便可列出並回覆評論、發布帖子、編輯檔案、新增相片及讀取成效資料,每項寫入都須經擁有者批准後才會執行。助理從 Google 讀取的內容不會被儲存。每個連接每月由 US$ 9 降至 US$ 0.75,連接越多,價格越低,首 3 天免費試用。

將 Google 商家檔案連接至 ChatGPT 及 Claude

常見問題

Google My Business API 與 Business Profile API 相同嗎?

只是其中一部分。Google 仍將 Google My Business API v4.9 列為 Business Profile API 之一,該 API 負責處理評論、本地帖子、媒體及食品菜單。

Google Business Profile API 免費嗎?

免費。Google 的定價頁面表示,已註冊用戶可免費使用該 API;限制其使用的是存取批准及配額。

此 API 有 webhook 嗎?

有 Cloud Pub/Sub 通知。Notifications API 會將帳戶連接至你專案中的 Pub/Sub 主題,以接收新增或更新評論、媒體上傳、Google 最新消息及地點狀態變更等事件。

API 可以建立產品帖子嗎?

不可以。Google 的帖子指南指出,目前無法使用 Google My Business API 建立產品帖子;但可以建立活動、優惠及行動呼籲帖子。

繼續閱讀

兩分鐘內連接您的第一個頻道。

無需等待平台審核。連接 WhatsApp、Instagram、TikTok 或其他頻道,然後請您的 AI 發佈貼文、回覆訊息或匯報數據,並看着它運作。

  • 免費試用 3 天
  • 隨時取消
  • 只用官方 API
  • 24/7 監察

驗證日期