360 Secure SkillHub
360 安全技能中心

Apify Bluesky Scraper

这是基于Apify Actor的Bluesky帖子抓取工具,核心功能是通过AT协议搜索、提取平台社交帖子,适用于用户搜索Bluesky内容、监控讨论或提取数据的场景。需预先设置APIFY_TOKEN环境变量,且系统需有curl和jq工具。用户可自定义搜索关键词、最大结果数、排序方式,支持同步/异步运行,最终返回帖子数据,可提供汇总分析或JSON/CSV导出。

marcindudekdev
marcindudekdev
热度 80.89
最近更新 2026-05-11 17:29:21
分类:数据依赖:代码执行 / 第三方 API应用场景:社交媒体 / 数据处理 / 摘要总结 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add apify-bluesky-scraper
Metadata
name
apify-bluesky-scraper
description
Scrape Bluesky social posts via AT Protocol. Use when user asks to search Bluesky, find Bluesky posts, monitor Bluesky discussions, or extract Bluesky data. Requires APIFY_TOKEN environment variable.
metadata
{"openclaw":{"emoji":"🦋","requires":{"env":["APIFY_TOKEN"],"bins":["curl","jq"]},"primaryEnv":"APIFY_TOKEN"}}

Bluesky Scraper

Scrape Bluesky posts using an Apify Actor via the REST API.

Actor ID

WAJfBnZBYR9mJrk5d

Prerequisites

  • APIFY_TOKEN environment variable must be set
  • curl and jq must be available

Workflow

Step 1: Confirm search parameters with user

Ask what they want to search for. Supported input fields:

  • searchTerms (array of strings) - keywords to search
  • maxResults (integer) - max posts to return (default: 50)
  • sortBy (string) - "relevance" or "latest"

Step 2: Run the Actor (synchronous)

RESULT=$(curl -s -X POST "https://api.apify.com/v2/acts/WAJfBnZBYR9mJrk5d/run-sync-get-dataset-items?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["SEARCH_TERM"], "maxResults": 50, "sortBy": "relevance"}')
echo "$RESULT" | jq '.'

For larger jobs (async):

RUN_ID=$(curl -s -X POST "https://api.apify.com/v2/acts/WAJfBnZBYR9mJrk5d/runs?token=$APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"searchTerms": ["TERM"], "maxResults": 50}' | jq -r '.data.id')

Step 3: Poll and fetch (if async)

STATUS=$(curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID?token=$APIFY_TOKEN" | jq -r '.data.status')
# Poll every 5s until SUCCEEDED or FAILED
curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID/dataset/items?token=$APIFY_TOKEN" | jq '.'

Step 4: Present results

Summarize: total posts, top by engagement, common themes. Offer JSON/CSV export.

Error Handling

  • If APIFY_TOKEN not set: export APIFY_TOKEN=your_token
  • If run FAILS: curl -s "https://api.apify.com/v2/actor-runs/$RUN_ID/log?token=$APIFY_TOKEN"
  • Rate limited (429): wait 60s, retry