分析近期的公開 Bluesky 帖文
GET/tools/profile-analytics
檢查最多 200 筆作者動態項目,並彙整本人可見、非回覆的帖文,不含轉發。顯示樣本日期、觀察到的讚好、回覆、轉發、引用數,以及前十則帖文。不推估曝光次數、觸及率或跟隨者成長。消耗 3 次呼叫。
參數
| 名稱 | 位置 | 類型 | 說明 |
|---|---|---|---|
| q (必填) | query | string | 公開的 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 |
範例
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.reason | string | 搭配 `invalid_handle`、`invalid_listing`、`conflict` 和 `forbidden`:例如 `reserved`、`taken`、`too_long`、`no_handle`、`suspended`。 |
| error.url | string, uri | 搭配 consent_required:開啓此控制台頁面以授權編輯個人檔案。 |
| error.field | string | 搭配 `invalid_listing`:遭拒絕的欄位。 |
| error.scope | string | 搭配 `insufficient_scope`:權杖缺少的範圍。 |
| error.parameter | string | 無效的查詢參數。 |
| error.retryAfterSeconds | integer (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 (必填) | string | Bluesky 帖文的標準連結。 |
| 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 | 四項計數的總和。 |