用途:通过位于 https://twitter.surf.cascade.fyi 的付费 Twitter/X 数据 API 进行推文与用户研究,所有请求均使用 x_payment 工具发起。
主要能力:
- 搜索推文(/search):支持 50+ 高级运算符,参数 q(查询词,必填)、type(Latest 或 Top,默认 Latest)、limit(1-200,默认 20)、cursor(分页游标)。常用运算符含 from:user、to:user、@user、min_faves:N、min_retweets:N、min_replies:N、filter:media/images/videos/links/replies、-filter:replies、since/until 日期、within_time:Nh、lang:code、conversation_id:ID、filter:self_threads,可组合使用。返回 query、tweets[]、count、hasMore、nextCursor 与 summary(totalLikes、totalRetweets、totalReplies、avgLikes、maxLikes、topTweetId)。
- 抓取推文(/tweet/{ref}):ref 可为推文 ID 或逗号分隔的多个 ID(批量抓取时不含 include)。参数 include(thread、replies、quotes,逗号分隔)与 limit(1-200,默认 50)。若所取推文是回复,会自动附带被回复的 parent。
- 抓取用户(/user/{ref}):ref 可为用户名(elonmusk 或 @elonmusk)或用户 ID,也可逗号分隔批量。参数 include(tweets、followers、following)、limit(1-200,默认 50)、include_replies(布尔,默认 false)。
使用方式:以 x_payment 调用,指定 url、method、params。例如搜索:x_payment({"url": "https://twitter.surf.cascade.fyi/search", "method": "GET", "params": "{"q": "from:elonmusk AI", "type": "Latest", "limit": 20}"})。分页时复用上一次响应的 nextCursor。
费用与限制:每次调用 0.003 USDC,在 Solana 主网或 Base 主网通过 x402 支付;每个分页请求单独计费,建议用精确运算符和合理 limit 减少调用次数。错误码:400 参数无效,402 需付款(由 x_payment 自动处理),404 未找到推文或用户,502 上游 API 错误。
适用场景:话题监控、获取推文完整上下文(线程/回复/引用)、用户研究、结果分页遍历。
限制:仅通过付费 API 提供,缺少官方文本中未说明的部署与集成细节。