surf
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSurf APIs
Surf APIs
Unified pay-per-use API at . No signup, no API keys - just pay per call.
surf.cascade.fyi10 composite REST endpoints + 9 MCP tools. Payments in USDC on Solana, Base, or Tempo (MPP).
| Surface | Endpoints | Price |
|---|---|---|
| search, tweet, user | $0.005/call | |
| search, post, subreddit, user | $0.005/call | |
| Web | search | $0.01/call |
| Web | crawl | $0.002/call |
| Inference | 15 models | $0.001 - dynamic |
surf.cascade.fyi包含10个复合REST端点 + 9个MCP工具。支持在Solana、Base或Tempo(MPP)网络使用USDC支付。
| 服务领域 | 端点 | 价格 |
|---|---|---|
| search, tweet, user | 0.005美元/次调用 | |
| search, post, subreddit, user | 0.005美元/次调用 | |
| Web | search | 0.01美元/次调用 |
| Web | crawl | 0.002美元/次调用 |
| 推理 | 15个模型 | 0.001美元起(动态定价) |
Try it
快速试用
Test any endpoint with x402-proxy:
bash
undefined使用x402-proxy测试任意端点:
bash
undefinedTwitter user profile + recent tweets ($0.005)
获取Twitter用户资料+近期推文(0.005美元)
npx x402-proxy https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi
npx x402-proxy https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi
Search Reddit ($0.005)
搜索Reddit内容(0.005美元)
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/reddit/search
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/reddit/search
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/reddit/search
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/reddit/search
Chat with Kimi K2.5 ($0.004)
与Kimi K2.5对话(0.004美元)
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"model":"moonshotai/kimi-k2.5","messages":[{"role":"user","content":"Hello"}]}'
https://surf.cascade.fyi/api/v1/inference/completions
-d '{"model":"moonshotai/kimi-k2.5","messages":[{"role":"user","content":"Hello"}]}'
https://surf.cascade.fyi/api/v1/inference/completions
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"model":"moonshotai/kimi-k2.5","messages":[{"role":"user","content":"Hello"}]}'
https://surf.cascade.fyi/api/v1/inference/completions
-d '{"model":"moonshotai/kimi-k2.5","messages":[{"role":"user","content":"Hello"}]}'
https://surf.cascade.fyi/api/v1/inference/completions
Web search ($0.01)
网页搜索(0.01美元)
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/web/search
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/web/search
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/web/search
-d '{"query":"x402 protocol"}'
https://surf.cascade.fyi/api/v1/web/search
Crawl a page ($0.002)
爬取网页内容(0.002美元)
npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"url":"https://example.com"}'
https://surf.cascade.fyi/api/v1/web/crawl
-d '{"url":"https://example.com"}'
https://surf.cascade.fyi/api/v1/web/crawl
First run walks you through wallet setup automatically.npx x402-proxy -X POST -H "Content-Type: application/json"
-d '{"url":"https://example.com"}'
https://surf.cascade.fyi/api/v1/web/crawl
-d '{"url":"https://example.com"}'
https://surf.cascade.fyi/api/v1/web/crawl
首次运行时会自动引导您完成钱包配置。MCP Server
MCP 服务器
Unified MCP server at with 9 tools. Supports tool filtering via query param.
/mcp?tools=Add to Claude Code:
bash
npx x402-proxy mcp add surf https://surf.cascade.fyi/mcpOr add a filtered subset:
bash
npx x402-proxy mcp add surf "https://surf.cascade.fyi/mcp?tools=surf_twitter_search,surf_web_crawl"在路径提供统一的MCP服务器,包含9个工具。支持通过查询参数筛选工具。
/mcp?tools=添加到Claude Code:
bash
npx x402-proxy mcp add surf https://surf.cascade.fyi/mcp或添加筛选后的工具子集:
bash
npx x402-proxy mcp add surf "https://surf.cascade.fyi/mcp?tools=surf_twitter_search,surf_web_crawl"Endpoint Reference
端点参考文档
All data endpoints support both (JSON body) and (path/query params). OpenAPI spec at .
POSTGEThttps://surf.cascade.fyi/openapi.jsonGET convenience routes: , , , ,
/api/v1/twitter/user/:ref/api/v1/twitter/tweet/:ref/api/v1/reddit/post/:ref/api/v1/reddit/subreddit/:name/api/v1/reddit/user/:ref所有数据端点均支持(JSON请求体)和(路径/查询参数)方式调用。OpenAPI规范地址为。
POSTGEThttps://surf.cascade.fyi/openapi.jsonGET便捷路由:、、、、
/api/v1/twitter/user/:ref/api/v1/twitter/tweet/:ref/api/v1/reddit/post/:ref/api/v1/reddit/subreddit/:name/api/v1/reddit/user/:refTwitter 服务
All $0.005/call. MCP tools use the same params and return the same data.
POST /api/v1/twitter/search | MCP:
surf_twitter_searchSearch tweets with 50+ advanced operators. Returns ~20 tweets per page with engagement summary.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Search query (e.g. | |
| | no | | Sort order |
| string | no | Pagination cursor | |
| | no | Only tweets on or after this date | |
| | no | Only tweets before this date |
Search operators: , , , , , , , ,
from:userto:usermin_faves:Nmin_retweets:Nfilter:mediasince:YYYY-MM-DDuntil:YYYY-MM-DDlang:enwithin_time:7dPOST /api/v1/twitter/tweet | MCP:
surf_twitter_tweetFetch a tweet with full thread context (all conversation participants), parent tweet, and optionally replies/quotes.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Tweet ID or URL | |
| array | no | |
POST /api/v1/twitter/user | MCP:
surf_twitter_userFetch user profile with ~20 recent tweets per page.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Username or @username | |
| boolean | no | | Include replies in timeline |
| boolean | no | | Include mentions timeline |
| string | no | Pagination cursor |
Enriched fields: thread context (full conversation up to 20 tweets), engagement_rate, content_type (original/reply/quote/retweet/media/link_share), topic extraction (hashtags, domains, mentions), auto-crawled article content from URLs in tweets.
所有端点均为0.005美元/次调用。MCP工具使用相同参数并返回相同数据。
POST /api/v1/twitter/search | MCP:
surf_twitter_search使用50+高级运算符搜索推文。每页返回约20条推文及互动统计摘要。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 搜索查询语句(例如: | |
| | 否 | | 排序方式 |
| string | 否 | 分页游标 | |
| | 否 | 仅返回该日期及之后的推文 | |
| | 否 | 仅返回该日期之前的推文 |
搜索运算符:、、、、、、、、
from:userto:usermin_faves:Nmin_retweets:Nfilter:mediasince:YYYY-MM-DDuntil:YYYY-MM-DDlang:enwithin_time:7dPOST /api/v1/twitter/tweet | MCP:
surf_twitter_tweet获取单条推文的完整对话上下文(所有参与方)、父推文,可选择包含回复/引用内容。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 推文ID或URL | |
| array | 否 | |
POST /api/v1/twitter/user | MCP:
surf_twitter_user获取用户资料及每页约20条近期推文。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 用户名或@用户名 | |
| boolean | 否 | | 在时间线中包含回复内容 |
| boolean | 否 | | 包含提及该用户的时间线 |
| string | 否 | 分页游标 |
增强字段: 对话上下文(最多20条推文的完整对话)、互动率、内容类型(原创/回复/引用/转发/媒体/链接分享)、主题提取(话题标签、域名、提及用户)、自动爬取推文中URL对应的文章内容。
Reddit 服务
All $0.005/call. MCP tools use the same params and return the same data.
POST /api/v1/reddit/search | MCP:
surf_reddit_searchSearch posts across Reddit with sort and time filters.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Search query | |
| | no | | Sort order |
| | no | | Time range |
| integer | no | | Max results (1-100) |
| string | no | Pagination cursor | |
| | no | Only posts on or after this date | |
| | no | Only posts before this date |
POST /api/v1/reddit/post | MCP:
surf_reddit_postFetch a post with comments, depth/sort control.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Post ID or Reddit URL | |
| | no | | Comment sort |
| integer | no | | Max comments (0-200) |
| integer | no | | Max nesting depth (0-10) |
POST /api/v1/reddit/subreddit | MCP:
surf_reddit_subredditFetch subreddit info and top posts.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Subreddit name (e.g. | |
| | no | | Post sort |
| | no | | Time range |
| integer | no | | Max posts (1-100) |
POST /api/v1/reddit/user | MCP:
surf_reddit_userFetch a user profile with recent posts and comments.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Reddit username (e.g. | |
| boolean | no | | Include recent posts |
| boolean | no | | Include recent comments |
| integer | no | | Max posts/comments (1-100) |
Enriched fields: domain, stickied, locked, edited, distinguished, awards, crosspost_parent, comment link context.
所有端点均为0.005美元/次调用。MCP工具使用相同参数并返回相同数据。
POST /api/v1/reddit/search | MCP:
surf_reddit_search在Reddit全站搜索帖子,支持排序和时间筛选。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 搜索查询语句 | |
| | 否 | | 排序方式 |
| | 否 | | 时间范围 |
| integer | 否 | | 最大结果数(1-100) |
| string | 否 | 分页游标 | |
| | 否 | 仅返回该日期及之后的帖子 | |
| | 否 | 仅返回该日期之前的帖子 |
POST /api/v1/reddit/post | MCP:
surf_reddit_post获取帖子内容及评论,支持评论深度和排序控制。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 帖子ID或Reddit URL | |
| | 否 | | 评论排序方式 |
| integer | 否 | | 最大评论数(0-200) |
| integer | 否 | | 最大嵌套深度(0-10) |
POST /api/v1/reddit/subreddit | MCP:
surf_reddit_subreddit获取子版块信息及热门帖子。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 子版块名称(例如: | |
| | 否 | | 帖子排序方式 |
| | 否 | | 时间范围 |
| integer | 否 | | 最大帖子数(1-100) |
POST /api/v1/reddit/user | MCP:
surf_reddit_user获取用户资料及近期帖子和评论。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | Reddit用户名(例如: | |
| boolean | 否 | | 包含近期帖子 |
| boolean | 否 | | 包含近期评论 |
| integer | 否 | | 最大帖子/评论数(1-100) |
增强字段: 域名、置顶状态、锁定状态、编辑状态、特殊标识、奖励信息、交叉发布来源、评论链接上下文。
Web
网页服务
POST /api/v1/web/search | MCP: | $0.01/call
surf_web_searchSemantic web search powered by Exa. Returns titles, URLs, snippets, and highlights.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | yes | Search query | |
| | no | | Search depth |
| string[] | no | Restrict to specific domains | |
| string[] | no | Exclude specific domains | |
| ISO string | no | Only results published after this date | |
| ISO string | no | Only results published before this date | |
| enum | no | |
POST /api/v1/web/crawl | MCP: | $0.002/call
surf_web_crawlExtract content from web pages as markdown, HTML, or text. Supports PDF extraction.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
| string | one of url/urls | Single URL to crawl | |
| string[] | one of url/urls | Multiple URLs (max 20, one payment covers all) | |
| | no | | Output format |
| string | no | CSS selector for targeted extraction | |
| boolean | no | Use proxy for blocked sites |
Enriched fields (search): published_date, author, score, query-relevant highlights, autoprompt query rewriting.
POST /api/v1/web/search | MCP: | 0.01美元/次调用
surf_web_search由Exa提供支持的语义网页搜索服务。返回标题、URL、摘要和高亮内容。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | 是 | 搜索查询语句 | |
| | 否 | | 搜索深度 |
| string[] | 否 | 限制搜索特定域名 | |
| string[] | 否 | 排除特定域名 | |
| ISO string | 否 | 仅返回该日期之后发布的结果 | |
| ISO string | 否 | 仅返回该日期之前发布的结果 | |
| enum | 否 | |
POST /api/v1/web/crawl | MCP: | 0.002美元/次调用
surf_web_crawl提取网页内容为markdown、HTML或文本格式。支持PDF内容提取。
| 参数 | 类型 | 是否必填 | 默认值 | 描述 |
|---|---|---|---|---|
| string | url/urls二选一 | 单个待爬取URL | |
| string[] | url/urls二选一 | 多个URL(最多20个,一次支付覆盖所有) | |
| | 否 | | 输出格式 |
| string | 否 | 用于定向提取的CSS选择器 | |
| boolean | 否 | 对被屏蔽的站点使用代理 |
增强字段(搜索服务): 发布日期、作者、评分、与查询相关的高亮内容、自动提示查询重写。
Inference
LLM推理服务
POST /api/v1/inference/completions | OpenAI-compatible chat completion
Model list at .
GET /api/v1/inference/models| Param | Type | Required | Description |
|---|---|---|---|
| string | yes | Model identifier (see table below) |
| array | yes | Chat messages with |
| boolean | no | Enable SSE streaming |
| integer | no | Max tokens to generate (affects dynamic pricing) |
| integer | no | Preferred over max_tokens for Anthropic models |
| number | no | Sampling temperature (0-2) |
| number | no | Nucleus sampling |
| array | no | Tool/function definitions |
Models (15):
| Model | Price | Notes |
|---|---|---|
| $0.001 flat | Lightweight, fast utility |
| $0.004 flat | Strong reasoning, code, long context |
| from $0.006 | Dynamic - fast general-purpose, 196K context |
| from $0.007 | Dynamic - best-in-class tool calling, 2M context |
| from $0.012 | Dynamic - MoE 230B/10B active, strong coding |
| from $0.030 | Dynamic - strongest open-weight coding model |
| from $0.032 | Dynamic - xAI flagship, lowest hallucination rate |
| from $0.064 | Dynamic - multi-agent (4-16 parallel agents) |
| from $0.10 | Dynamic - varies by token usage |
| from $0.10 | Dynamic - varies by token usage |
| from $0.17 | Dynamic - varies by token usage |
| from $0.17 | Dynamic - varies by token usage |
| from $0.007 | grok-4.1-fast + live X/Twitter & web search |
| from $0.037 | grok-4.20-beta + live X/Twitter & web search |
| from $0.074 | multi-agent + live X/Twitter & web search |
Flat models charge a fixed price per request. Dynamic models price based on input size, max_tokens, and model rates. The variants include live X/Twitter + web search via xAI native tools.
:onlineStreaming: Set for SSE. Parse lines, stop on .
stream: truedata:data: [DONE]typescript
const res = await fetchX402("https://surf.cascade.fyi/api/v1/inference/completions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "moonshotai/kimi-k2.5",
messages: [{ role: "user", content: "Write a haiku" }],
stream: true,
}),
});
const reader = res.body!.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
for (const line of chunk.split("\n")) {
if (line.startsWith("data: ") && line !== "data: [DONE]") {
const data = JSON.parse(line.slice(6));
process.stdout.write(data.choices[0]?.delta?.content ?? "");
}
}
}Rate limits: 20 requests per 60 seconds per wallet. Duplicate payment headers are rejected.
POST /api/v1/inference/completions | 兼容OpenAI的对话补全接口
模型列表可通过获取。
GET /api/v1/inference/models| 参数 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| string | 是 | 模型标识符(见下表) |
| array | 是 | 包含 |
| boolean | 否 | 启用SSE流式输出 |
| integer | 否 | 生成的最大token数(影响动态定价) |
| integer | 否 | 对于Anthropic模型,该参数优先级高于max_tokens |
| number | 否 | 采样温度(0-2) |
| number | 否 | 核采样参数 |
| array | 否 | 工具/函数定义 |
支持的15个模型:
| 模型 | 价格 | 说明 |
|---|---|---|
| 0.001美元/次固定价 | 轻量级、快速实用模型 |
| 0.004美元/次固定价 | 推理能力强,支持代码和长上下文 |
| 0.006美元起 | 动态定价——通用型模型,速度快,支持196K上下文 |
| 0.007美元起 | 动态定价——工具调用能力顶尖,支持2M上下文 |
| 0.012美元起 | 动态定价——MoE架构230B/10B激活参数,代码能力强 |
| 0.030美元起 | 动态定价——开源权重模型中代码能力最强 |
| 0.032美元起 | 动态定价——xAI旗舰模型,幻觉率最低 |
| 0.064美元起 | 动态定价——多代理模型(4-16个并行代理) |
| 0.10美元起 | 动态定价——价格随token使用量变化 |
| 0.10美元起 | 动态定价——价格随token使用量变化 |
| 0.17美元起 | 动态定价——价格随token使用量变化 |
| 0.17美元起 | 动态定价——价格随token使用量变化 |
| 0.007美元起 | grok-4.1-fast + 实时X/Twitter及网页搜索 |
| 0.037美元起 | grok-4.20-beta + 实时X/Twitter及网页搜索 |
| 0.074美元起 | 多代理模型 + 实时X/Twitter及网页搜索 |
固定定价模型按每次请求收取固定费用。动态定价模型根据输入大小、max_tokens和模型费率定价。变体包含通过xAI原生工具实现的实时X/Twitter和网页搜索功能。
online流式输出: 设置启用SSE流式输出。解析行,遇到时停止。
stream: truedata:data: [DONE]typescript
const res = await fetchX402("https://surf.cascade.fyi/api/v1/inference/completions", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
model: "moonshotai/kimi-k2.5",
messages: [{ role: "user", content: "Write a haiku" }],
stream: true,
}),
});
const reader = res.body!.getReader();
const decoder = new TextDecoder();
while (true) {
const { done, value } = await reader.read();
if (done) break;
const chunk = decoder.decode(value);
for (const line of chunk.split("\n")) {
if (line.startsWith("data: ") && line !== "data: [DONE]") {
const data = JSON.parse(line.slice(6));
process.stdout.write(data.choices[0]?.delta?.content ?? "");
}
}
}速率限制: 每个钱包每60秒最多20次请求。重复支付请求头会被拒绝。
Integrate with @x402/fetch
与@x402/fetch集成
bash
npm install @x402/fetch @x402/evm @x402/svmbash
npm install @x402/fetch @x402/evm @x402/svmSolana wallet
Solana钱包集成
typescript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactSvmScheme } from "@x402/svm/exact/client";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import { base58 } from "@scure/base";
const svmSigner = await createKeyPairSignerFromBytes(base58.decode(process.env.SVM_PRIVATE_KEY!));
const client = new x402Client();
registerExactSvmScheme(client, { signer: svmSigner });
const fetchX402 = wrapFetchWithPayment(fetch, client);typescript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactSvmScheme } from "@x402/svm/exact/client";
import { createKeyPairSignerFromBytes } from "@solana/kit";
import { base58 } from "@scure/base";
const svmSigner = await createKeyPairSignerFromBytes(base58.decode(process.env.SVM_PRIVATE_KEY!));
const client = new x402Client();
registerExactSvmScheme(client, { signer: svmSigner });
const fetchX402 = wrapFetchWithPayment(fetch, client);Base (EVM) wallet
Base(EVM)钱包集成
typescript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const fetchX402 = wrapFetchWithPayment(fetch, client);Then use like normal fetch:
typescript
const res = await fetchX402("https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi");
const { data } = await res.json();typescript
import { x402Client, wrapFetchWithPayment } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });
const fetchX402 = wrapFetchWithPayment(fetch, client);之后即可像使用普通fetch一样调用:
typescript
const res = await fetchX402("https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi");
const { data } = await res.json();Debugging
调试工具
bash
npx x402-proxy https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi | jq '.data'
npx x402-proxy wallet # addresses and balances
npx x402-proxy wallet history # payment logbash
npx x402-proxy https://surf.cascade.fyi/api/v1/twitter/user/cascade_fyi | jq '.data'
npx x402-proxy wallet # 查看钱包地址和余额
npx x402-proxy wallet history # 查看支付日志Pagination
分页处理
Paginated endpoints return and . Pass in the next request:
meta.has_next_pagemeta.next_cursorcursortypescript
let cursor: string | undefined;
const allTweets = [];
do {
const res = await fetchX402("https://surf.cascade.fyi/api/v1/twitter/user", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ref: "cascade_fyi", cursor }),
});
const { data, meta } = await res.json();
allTweets.push(...data.tweets);
cursor = meta?.has_next_page ? meta.next_cursor : undefined;
} while (cursor);支持分页的端点会返回和。在后续请求中传入参数即可获取下一页数据:
meta.has_next_pagemeta.next_cursorcursortypescript
let cursor: string | undefined;
const allTweets = [];
do {
const res = await fetchX402("https://surf.cascade.fyi/api/v1/twitter/user", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ ref: "cascade_fyi", cursor }),
});
const { data, meta } = await res.json();
allTweets.push(...data.tweets);
cursor = meta?.has_next_page ? meta.next_cursor : undefined;
} while (cursor);Tips
使用技巧
- Use for LLM-friendly web crawl output
format: "markdown" - Batch URLs with the array to crawl multiple pages in one paid request
urls - The inference API is OpenAI-compatible - existing code works by changing the base URL
- Use to fetch a Reddit post without comments (faster)
comment_limit: 0 - Quote URLs containing or
?in shell commands to avoid glob expansion&
- 网页爬取时使用生成LLM友好的输出格式
format: "markdown" - 使用数组批量处理多个URL,一次支付即可爬取所有页面
urls - 推理API兼容OpenAI——修改基础URL即可复用现有代码
- 使用获取Reddit帖子时不包含评论,速度更快
comment_limit: 0 - 在Shell命令中对包含或
?的URL添加引号,避免通配符展开&