微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧵

Threads 社交数据抓取与品牌监控

scavio-threads · v1.0.0
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 scavio-ai 公开目录收录
66 下载 0 安装 230 收藏 1 浏览

简介

Scavio 官方提供的 Threads 数据 API,支持创作者调研、竞品监控及舆情分析,返回结构化 JSON 便于 AI Agent 集成。

原始描述

Read Threads profiles, a user's posts and replies, a single post, its comment tree, and search Threads people as structured JSON. 6 endpoints, 2 credits by user_id and 4 by username. People search only, there is no content search.

通过你的 Agent 添加

安装目录:scavio-threads/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/scavio-threads/
Codex CLI~/.codex/skills/scavio-threads/
DeepSeek Harness~/.agents/skills/scavio-threads/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Scavio Threads 技能通过 6 个 REST API 端点,提供对 Meta Threads 平台的结构化数据访问能力。用户需先获取 SCAVIO_API_KEY 环境变量,所有请求均采用 POST 方法携带 JSON 请求体。核心功能覆盖五大场景:用户资料查询、帖子与回复分页抓取、单帖详情获取、评论树遍历、以及用户搜索。

成本优化是使用该技能的关键策略。API 采用信用点计费制,user_id 路径仅需 2 点/请求,而 username 路径因需额外解析步骤成本翻倍至 4 点。推荐工作流为:先用 /search/users 或 /profile 解析用户名获取 user_id,后续所有操作均基于 ID 执行,可将大规模爬取成本降低 50%。

显著优点

结构化数据输出是最大亮点——所有端点返回标准 JSON 格式,天然适配 LangChain、CrewAI、AutoGen 等 AI Agent 框架,无需额外解析 HTML 或处理反爬机制。成本透明可控,响应体中包含 credits_used 和 credits_remaining 字段,实时掌握消耗情况。支持分页游标机制,可稳定获取历史帖子和深层评论树,适合长期监控场景。

该技能填补了 Threads 官方 API 缺失的空白,为品牌方、MCN 机构和研究者提供了合规的数据获取通道。50 点免费额度配合无需信用卡的注册流程,降低了试用门槛。

潜在缺点与局限性

无内容搜索能力是最突出的功能缺口——Threads 上游接口不支持关键词、话题标签或主题搜索,/search/users 仅限人名/用户名匹配。用户若需主题监控,只能先锁定目标账号再本地过滤,增加了实现复杂度。

成本累积效应需警惕:按用户名爬取 20 页帖子消耗 80 点,按 ID 仅需 40 点,高频场景下成本差异显著。此外,API 依赖 Scavio 作为中间层,存在单点故障风险;502 错误提示上游异常,虽可重试但增加了调用不确定性。

适合的目标群体

  • 品牌市场团队:监控竞品账号动态、追踪 KOL 合作效果
  • 创作者与 MCN 机构:分析头部账号内容策略、评估自身数据表现
  • 舆情研究者:抓取公开评论进行情感分析与话题趋势研判
  • AI Agent 开发者:为对话机器人注入实时社交数据能力

使用风险

环境依赖风险:SCAVIO_API_KEY 缺失将直接导致 401 错误,需在 Agent 启动前完成配置注入。速率限制风险:429 错误提示配额耗尽,高频抓取需内置指数退避重试逻辑。数据一致性风险:Threads 平台内容可随时删除或设为私密,API 返回为快照数据,非实时同步。成本失控风险:未优化 user_id 复用策略时,大规模采集信用点消耗可能超出预期。建议生产环境接入前建立成本监控与告警机制。

合规提示:该技能仅抓取公开帖子,不涉及私信或隐私数据,但使用者仍需遵守 Threads 平台条款及目标市场的数据保护法规(如 GDPR),避免将数据用于歧视性画像或未经授权的再分发。

技能正文


name: scavio-threads description: Read Threads profiles, a user's posts and replies, a single post, its comment tree, and search Threads people as structured JSON. 6 endpoints, 2 credits by user_id and 4 by username. People search only, there is no content search. version: 1.0.0 tags: threads, meta-threads, social-media, creator-data, influencer-research, profiles, posts, replies, comments, people-search, brand-monitoring, sentiment, competitor-research, agents, langchain, crewai, autogen, structured-data, json, ai-agents metadata: openclaw: requires: env: - SCAVIO_API_KEY primaryEnv: SCAVIO_API_KEY timeout: 120 throttle: 1 emoji: "\U0001F9F5" homepage: https://scavio.dev/docs/threads-profile

Threads via Scavio

Read a Threads profile, page a user's posts and replies, fetch a single post by id or URL, walk its comment tree, and search Threads for people. All endpoints return structured JSON.

Two things to know before you start: user_id costs half what a username costs, and Threads has no content search — only people search.

When to trigger

Use this skill when the user asks to:

  • Look up a Threads profile and its follower/post counts
  • Pull a Threads user's recent posts or their replies
  • Read a single Threads post by id or by a threads.net URL
  • Read the replies under a Threads post
  • Find Threads accounts by name or handle
  • Research a creator, brand or competitor's Threads presence
  • Monitor what an account is posting on Threads

Do NOT reach for this skill to search Threads for a topic, keyword or hashtag. That capability does not exist. See Guardrails.

Setup

Get a free API key at https://scavio.dev (50 free credits to get started, no card required):

export SCAVIO_API_KEY=sk_live_your_key

Every request is a POST with a JSON body and:

Authorization: Bearer $SCAVIO_API_KEY

Endpoints

Base URL: https://api.scavio.dev.

Endpoint Credits Description
POST /api/v1/threads/profile 2 by user_id, 4 by username Profile details for a Threads user
POST /api/v1/threads/user/posts 2 by user_id, 4 by username A user's posts, cursor-paginated
POST /api/v1/threads/user/replies 2 by user_id, 4 by username A user's replies, cursor-paginated
POST /api/v1/threads/post 2 A single post by id or threads.net URL
POST /api/v1/threads/post/comments 2 Replies to a post, cursor-paginated
POST /api/v1/threads/search/users 2 Threads profiles matching a name or handle

Cost rule: the handle surcharge

Cost is a function of the request body, not a constant.

  • Addressed by user_id: 2 credits. This is the cheap path.
  • Addressed by username: 4 credits. A handle costs double.

The reason is upstream: the provider's username lookup is dead, so passing a handle forces a second upstream call to resolve it to an id first. You pay for both.

Only /profile, /user/posts and /user/replies accept a username at all, so only those three can cost 4. /post, /post/comments and /search/users are always 2.

Resolve once, reuse the id. Call /profile or /search/users once with the handle, keep the user_id, and address everything after that by id. A 20-page crawl by handle costs 80 credits; by id it costs 40.

Workflow

  1. Resolve the handle: call /threads/search/users with the name or handle (2 credits), or /threads/profile with username (4 credits). Keep the user_id you get back.
  2. Profile: call /threads/profile with user_id (2 credits).
  3. Posts and replies: call /threads/user/posts and /threads/user/replies with user_id. Both return next_cursor; pass it back as cursor for the next page and stop when it is null.
  4. A single post: call /threads/post with post_id or a threads.net url.
  5. Comments: call /threads/post/comments with post_id. It is cursor-paginated the same way. Note this endpoint takes post_id only, never a username.

profile, post and search/users do not paginate. user/posts, user/replies and post/comments are cursor-paginated.

Parameters

Profile (/profile)

username or user_id is required.

Parameter Type Default Description
user_id string one of Numeric id, e.g. 63625256886. The 2-credit path
username string one of Handle without the @, e.g. natgeo (1-60 chars). Costs 2 extra credits

User posts (/user/posts) and user replies (/user/replies)

username or user_id is required.

Parameter Type Default Description
user_id string one of Numeric id. The 2-credit path
username string one of Handle without the @ (1-60 chars). Costs 2 extra credits
cursor string -- Pagination cursor from a prior next_cursor

Post (/post)

post_id or url is required.

Parameter Type Default Description
post_id string one of Post id, e.g. 3349029093483693129
url string one of A threads.net post URL

Post comments (/post/comments)

Parameter Type Default Description
post_id string required Post id. This endpoint does NOT accept a username or a URL
cursor string -- Pagination cursor from a prior next_cursor

User search (/search/users)

Parameter Type Default Description
query string required Name or handle to match (1-200 chars)

Examples

import os, requests

BASE = "https://api.scavio.dev"
HEADERS = {"Authorization": f"Bearer {os.environ['SCAVIO_API_KEY']}"}

# 1. Resolve the handle ONCE (2 credits), then work by id
found = requests.post(f"{BASE}/api/v1/threads/search/users", headers=HEADERS,
    json={"query": "national geographic"}).json()

user_id = "63625256886"  # taken from the search result, then reused

# 2. Profile by id: 2 credits. By username it would be 4.
profile = requests.post(f"{BASE}/api/v1/threads/profile", headers=HEADERS,
    json={"user_id": user_id}).json()

# 3. Page their posts by id (2 credits per page)
page = requests.post(f"{BASE}/api/v1/threads/user/posts", headers=HEADERS,
    json={"user_id": user_id}).json()
cursor = page["data"]["next_cursor"]
if cursor:
    page2 = requests.post(f"{BASE}/api/v1/threads/user/posts", headers=HEADERS,
        json={"user_id": user_id, "cursor": cursor}).json()

# 4. Their replies, same pattern
replies = requests.post(f"{BASE}/api/v1/threads/user/replies", headers=HEADERS,
    json={"user_id": user_id}).json()

# 5. A single post, then its comment tree (post_id only, never a handle)
post = requests.post(f"{BASE}/api/v1/threads/post", headers=HEADERS,
    json={"post_id": "3349029093483693129"}).json()
comments = requests.post(f"{BASE}/api/v1/threads/post/comments", headers=HEADERS,
    json={"post_id": "3349029093483693129"}).json()

Response

Every response uses the envelope { data, response_time, credits_used, credits_remaining }.

  • profile returns the user's profile details.
  • user/posts, user/replies and post/comments return their rows plus next_cursor. A null next_cursor means there are no more pages.
  • post returns the single post.
  • search/users returns the matching profiles.

Read credits_used on the response rather than assuming a cost. It will read 4 whenever you addressed a user-keyed endpoint by handle.

Guardrails

  • There is no Threads content search. Searching Threads for a keyword, topic or hashtag is not possible through this API — the upstream's search_top and search_recent fail on every attempt. /search/users is people search and nothing else. If the user asks to search Threads posts for a term, tell them plainly that Threads does not expose this, and offer the alternative of pulling a known account's posts with /user/posts and filtering client-side. Never imply a content search exists.
  • Prefer user_id over username everywhere. A handle doubles the cost of /profile, /user/posts and /user/replies, from 2 credits to 4. Resolve the handle once and reuse the id for the rest of the session.
  • Do not send username and user_id together on the same request. Conflicting identifiers are rejected with a 422.
  • /post/comments takes post_id only. It has no username form and no URL form.
  • Never fabricate post text, handles, follower counts or engagement numbers. Only return data the API returned.
  • Preserve author attribution when summarising a thread.
  • Threads content is public posts only. Do not present it as anything more.

Failure handling

Threads uses different error codes from the retail endpoints. There is no 400 and no 503 here.

  • 422 means a missing or conflicting identifier: no username and no user_id, or both at once. Send exactly one.
  • 404 means no matching user was found. Check the handle spelling, or resolve it through /search/users first.
  • 401 means the API key is invalid or missing. Check SCAVIO_API_KEY.
  • 429 means a rate or usage limit was exceeded. Wait before retrying. See https://scavio.dev/docs/rate-limits.
  • 502 means the upstream errored. Wait a few seconds and retry once.
  • If a paginated call returns a null next_cursor, that is the end of the data, not a failure. Stop paging.
  • If SCAVIO_API_KEY is not set, prompt the user to export it before continuing.

Docs

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

content-mediadata-analyticsmarketingautomationapi

同类 Skill