分析最近的公开 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 | 四项计数之和。 |