surf

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Surf APIs

Surf APIs

Unified pay-per-use API at
surf.cascade.fyi
. No signup, no API keys - just pay per call.
10 composite REST endpoints + 9 MCP tools. Payments in USDC on Solana, Base, or Tempo (MPP).
SurfaceEndpointsPrice
Twittersearch, tweet, user$0.005/call
Redditsearch, post, subreddit, user$0.005/call
Websearch$0.01/call
Webcrawl$0.002/call
Inference15 models$0.001 - dynamic
surf.cascade.fyi
提供统一的按调用付费API服务。无需注册,无需API密钥——仅按调用次数付费。
包含10个复合REST端点 + 9个MCP工具。支持在Solana、Base或Tempo(MPP)网络使用USDC支付。
服务领域端点价格
Twittersearch, tweet, user0.005美元/次调用
Redditsearch, post, subreddit, user0.005美元/次调用
Websearch0.01美元/次调用
Webcrawl0.002美元/次调用
推理15个模型0.001美元起(动态定价)

Try it

快速试用

Test any endpoint with x402-proxy:
bash
undefined
使用x402-proxy测试任意端点:
bash
undefined

Twitter user profile + recent tweets ($0.005)

获取Twitter用户资料+近期推文(0.005美元)

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
npx x402-proxy -X POST -H "Content-Type: application/json"
-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
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

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
npx x402-proxy -X POST -H "Content-Type: application/json"
-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

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

首次运行时会自动引导您完成钱包配置。

MCP Server

MCP 服务器

Unified MCP server at
/mcp
with 9 tools. Supports tool filtering via
?tools=
query param.
Add to Claude Code:
bash
npx x402-proxy mcp add surf https://surf.cascade.fyi/mcp
Or add a filtered subset:
bash
npx x402-proxy mcp add surf "https://surf.cascade.fyi/mcp?tools=surf_twitter_search,surf_web_crawl"
/mcp
路径提供统一的MCP服务器,包含9个工具。支持通过
?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
POST
(JSON body) and
GET
(path/query params). OpenAPI spec at
https://surf.cascade.fyi/openapi.json
.
GET 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
所有数据端点均支持
POST
(JSON请求体)和
GET
(路径/查询参数)方式调用。OpenAPI规范地址为
https://surf.cascade.fyi/openapi.json
GET便捷路由:
/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

Twitter

Twitter 服务

All $0.005/call. MCP tools use the same params and return the same data.
POST /api/v1/twitter/search | MCP:
surf_twitter_search
Search tweets with 50+ advanced operators. Returns ~20 tweets per page with engagement summary.
ParamTypeRequiredDefaultDescription
query
stringyesSearch query (e.g.
from:elonmusk AI min_faves:100
)
sort
Latest
|
Top
no
Latest
Sort order
cursor
stringnoPagination cursor
start_date
YYYY-MM-DD
noOnly tweets on or after this date
end_date
YYYY-MM-DD
noOnly tweets before this date
Search operators:
from:user
,
to:user
,
min_faves:N
,
min_retweets:N
,
filter:media
,
since:YYYY-MM-DD
,
until:YYYY-MM-DD
,
lang:en
,
within_time:7d
POST /api/v1/twitter/tweet | MCP:
surf_twitter_tweet
Fetch a tweet with full thread context (all conversation participants), parent tweet, and optionally replies/quotes.
ParamTypeRequiredDefaultDescription
ref
stringyesTweet ID or URL
include
arrayno
["replies"]
,
["quotes"]
, or both
POST /api/v1/twitter/user | MCP:
surf_twitter_user
Fetch user profile with ~20 recent tweets per page.
ParamTypeRequiredDefaultDescription
ref
stringyesUsername or @username
include_replies
booleanno
false
Include replies in timeline
include_mentions
booleanno
false
Include mentions timeline
cursor
stringnoPagination 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条推文及互动统计摘要。
参数类型是否必填默认值描述
query
string搜索查询语句(例如:
from:elonmusk AI min_faves:100
sort
Latest
|
Top
Latest
排序方式
cursor
string分页游标
start_date
YYYY-MM-DD
仅返回该日期及之后的推文
end_date
YYYY-MM-DD
仅返回该日期之前的推文
搜索运算符:
from:user
to:user
min_faves:N
min_retweets:N
filter:media
since:YYYY-MM-DD
until:YYYY-MM-DD
lang:en
within_time:7d
POST /api/v1/twitter/tweet | MCP:
surf_twitter_tweet
获取单条推文的完整对话上下文(所有参与方)、父推文,可选择包含回复/引用内容。
参数类型是否必填默认值描述
ref
string推文ID或URL
include
array
["replies"]
["quotes"]
或两者都选
POST /api/v1/twitter/user | MCP:
surf_twitter_user
获取用户资料及每页约20条近期推文。
参数类型是否必填默认值描述
ref
string用户名或@用户名
include_replies
boolean
false
在时间线中包含回复内容
include_mentions
boolean
false
包含提及该用户的时间线
cursor
string分页游标
增强字段: 对话上下文(最多20条推文的完整对话)、互动率、内容类型(原创/回复/引用/转发/媒体/链接分享)、主题提取(话题标签、域名、提及用户)、自动爬取推文中URL对应的文章内容。

Reddit

Reddit 服务

All $0.005/call. MCP tools use the same params and return the same data.
POST /api/v1/reddit/search | MCP:
surf_reddit_search
Search posts across Reddit with sort and time filters.
ParamTypeRequiredDefaultDescription
query
stringyesSearch query
sort
relevance
|
hot
|
top
|
new
|
comments
no
relevance
Sort order
time
hour
|
day
|
week
|
month
|
year
|
all
no
all
Time range
limit
integerno
25
Max results (1-100)
cursor
stringnoPagination cursor
start_date
YYYY-MM-DD
noOnly posts on or after this date
end_date
YYYY-MM-DD
noOnly posts before this date
POST /api/v1/reddit/post | MCP:
surf_reddit_post
Fetch a post with comments, depth/sort control.
ParamTypeRequiredDefaultDescription
ref
stringyesPost ID or Reddit URL
comment_sort
confidence
|
top
|
new
|
controversial
|
old
|
qa
no
confidence
Comment sort
comment_limit
integerno
50
Max comments (0-200)
comment_depth
integerno
5
Max nesting depth (0-10)
POST /api/v1/reddit/subreddit | MCP:
surf_reddit_subreddit
Fetch subreddit info and top posts.
ParamTypeRequiredDefaultDescription
name
stringyesSubreddit name (e.g.
programming
)
sort
hot
|
new
|
top
|
rising
no
hot
Post sort
time
hour
|
day
|
week
|
month
|
year
|
all
no
day
Time range
limit
integerno
25
Max posts (1-100)
POST /api/v1/reddit/user | MCP:
surf_reddit_user
Fetch a user profile with recent posts and comments.
ParamTypeRequiredDefaultDescription
ref
stringyesReddit username (e.g.
spez
)
include_posts
booleanno
true
Include recent posts
include_comments
booleanno
false
Include recent comments
max_results
integerno
25
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全站搜索帖子,支持排序和时间筛选。
参数类型是否必填默认值描述
query
string搜索查询语句
sort
relevance
|
hot
|
top
|
new
|
comments
relevance
排序方式
time
hour
|
day
|
week
|
month
|
year
|
all
all
时间范围
limit
integer
25
最大结果数(1-100)
cursor
string分页游标
start_date
YYYY-MM-DD
仅返回该日期及之后的帖子
end_date
YYYY-MM-DD
仅返回该日期之前的帖子
POST /api/v1/reddit/post | MCP:
surf_reddit_post
获取帖子内容及评论,支持评论深度和排序控制。
参数类型是否必填默认值描述
ref
string帖子ID或Reddit URL
comment_sort
confidence
|
top
|
new
|
controversial
|
old
|
qa
confidence
评论排序方式
comment_limit
integer
50
最大评论数(0-200)
comment_depth
integer
5
最大嵌套深度(0-10)
POST /api/v1/reddit/subreddit | MCP:
surf_reddit_subreddit
获取子版块信息及热门帖子。
参数类型是否必填默认值描述
name
string子版块名称(例如:
programming
sort
hot
|
new
|
top
|
rising
hot
帖子排序方式
time
hour
|
day
|
week
|
month
|
year
|
all
day
时间范围
limit
integer
25
最大帖子数(1-100)
POST /api/v1/reddit/user | MCP:
surf_reddit_user
获取用户资料及近期帖子和评论。
参数类型是否必填默认值描述
ref
stringReddit用户名(例如:
spez
include_posts
boolean
true
包含近期帖子
include_comments
boolean
false
包含近期评论
max_results
integer
25
最大帖子/评论数(1-100)
增强字段: 域名、置顶状态、锁定状态、编辑状态、特殊标识、奖励信息、交叉发布来源、评论链接上下文。

Web

网页服务

POST /api/v1/web/search | MCP:
surf_web_search
| $0.01/call
Semantic web search powered by Exa. Returns titles, URLs, snippets, and highlights.
ParamTypeRequiredDefaultDescription
query
stringyesSearch query
type
auto
|
fast
no
auto
Search depth
include_domains
string[]noRestrict to specific domains
exclude_domains
string[]noExclude specific domains
start_published_date
ISO stringnoOnly results published after this date
end_published_date
ISO stringnoOnly results published before this date
category
enumno
company
,
research paper
,
news
,
pdf
,
github
,
tweet
,
personal site
,
linkedin profile
POST /api/v1/web/crawl | MCP:
surf_web_crawl
| $0.002/call
Extract content from web pages as markdown, HTML, or text. Supports PDF extraction.
ParamTypeRequiredDefaultDescription
url
stringone of url/urlsSingle URL to crawl
urls
string[]one of url/urlsMultiple URLs (max 20, one payment covers all)
format
markdown
|
html
|
text
no
markdown
Output format
selector
stringnoCSS selector for targeted extraction
proxy
booleannoUse proxy for blocked sites
Enriched fields (search): published_date, author, score, query-relevant highlights, autoprompt query rewriting.
POST /api/v1/web/search | MCP:
surf_web_search
| 0.01美元/次调用
由Exa提供支持的语义网页搜索服务。返回标题、URL、摘要和高亮内容。
参数类型是否必填默认值描述
query
string搜索查询语句
type
auto
|
fast
auto
搜索深度
include_domains
string[]限制搜索特定域名
exclude_domains
string[]排除特定域名
start_published_date
ISO string仅返回该日期之后发布的结果
end_published_date
ISO string仅返回该日期之前发布的结果
category
enum
company
research paper
news
pdf
github
tweet
personal site
linkedin profile
POST /api/v1/web/crawl | MCP:
surf_web_crawl
| 0.002美元/次调用
提取网页内容为markdown、HTML或文本格式。支持PDF内容提取。
参数类型是否必填默认值描述
url
stringurl/urls二选一单个待爬取URL
urls
string[]url/urls二选一多个URL(最多20个,一次支付覆盖所有)
format
markdown
|
html
|
text
markdown
输出格式
selector
string用于定向提取的CSS选择器
proxy
boolean对被屏蔽的站点使用代理
增强字段(搜索服务): 发布日期、作者、评分、与查询相关的高亮内容、自动提示查询重写。

Inference

LLM推理服务

POST /api/v1/inference/completions | OpenAI-compatible chat completion
Model list at
GET /api/v1/inference/models
.
ParamTypeRequiredDescription
model
stringyesModel identifier (see table below)
messages
arrayyesChat messages with
role
and
content
stream
booleannoEnable SSE streaming
max_tokens
integernoMax tokens to generate (affects dynamic pricing)
max_completion_tokens
integernoPreferred over max_tokens for Anthropic models
temperature
numbernoSampling temperature (0-2)
top_p
numbernoNucleus sampling
tools
arraynoTool/function definitions
Models (15):
ModelPriceNotes
qwen/qwen-2.5-7b-instruct
$0.001 flatLightweight, fast utility
moonshotai/kimi-k2.5
$0.004 flatStrong reasoning, code, long context
minimax/minimax-m2.5
from $0.006Dynamic - fast general-purpose, 196K context
x-ai/grok-4.1-fast
from $0.007Dynamic - best-in-class tool calling, 2M context
minimax/minimax-m2.7
from $0.012Dynamic - MoE 230B/10B active, strong coding
z-ai/glm-5
from $0.030Dynamic - strongest open-weight coding model
x-ai/grok-4.20-beta
from $0.032Dynamic - xAI flagship, lowest hallucination rate
x-ai/grok-4.20-multi-agent-beta
from $0.064Dynamic - multi-agent (4-16 parallel agents)
anthropic/claude-sonnet-4.5
from $0.10Dynamic - varies by token usage
anthropic/claude-sonnet-4.6
from $0.10Dynamic - varies by token usage
anthropic/claude-opus-4.5
from $0.17Dynamic - varies by token usage
anthropic/claude-opus-4.6
from $0.17Dynamic - varies by token usage
x-ai/grok-4.1-fast:online
from $0.007grok-4.1-fast + live X/Twitter & web search
x-ai/grok-4.20-beta:online
from $0.037grok-4.20-beta + live X/Twitter & web search
x-ai/grok-4.20-multi-agent-beta:online
from $0.074multi-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
:online
variants include live X/Twitter + web search via xAI native tools.
Streaming: Set
stream: true
for SSE. Parse
data:
lines, stop on
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
获取。
参数类型是否必填描述
model
string模型标识符(见下表)
messages
array包含
role
content
的对话消息数组
stream
boolean启用SSE流式输出
max_tokens
integer生成的最大token数(影响动态定价)
max_completion_tokens
integer对于Anthropic模型,该参数优先级高于max_tokens
temperature
number采样温度(0-2)
top_p
number核采样参数
tools
array工具/函数定义
支持的15个模型:
模型价格说明
qwen/qwen-2.5-7b-instruct
0.001美元/次固定价轻量级、快速实用模型
moonshotai/kimi-k2.5
0.004美元/次固定价推理能力强,支持代码和长上下文
minimax/minimax-m2.5
0.006美元起动态定价——通用型模型,速度快,支持196K上下文
x-ai/grok-4.1-fast
0.007美元起动态定价——工具调用能力顶尖,支持2M上下文
minimax/minimax-m2.7
0.012美元起动态定价——MoE架构230B/10B激活参数,代码能力强
z-ai/glm-5
0.030美元起动态定价——开源权重模型中代码能力最强
x-ai/grok-4.20-beta
0.032美元起动态定价——xAI旗舰模型,幻觉率最低
x-ai/grok-4.20-multi-agent-beta
0.064美元起动态定价——多代理模型(4-16个并行代理)
anthropic/claude-sonnet-4.5
0.10美元起动态定价——价格随token使用量变化
anthropic/claude-sonnet-4.6
0.10美元起动态定价——价格随token使用量变化
anthropic/claude-opus-4.5
0.17美元起动态定价——价格随token使用量变化
anthropic/claude-opus-4.6
0.17美元起动态定价——价格随token使用量变化
x-ai/grok-4.1-fast:online
0.007美元起grok-4.1-fast + 实时X/Twitter及网页搜索
x-ai/grok-4.20-beta:online
0.037美元起grok-4.20-beta + 实时X/Twitter及网页搜索
x-ai/grok-4.20-multi-agent-beta:online
0.074美元起多代理模型 + 实时X/Twitter及网页搜索
固定定价模型按每次请求收取固定费用。动态定价模型根据输入大小、max_tokens和模型费率定价。
online
变体包含通过xAI原生工具实现的实时X/Twitter和网页搜索功能。
流式输出: 设置
stream: true
启用SSE流式输出。解析
data:
行,遇到
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/svm
bash
npm install @x402/fetch @x402/evm @x402/svm

Solana 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 log
bash
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
meta.has_next_page
and
meta.next_cursor
. Pass
cursor
in the next request:
typescript
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_page
meta.next_cursor
。在后续请求中传入
cursor
参数即可获取下一页数据:
typescript
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
    format: "markdown"
    for LLM-friendly web crawl output
  • Batch URLs with the
    urls
    array to crawl multiple pages in one paid request
  • The inference API is OpenAI-compatible - existing code works by changing the base URL
  • Use
    comment_limit: 0
    to fetch a Reddit post without comments (faster)
  • Quote URLs containing
    ?
    or
    &
    in shell commands to avoid glob expansion
  • 网页爬取时使用
    format: "markdown"
    生成LLM友好的输出格式
  • 使用
    urls
    数组批量处理多个URL,一次支付即可爬取所有页面
  • 推理API兼容OpenAI——修改基础URL即可复用现有代码
  • 使用
    comment_limit: 0
    获取Reddit帖子时不包含评论,速度更快
  • 在Shell命令中对包含
    ?
    &
    的URL添加引号,避免通配符展开