分析近期的公開 Bluesky 帖文

GET/tools/profile-analytics

檢查最多 200 筆作者動態項目,並彙整本人可見、非回覆的帖文,不含轉發。顯示樣本日期、觀察到的讚好、回覆、轉發、引用數,以及前十則帖文。不推估曝光次數、觸及率或跟隨者成長。消耗 3 次呼叫。

參數

名稱位置類型說明
q (必填)querystring公開的 Bluesky 帳號代碼、DID 或個人檔案連結。

回應

狀態碼說明內容
200工具的回答,附上其頁面的標準 URL。ToolProfileAnalytics
400查詢參數無效(代碼 `bad_request`)。Error
401權杖不明、已過期或已撤銷(代碼 `unauthorized`)。沒有 `Authorization` 標頭時,工具會以匿名方式回答。Error
404找不到。在機械人的帳號代碼子網域上也會傳回此結果:API 僅在主站提供。Error
429已達速率限制:依 IP 計算 `toolsApi`(每分鐘 60 次)和 `toolsApiDaily`(每天 2,000 次),使用創作者權杖時依帳號計算,兩者皆為 10 倍。會分散發出多個請求的工具,消耗不只一次呼叫。Error
500未預期的錯誤。Error
502工具查詢的服務沒有回應(代碼 `upstream_error`)。Error

範例

bash
curl \
  -G \
  --data-urlencode "q=demo.bluesky.bot" \
  -H "Authorization: Bearer $BLUESKY_BOT_TOKEN" \
  https://bluesky.bot/api/v1/tools/profile-analytics

結構描述

Error

欄位類型說明
error (必填)object
error.code (必填)string: "bad_request", "invalid_handle", "not_found", "rate_limited", "internal_error", "unauthorized", "forbidden", "conflict", "invalid_grant", "upstream_error", "insufficient_scope", "invalid_listing", "consent_required"
error.message (必填)string
error.reasonstring搭配 `invalid_handle`、`invalid_listing`、`conflict` 和 `forbidden`:例如 `reserved`、`taken`、`too_long`、`no_handle`、`suspended`。
error.urlstring, uri搭配 consent_required:開啓此控制台頁面以授權編輯個人檔案。
error.fieldstring搭配 `invalid_listing`:遭拒絕的欄位。
error.scopestring搭配 `insufficient_scope`:權杖缺少的範圍。
error.parameterstring無效的查詢參數。
error.retryAfterSecondsinteger (1–)搭配 `rate_limited`。

ToolProfileAnalytics

欄位類型說明
tool (必填)string = "profile-analytics"工具的 slug。
url (必填)string工具在 Bluesky.bot 上頁面的標準 URL。
result (必填)object工具的回答。
result.profile (必填)object分析的公開個人檔案。
result.profile.did (必填)string穩定的公開帳號識別碼。
result.profile.handle (必填)string目前觀察到的帳號代碼。
result.profile.displayName (必填)string | null公開的顯示名稱(若有提供)。
result.capturedAt (必填)string擷取時間(UTC),最多快取五分鐘。
result.examined (必填)integer最多檢查 200 筆動態項目。
result.posts (必填)integer納入的本人可見、非回覆且不重複的帖文;不含轉發。
result.coverage (必填)string: "complete", "cap", "deadline", "unavailable", "incomplete"所要求的作者動態是已到結尾還是受到限制。
result.from (必填)string | null納入帖文中最早的日期,或 null。
result.until (必填)string | null納入帖文中最晚的日期,或 null。
result.totals (必填)object擷取時納入帖文的公開計數總和。
result.totals.likes (必填)integer觀察到的讚好數。
result.totals.reposts (必填)integer觀察到的轉發數。
result.totals.replies (必填)integer觀察到的回覆數。
result.totals.quotes (必填)integer觀察到的引用帖文數。
result.interactionsPerPost (必填)number(讚好 + 轉發 + 回覆 + 引用)/ 納入的帖文數,樣本為空時為零。這不是觸及率或互動率的推估。
result.topPosts (必填)object[]最多十則納入的帖文,依觀察到的互動數排序。
result.topPosts[].uri (必填)string帖文的 AT URI。
result.topPosts[].url (必填)stringBluesky 帖文的標準連結。
result.topPosts[].text (必填)string可見帖文的文字,不含嵌入內容。
result.topPosts[].createdAt (必填)string | null帖文日期(UTC),若有效。
result.topPosts[].counts (必填)object此帖文的公開計數。
result.topPosts[].counts.likes (必填)integer觀察到的讚好數。
result.topPosts[].counts.reposts (必填)integer觀察到的轉發數。
result.topPosts[].counts.replies (必填)integer觀察到的回覆數。
result.topPosts[].counts.quotes (必填)integer觀察到的引用帖文數。
result.topPosts[].interactions (必填)integer四項計數的總和。