Bluesky 单条帖子爬虫 API
最后更新: · REST · JSON
发送 GET https://api.scrapier.io/api/v2/bluesky-single-posts/?urls=https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d,并在 X-API-Key 请求头中带上你的密钥,即可以 JSON 获得讨论串行页。每页讨论串行 10 积分;失败的调用免费。
- 每页讨论串行 10 积分
- 失败的调用免费
- 没有速率限制
调用 Bluesky 单条帖子爬虫 API
在你自己的应用、脚本或智能体中使用 Bluesky 单条帖子爬虫 API。你需要一个 Scrapier 账户,以及控制台中的 API 密钥。选择一种语言。
import requests# Replace YOUR_API_KEY with the key from your Scrapier dashboardAPI_KEY = "YOUR_API_KEY"params = { "urls": "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d", "depth": "6", "parent_height": "80", "max_replies": "0", "reply_index": "true", "reply_sort": "api", "compute_metrics": "true", "estimate_reach": "true", "reach_max_amplifiers": "100", "video_duration": "true",}r = requests.get( "https://api.scrapier.io/api/v2/bluesky-single-posts/", headers={"X-API-Key": API_KEY}, params=params, timeout=210,)r.raise_for_status()# The result sits under data.rowsresult = r.json()["data"]["rows"]print(result)
// Replace YOUR_API_KEY with the key from your Scrapier dashboardconst API_KEY = "YOUR_API_KEY";const params = new URLSearchParams({ urls: "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d", depth: "6", parent_height: "80", max_replies: "0", reply_index: "true", reply_sort: "api", compute_metrics: "true", estimate_reach: "true", reach_max_amplifiers: "100", video_duration: "true",});const res = await fetch(`https://api.scrapier.io/api/v2/bluesky-single-posts/?${params}`, { headers: { "X-API-Key": API_KEY }, signal: AbortSignal.timeout(210_000),});if (!res.ok) throw new Error(`HTTP ${res.status}`);const { data } = await res.json();console.log(data.rows);
# One GET request. The key goes in a header, never in the URL.GET /api/v2/bluesky-single-posts/?urls=https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d&depth=6&parent_height=80&max_replies=0&reply_index=true&reply_sort=api&compute_metrics=true&estimate_reach=true&reach_max_amplifiers=100&video_duration=true HTTP/1.1Host: api.scrapier.ioX-API-Key: YOUR_API_KEYAccept: application/json
# Scrapier publishes an OpenAPI spec that covers every endpoint. No API key needed.curl -O https://api.scrapier.io/api/v2/openapi.json# Import openapi.json into Postman, Insomnia, Bruno or a code generator,# then add your key as the X-API-Key header.
# 1. Add the Scrapier MCP server to Claude Codeclaude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY"# 2. Ask your agent. It finds the endpoint with search_endpoints# and calls it with run_scrape:"Get this Bluesky post and its top replies and summarise what people say: https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d"run_scrape("bluesky-single-posts", {urls: "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d"})
Python 中的 Bluesky 单条帖子爬虫 API
只需普通的 requests,无需 SDK。每个响应都是类型化 JSON。
安装
JavaScript 中的 Bluesky 单条帖子爬虫 API
可在 Node 18+、Deno、Bun 和边缘运行时中使用内置的 fetch。
检查你的环境
通过 HTTP 调用 Bluesky 单条帖子爬虫 API
一次 GET 请求。认证只需一个 X-API-Key 请求头。
检查你的环境
Bluesky 单条帖子爬虫 API 的 OpenAPI 定义
下载一次规范,然后导入到你已在使用的工具中。获取它无需密钥。
下载规范
通过 MCP 调用 Bluesky 单条帖子爬虫 API
同一个端点也是 Claude Code、Cursor 和 Windsurf 的工具调用。相同的 urls,每页讨论串行同样 10 积分。
安装
其他调用方式
Bluesky 单条帖子爬虫 API 交互式试用
编辑请求,观察代码更新,然后运行。没有密钥时它显示目录示例,不计费。使用你的密钥时,它会从浏览器发出真实调用;密钥只会发送到 api.scrapier.io,从不存储。
GET /api/v2/bluesky-single-posts/?urls=https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d点击运行请求发送。没有密钥时你得到的是目录示例。
失败的调用不计费。
无论输入什么,示例都相同:它展示的是响应结构,而不是你输入的账户。
示例响应,目录示例,2026 年11月 9 日
{
"success": true,
"data": {
"urls": "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d",
"post_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"status": "ok",
"note": null,
"http_status": null,
"depth": 6,
"parent_height": 80,
"reply_sort": "api",
"max_replies": 200,
"page": 1,
"page_size": 50,
"offset": 0,
"next_offset": 49,
"replies_total": 683,
"has_more": true,
"rows": [
{
"input_url": "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d",
"post_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"row_type": "post",
"status": "ok",
"note": null,
"http_status": null,
"position": 1,
"depth": 0,
"thread_index": null,
"parent_uri": null,
"root_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"is_reply": false,
"post_id": "3mk4lzkrnk22d",
"uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"url": "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d",
"text": "v1.121 is live!\n\nWe've increased the quality of photos in posts by doubling the max file size to 2MB and the resolution limit to 4000x4000. \n\nPlus, posts with multiple photos now appear in a carousel so you can show off your photography in all its glory.",
"published_at": "2026-04-23T19:39:35.560Z",
"langs": [
"en"
],
"author_handle": "bsky.app",
"author_did": "did:plc:z72i7hdynmk6r22z27h6tvur",
"author_display_name": "Bluesky",
"like_count": 7207,
"reply_count": 2110,
"repost_count": 1079,
"quote_count": 2077,
"bookmark_count": 0,
"embed_type": "video",
"media_urls": [
"https://video.bsky.app/watch/did%3Aplc%3Az72i7hdynmk6r22z27h6tvur/.../playlist.m3u8"
],
"thumbnail_url": "https://video.bsky.app/watch/did%3Aplc%3Az72i7hdynmk6r22z27h6tvur/.../thumbnail.jpg",
"duration_seconds": 17.3,
"labels": [],
"flags": {
"nsfw": false,
"pinned": false,
"deleted": false
},
"post": {
"uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"author": {
"handle": "bsky.app",
"...": "..."
},
"record": {
"$type": "app.bsky.feed.post",
"...": "..."
},
"embed": {
"$type": "app.bsky.embed.video#view",
"...": "..."
},
"like_count": 7207,
"reply_count": 2110,
"repost_count": 1079,
"quote_count": 2077,
"id": "3mk4lzkrnk22d",
"url": "https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d",
"flags": {
"nsfw": false,
"pinned": false,
"deleted": false
},
"...": "(the postView verbatim, keys snake_cased)"
},
"thread_context": {},
"computed": {
"engagement_rate": 0.0356,
"language": "en",
"content_category": "other",
"estimated_reach": 35288055
},
"threadgate": null,
"author_followers_count": 34997628,
"partial": true,
"warnings": [
"reach estimate covers 100 of 3156 amplifiers (reach_max_amplifiers=100)"
],
"stats": {
"requests": 15,
"api_calls": 12,
"video_lookups": 1,
"index_calls": 1,
"proxy": false,
"replies_requested": 200,
"replies_available": 2110,
"replies_from_thread": 196,
"replies_index_total": 2114,
"replies_index_hidden": 4,
"replies_from_index": 4,
"reach_amplifiers_resolved": 100,
"reach_truncated": true,
"replies_total": 683,
"replies_top_level": 200,
"replies_max_depth": 6,
"repliers": 516,
"language_source": "post_text",
"rows_total": 684,
"elapsed_ms": 7490,
"...": "..."
},
"scraped_at": "2026-09-22T10:51:34.102Z"
},
{
"row_type": "reply",
"status": "ok",
"position": 2,
"depth": 1,
"thread_index": 0,
"parent_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"root_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk4lzkrnk22d",
"is_reply": true,
"post_id": "3mk6ipt5iv22y",
"url": "https://bsky.app/profile/bsky.app/post/3mk6ipt5iv22y",
"text": "We hear and appreciate your feedback on the photo carousel. We're going to put it back in the oven for now. ...",
"author_handle": "bsky.app",
"like_count": 4162,
"reply_count": 425,
"repost_count": 499,
"quote_count": 574,
"computed": null,
"stats": null,
"...": "(same keys as the post row)"
},
{
"row_type": "reply",
"status": "ok",
"position": 3,
"depth": 2,
"thread_index": 1,
"parent_uri": "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.bsky.feed.post/3mk6ipt5iv22y",
"post_id": "3mk6ycvqfnk2p",
"url": "https://bsky.app/profile/bloops.uk/post/3mk6ycvqfnk2p",
"text": "You're looking very cute right now Bluesky.",
"author_handle": "bloops.uk",
"like_count": 2,
"...": "..."
}
],
"warnings": [
"reach estimate covers 100 of 3156 amplifiers (reach_max_amplifiers=100)"
],
"next_cursor": "eyJsayI6e30sIm8iOjQ5LCJwIjoxLCJwb3MiOjUwLCJyIjoiYXQ6Ly9kaWQ6cGxjOno3Mmk3aGR5bm1rNnIyMnoyN2g2dHZ1ci9hcHAuYnNreS5mZWVkLnBvc3QvM21rNGx6a3JuazIyZCIsInMiOlsiMjdoNnR2dXIvM21rNmlwdDVpdjIyeSIsImxlbjZ5em1tLzNtazZ5Y3ZxZm5rMnAiLCIuLi4iXSwidSI6Imh0dHBzOi8vYnNreS5hcHAvcHJvZmlsZS9ic2t5LmFwcC9wb3N0LzNtazRsemtybmsyMmQifQ"
}
}你可以提取的数据
Bluesky 单条帖子爬虫根据 URL 每次调用提取一条 Bluesky 帖子,并按扁平化的讨论串逐行返回:帖子本身、它的上级帖子(如果它是回复),以及它的回复。下面的每个字段都来自目录中的示例响应,是带类型的 JSON。
帖子与讨论串位置
响应中共 19 个字段。
- input_url
- post_uri
- uri
- url
- post_id
- row_type
- position
- depth
- 另有 +11
互动与媒体
响应中有 11 个字段。
- like_count
- reply_count
- repost_count
- quote_count
- bookmark_count
- embed_type
- media_urls
- thumbnail_url
- 另外 3 项
作者
响应中有 4 个字段。
- author_handle
- author_did
- author_display_name
- author_followers_count
行状态与运行详情
响应中有 7 个字段。
- status
- note
- http_status
- partial
- warnings
- stats
- scraped_at
响应结构与分页
响应中共 18 个字段。
- success
- data.urls
- data.post_uri
- data.status
- data.note
- data.http_status
- data.depth
- data.parent_height
- 另有 +10
响应结构参考
示例响应中的每个字段。字段名每次调用都保持不变。
| 字段 | 类型 | 示例 | 说明 |
|---|---|---|---|
rows.input_url | string | "https://bsky.app/profile/bsky.app/post/3mk4…" | 你发送的 URL,在该行中原样回显 |
rows.post_uri | string | "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.b…" | 你所请求帖子的 at:// URI |
rows.uri | string | "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.b…" | 本行所对应帖子的 at:// URI |
rows.url | string | "https://bsky.app/profile/bsky.app/post/3mk4…" | 本行所对应帖子在 bsky.app 上的 URL |
rows.post_id | string | "3mk4lzkrnk22d" | 帖子 ID(记录键) |
rows.row_type | string | "post" | post、parent 或 reply |
rows.position | integer | 1 | 该行在讨论串中的位置 |
rows.depth | integer | 0 | 帖子以下的回复层级;帖子本身为 0 |
rows.thread_index | null | null | 回复在讨论串中的序号;帖子本身为 null |
rows.parent_uri | null | null | 父帖的 at:// URI;帖子本身为 null |
rows.root_uri | string | "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.b…" | 讨论串根帖的 at:// URI |
rows.is_reply | boolean | false | 该行是回复时为 true |
rows.text | string | "v1.121 is live!\n\nWe've increased the qual…" | 帖子正文 |
rows.published_at | string | "2026-04-23T19:39:35.560Z" | 帖子发布的时间 |
rows.langs | array | 1 items | 帖子声明的语言 |
rows.labels | array | [] | 帖子上的审核标签 |
rows.post | object | {…} | Bluesky 返回的完整帖子对象 |
rows.thread_context | object | {…} | 该行的讨论串上下文 |
rows.threadgate | null | null | 回复限制设置;没有则为 null |
rows.like_count | integer | 7207 | 帖子的点赞数 |
rows.reply_count | integer | 2110 | 帖子的回复数 |
rows.repost_count | integer | 1079 | 帖子的转发数 |
rows.quote_count | integer | 2077 | 帖子的引用帖数 |
rows.bookmark_count | integer | 0 | 帖子的收藏数 |
rows.embed_type | string | "video" | 附带嵌入内容的类型,例如视频 |
rows.media_urls | array | 1 items | 附带媒体的 URL |
rows.thumbnail_url | string | "https://video.bsky.app/watch/did%3Aplc%3Az7…" | 视频帖子的缩略图 URL |
rows.duration_seconds | number | 17.3 | 视频长度(秒) |
rows.computed | object | {…} | 包含 engagement_rate、language、content_category 和 estimated_reach 的对象 |
rows.flags | object | {…} | 标记,例如 nsfw、pinned 和 deleted |
rows.author_handle | string | "bsky.app" | 帖子作者的用户名 |
rows.author_did | string | "did:plc:z72i7hdynmk6r22z27h6tvur" | 帖子作者的 DID |
rows.author_display_name | string | "Bluesky" | 帖子作者的显示名称 |
rows.author_followers_count | integer | 34997628 | 作者的粉丝数 |
rows.status | string | "ok" | 行状态,帖子读取成功时为 ok |
rows.note | null | null | 附加说明;没有则为 null |
rows.http_status | null | null | 上游 HTTP 状态;不适用时为 null |
rows.partial | boolean | true | 当计算值只覆盖部分数据时为 true |
rows.warnings | array | 1 items | 该行的警告列表 |
rows.stats | object | {…} | 运行详情:发出的请求数、找到的回复数等 |
rows.scraped_at | string | "2026-09-22T10:51:34.102Z" | 该行被抓取的 UTC 时间 |
success | boolean | true | 每个 200 响应都为 true |
data.urls | string | "https://bsky.app/profile/bsky.app/post/3mk4…" | 你的输入,原样返回 |
data.post_uri | string | "at://did:plc:z72i7hdynmk6r22z27h6tvur/app.b…" | 所请求帖子的 at:// URI |
data.status | string | "ok" | ok;帖子被删除、缺失或被屏蔽时为相应状态 |
data.note | null | null | 附加说明;没有则为 null |
data.http_status | null | null | 上游 HTTP 状态;不适用时为 null |
data.depth | integer | 6 | 所用的回复深度 |
data.parent_height | integer | 80 | 所用的上级深度 |
data.reply_sort | string | "api" | 所用的回复顺序 |
data.max_replies | integer | 200 | 所用的直接回复上限 |
data.page | integer | 1 | 本次响应的页码 |
data.page_size | integer | 50 | 每页行数 |
data.offset | integer | 0 | 本页的行偏移量 |
data.next_offset | integer | 49 | 下一页的行偏移量 |
data.replies_total | integer | 683 | 讨论串中找到的回复总数 |
data.has_more | boolean | true | 还有更多页时为 true |
data.warnings | array | 1 items | 该响应的警告列表 |
data.next_cursor | string | "eyJsayI6e30sIm8iOjQ5LCJwIjoxLCJwb3MiOjUwLCJ…" | 作为 cursor 传回即可获取下一页;最后一页为 null |
请求参数参考
| 名称 | 类型 | 必填 | 默认值 | 说明 | 示例 |
|---|---|---|---|---|---|
urls | string | 是 | — | Bluesky 帖子 URL(https://bsky.app/profile/<handle|did>/post/<rkey>)、at:// URI,或纯 <handle>/post/<rkey>。每次调用一条帖子。首次调用必填;提供 cursor 时忽略。别名:url、post_url、post_urls、uri、uris、at_uri | https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d |
cursor | string | 否 | — | 原样传回上一个响应的 data.next_cursor,即可获取下一页;null 表示最后一页 | — |
depth | integer | 否 | 6 | 帖子以下的回复层级数,默认 6;0 表示只返回帖子本身。锁定在游标中 | 6 |
parent_height | integer | 否 | 80 | 当帖子是回复时,在第 1 页作为 parent 行包含的上级帖子数,默认 80;0 表示不包含。锁定在游标中 | 80 |
max_replies | integer | 否 | 0 | 要返回的直接回复数,默认 0,表示 200;显式设置的值上限为 500。在 reply_sort 之后裁剪。锁定在游标中 | 0 |
reply_index | boolean | 否 | true | 默认 true:从公开回复索引补足超出首个来源上限的直接回复。false 则只使用讨论串调用。锁定在游标中 | true |
reply_sort | string | 否 | api | 每一层的回复顺序,默认 api。选项:api、newest、oldest、top(先按点赞,再按回复)。锁定在游标中 | api |
compute_metrics | boolean | 否 | true | 默认 true:在第 1 页查询作者,以获得 author_followers_count、computed.engagement_rate 和 flags.pinned。锁定在游标中 | true |
estimate_reach | boolean | 否 | true | 默认 true:在第 1 页解析转发者和引用者,以获得 computed.estimated_reach。锁定在游标中 | true |
reach_max_amplifiers | integer | 否 | 100 | 为 estimated_reach 解析的放大者数量,默认 100(上限 100);超过后该估算会被标记为部分结果 | 100 |
video_duration | boolean | 否 | true | 默认 true:视频帖子在第 1 页获得 duration_seconds。锁定在游标中 | true |
use_proxy | boolean | 否 | true | 通过 Scrapier 的住宅代理池路由,默认开启。保持原样即可 | true |
raw_data | boolean | 否 | false | 在 raw_responses 下返回 Bluesky 的上游原始载荷,而不是格式化后的条目 | true |
每次调用一条帖子:要读取十条帖子,就调用十次,并用 cursor 为每条翻页。布尔值是字符串 true 或 false。
Bluesky 单条帖子爬虫 API 的分页
Bluesky 单条帖子爬虫 API 分页返回结果。把 data.next_cursor 作为 cursor 传回即可获取下一页;它为 null 时表示没有更多了。每次成功的调用,无论是第一页还是之后的页,都消耗 10 积分。
无需 Bluesky 登录即可访问
Bluesky 单条帖子爬虫 API 不需要 Bluesky 账户、登录或会话 Cookie。你在 X-API-Key 请求头中发送 Scrapier 密钥,即可获得 JSON。它只读取公开数据:任何访客无需登录就能看到的内容。
速度、成本和并发
| 指标 | 数值 | 来源 |
|---|---|---|
| 成功调用的成本 | 10 积分 | Scrapier 目录 |
| 失败调用的成本 | 0 积分 | 任何非 2xx 响应 |
| 每个密钥的并行请求数 | 无限制 | 所有套餐均无速率限制 |
| 建议的客户端超时 | 210 秒 | Scrapier 文档,适用于每个端点 |
Bluesky 单条帖子爬虫 API 的延迟
Scrapier 不公布该端点的延迟或成功率数据。每次调用都在调用时读取 Bluesky,所以响应时间取决于 Bluesky 和结果的大小。请按文档对每个端点的建议,把客户端超时设为 210 秒。
端点的限制
Bluesky 单条帖子爬虫 API 的实际限制。
- 仅限公开数据。
- 失败的调用,例如讨论串行页缺失或不可用,会返回非 2xx 状态,并消耗 0 积分。
- 数据在调用时实时读取。
- 没有速率限制,因此需要多少并行请求,就发多少。
- 较大的结果分页返回;把
data.next_cursor作为cursor传回。 - Bluesky 没有显示的字段不会返回。
Scrapier 与官方 Bluesky API 对比
如果你需要完全定制的爬虫,或已经运行自己的抓取技术栈,自建能提供更多控制;Scrapier 适合想用一个密钥、一种 JSON 结构覆盖多个平台的团队。
| 功能 | Scrapier Bluesky 爬虫 | 自建 Bluesky 抓取 |
|---|---|---|
| 所需权限 | 一个 Scrapier API 密钥 | 你自己的代理、解析器和服务器 |
| 哪些数据 | 按 URL 获取一条帖子及其讨论串,与 Bluesky 显示的一致 | 你的解析器提取到什么就是什么 |
| 返回的字段 | 每行 41 个字段:正文、作者、计数、媒体、讨论串位置和计算指标 | 你构建并维护什么就是什么 |
| 设置 | 注册,复制密钥,发送请求 | 编写选择器,处理封锁和重试 |
| 成本 | 每次调用 10 积分,每 1,000 次调用低至 $1.20 | 代理、服务器和工程时间 |
错误与重试处理
| 状态 | 含义 | 是否计费 | 解决办法 |
|---|---|---|---|
| 200 | 在 data.rows 中返回的讨论串行数据页 | 是 | — |
| 400 | 输入有误或缺失 | 否 | 请检查 urls:每次调用一个值 |
| 401 | 缺少 X-API-Key 请求头 | 否 | 添加该请求头 |
| 402 | 积分用完(响应体含 balance) | 否 | 充值;重试无济于事 |
| 403 | API 密钥无效或已撤销 | 否 | 在控制台中检查密钥 |
| 429 | 被限流 | 否 | 等待 Retry-After 秒后重试 |
| 5xx | 上游故障或超时 | 否 | 退避重试;把客户端超时设为 210 s |
来自错误参考。任何非 2xx 响应消耗 0 积分。
Bluesky 单条帖子爬虫 API 的重试逻辑
import time, requests def get_post(value, key, tries=5): for attempt in range(tries): r = requests.get( "https://api.scrapier.io/api/v2/bluesky-single-posts/", headers={"X-API-Key": key}, params={"urls": value}, timeout=210, ) if r.status_code == 429: time.sleep(int(r.headers.get("Retry-After", 2 ** attempt))) elif r.status_code >= 500: time.sleep(2 ** attempt) else: r.raise_for_status() return r.json() raise RuntimeError("gave up after retries")
价格与速率限制
| 套餐 | 月费 | 包含的讨论串行页数 | 每 1,000 次成本 |
|---|---|---|---|
| Hobby | $29 | 15,000 | $1.93 |
| Pro | $79 | 50,000 | $1.58 |
| Scale | $299 | 250,000 | $1.20 |
Bluesky 单条帖子爬虫 API 的计费规则
Bluesky Single Posts Scraper API 按每个成功获取的帖子串内容页收取 10 积分。失败的调用(即任何非 2xx 状态)消耗 0 积分。所有套餐都没有速率限制。付费前可以先用免费额度试用。
批量查询与 CSV
urls 每次调用只接受一个值。对于列表,循环并行调用(没有速率限制),然后把每一行展平为一行 CSV。
import csv, requests from concurrent.futures import ThreadPoolExecutor values = ["https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d"] # your list def fetch(value): r = requests.get( "https://api.scrapier.io/api/v2/bluesky-single-posts/", headers={"X-API-Key": "YOUR_API_KEY"}, params={"urls": value}, timeout=210, ) r.raise_for_status() out = r.json()["data"]["rows"] return out if isinstance(out, list) else [out] # no rate limits: use as many workers as you need with ThreadPoolExecutor(max_workers=3) as pool: rows = [row for part in pool.map(fetch, values) for row in part] cols = ["text", "author_handle", "like_count", "reply_count", "repost_count", "quote_count"] with open("out.csv", "w", newline="") as f: w = csv.DictWriter(f, fieldnames=cols, extrasaction="ignore") w.writeheader() w.writerows(rows)
从 Bluesky 单条帖子爬虫 API 导出 CSV
text,author_handle,like_count,reply_count,repost_count,quote_count v1.121 is live!\n\nWe've increased the quality of photos in posts by doubling the max file size to 2MB and the resolution limit to 4000x4000. \n\nPlus, posts with multiple photos now appear in a carousel so you can show off your photography in all its glory.,bsky.app,7207,2110,1079,2077
通过 MCP 供 AI 智能体访问
Bluesky 单条帖子爬虫 API 的 MCP
AI 智能体可通过 Scrapier MCP 服务器 https://mcp.scrapier.io/mcp 使用同一个端点。在 Claude Code 中一条命令即可注册:claude mcp add -t http scrapier https://mcp.scrapier.io/mcp --header "X-API-Key: YOUR_API_KEY"。智能体用 search_endpoints 找到该端点,再用 run_scrape 和端点 ID bluesky-single-posts 调用它。它接受相同的 urls 输入,每页讨论串行同样消耗 10 积分。各客户端的设置见 Bluesky 单条帖子爬虫 MCP 页面。
按角色划分的集成路径
n8n 和 Make
- 添加一个 HTTP Request 步骤
- 带上你的
X-API-Key请求头,对该端点发送 GET - 把
data.rows字段映射到你的列
循环并翻页
CSV 和展平的 JSON
把每一行展平为一行 CSV,每个字段一列,可直接用于 Sheets、Excel 或 BI 工具。
法律与合规说明
抓取公开可用的网页在许多国家通常是合法的,但答案取决于你收集什么、你身在何处以及如何使用。在美国,hiQ Labs v. LinkedIn 是公开数据抓取中最常被引用的案例。Scrapier 只返回任何访客无需登录就能看到的数据。回复带有用户名,可能包含个人信息,所以只收集你需要的内容。在 GDPR 及类似法律下,收集公开数据可能是允许的,但你如何存储和使用个人数据仍须符合当地的数据保护规定,并且 Bluesky 的条款同样适用。如果你的用例涉及大量存储个人数据,请咨询法律顾问。这不构成法律建议;请参阅我们的使用条款。
常见问题
有 Bluesky 讨论串行页 API 吗?
有。Scrapier 的 Bluesky 单条帖子爬虫 API 只需一次 GET 请求和一个 X-API-Key 请求头,就能以 JSON 返回任何公开的讨论串行页。无需 Bluesky 应用或登录。
如何从 Python 调用?
对 <code>https://api.scrapier.io/api/v2/bluesky-single-posts/</code> 使用 <code>requests.get</code>,带上 <code>params={'urls': 'https://bsky.app/profile/bsky.app/post/3mk4lzkrnk22d'}</code> 和 <code>headers={"X-API-Key": KEY}</code>。读取 <code>r.json()["data"]["rows"]</code>。
调用失败时会怎样?
任何非 200 响应都免费。对 429 和 5xx 请退避重试;API 已经会重试上游故障。
多少钱?
每次成功调用 10 积分,在 Pro 套餐上每 1,000 页讨论串行约 $1.58。失败的调用免费。
有 OpenAPI 规范吗?
有。获取它无需密钥,并且涵盖每个 Scrapier 端点。