GET
/api/v4/locations/{locationId}/bing-analytics取得地點的 Bing 分析資料
傳回指定日期範圍內某個地點的 Bing Places 商家檔案每週瀏覽次數指標。
參數
路徑
| 名稱 | 類型 | 必填 | 說明 |
|---|---|---|---|
| locationId | string | 必填 | Location ID, either the Base64 Relay id (e.g. TG9jYXRpb246MTgwMDI4OQ==) or the raw numeric database id (e.g. 1800289). Both forms resolve to the same location. |
查詢
| 名稱 | 類型 | 必填 | 說明 | 預設值 |
|---|---|---|---|---|
| fromDate | string | 選填 | Start of the range (YYYY-MM-DD). Defaults to a recent window when omitted. | — |
| toDate | string | 選填 | End of the range (YYYY-MM-DD). | — |
回應
200Weekly Bing view metrics. `views` is a time-series array; it is empty when no data exists for the range or the Bing profile is not connected.
{ "data": { "bingInsights": { "views": [ { "startTime": "2025-06-02T00:00:00+00:00", "value": 73 }, { "startTime": "2025-06-09T00:00:00+00:00", "value": 58 } ] } }}401Unauthenticated, missing or invalid API key.
傳回某個地點的 Bing Places 商家檔案瀏覽次數資料。Bing 分析資料按週彙整,views 中的每個資料點代表從 startTime 開始的 1 週瀏覽次數。資料會在每週一更新,提供前一週的資料,因此您看到的最新資料會是最近一個完整週的資料。
路徑中可使用任一種 id 格式
bing-analytics 接受 Base64 Relay id(TG9jYXRpb246MTgwMDI4OQ==)或原始數字 id(1800289),兩者都會解析為同一個地點。建議優先使用 Relay id,因為讀取端點傳回的就是此格式。如果值不屬於這兩種格式,端點會傳回 {"data":{"bingInsights":null},"errors":[...]},狀態碼為 200,而不是指標物件。
curl -s 'https://listingsapi.com/api/v4/locations/TG9jYXRpb246MTgwMDI4OQ==/bing-analytics?fromDate=2025-01-01&toDate=2025-12-31' \ -H "Authorization: API $LISTINGSAPI_KEY"追蹤 Bing 曝光度趨勢
由於 Bing 每週只回報 1 個值,此端點最適合用來繪製趨勢線,而非逐日歸因:擷取涵蓋數個月的日期範圍,並繪製 views,即可查看商家資訊在 Bing 上的曝光度是上升還是下降。當地點在指定期間內沒有 Bing 資料(或尚未連結其 Bing 商家檔案)時,端點仍會傳回 200,其中 views 為空陣列([]),請將此情況視為「沒有資料」,而非錯誤。結合 Google 和 Facebook 分析資料,即可建立完整的多發布平台儀表板。
Request
curl -X GET 'https://listingsapi.com/api/v4/locations/<locationId>/bing-analytics' \ -H "Authorization: API $LISTINGSAPI_KEY"