web

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Web Scraping & Search

网页爬取与搜索

Paid web crawling and search API at
https://web.surf.cascade.fyi
. Crawl costs $0.005 USDC, search costs $0.01 USDC per call via x402 on Solana. Use the
x_payment
tool for all requests. Use this when the built-in
web_fetch
tool fails or is blocked (anti-bot, JS-rendered pages, paywalled content).
付费网页爬取与搜索API地址为
https://web.surf.cascade.fyi
。通过Solana上的x402协议,单次爬取费用为0.005 USDC,单次搜索费用为0.01 USDC。所有请求需使用
x_payment
工具。当内置
web_fetch
工具失效或被拦截(如遇到反机器人机制、JS渲染页面、付费墙内容)时,可使用本工具。

Endpoints

接口

Crawl Web Pages

爬取网页

Fetch and extract content from any URL. Automatically escalates through fetching tiers if blocked: fast HTTP -> headless browser -> stealth browser with proxy.
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://example.com\", \"format\": \"markdown\"}"
})
Body parameters:
ParamTypeDefaultDescription
urlstring-Single URL to crawl (required if no
urls
)
urlsstring[]-Multiple URLs to bulk crawl (required if no
url
)
formatstringmarkdownOutput format:
markdown
,
html
, or
text
selectorstring-CSS selector to extract specific elements
proxybooleanfalseForce proxy usage (auto-enabled on stealth tier)
Single URL response:
json
{
  "status": 200,
  "content": ["# Page Title\n\nPage content in markdown..."],
  "url": "https://example.com/"
}
Bulk URL response:
json
[
  {"status": 200, "content": ["..."], "url": "https://example.com/"},
  {"status": 200, "content": ["..."], "url": "https://other.com/"}
]
Cascade escalation: The crawler automatically tries increasingly powerful methods:
  1. get - Fast HTTP request (cheapest, handles most static sites)
  2. fetch - Headless Chromium (for JS-rendered pages)
  3. stealthy_fetch - Stealth browser with proxy (bypasses Cloudflare, anti-bot)
Escalation triggers: HTTP 403/429/503, empty content, or content under 100 characters.
获取并提取任意URL的内容。如果被拦截,会自动通过不同层级的方式升级爬取:快速HTTP→无头浏览器→带代理的隐身浏览器。
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://example.com\", \"format\": \"markdown\"}"
})
请求体参数:
参数类型默认值描述
urlstring-要爬取的单个URL(未提供urls时为必填)
urlsstring[]-要批量爬取的多个URL(未提供url时为必填)
formatstringmarkdown输出格式:
markdown
html
text
selectorstring-用于提取特定元素的CSS选择器
proxybooleanfalse强制使用代理(隐身层级会自动启用)
单个URL爬取响应:
json
{
  "status": 200,
  "content": ["# 页面标题\n\n页面的markdown格式内容..."],
  "url": "https://example.com/"
}
批量URL爬取响应:
json
[
  {"status": 200, "content": ["..."], "url": "https://example.com/"},
  {"status": 200, "content": ["..."], "url": "https://other.com/"}
]
级联升级机制: 爬虫会自动尝试逐步增强的爬取方式:
  1. get - 快速HTTP请求(成本最低,适用于大多数静态站点)
  2. fetch - 无头Chromium浏览器(适用于JS渲染页面)
  3. stealthy_fetch - 带代理的隐身浏览器(可绕过Cloudflare、反机器人机制)
触发升级的条件:返回HTTP 403/429/503状态码、内容为空或内容长度不足100字符。

Search the Web

全网搜索

Search the web using Exa's search API. Returns titles, URLs, and text snippets.
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/search",
  "method": "POST",
  "params": "{\"query\": \"x402 protocol crypto payments\", \"num_results\": 10}"
})
Body parameters:
ParamTypeDefaultDescription
querystringrequiredSearch query
num_results1-205Number of results to return
Response:
json
{
  "results": [
    {
      "title": "Page Title",
      "url": "https://example.com/page",
      "snippet": "Relevant text excerpt from the page..."
    }
  ]
}
通过Exa的搜索API进行全网搜索,返回标题、URL和文本片段。
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/search",
  "method": "POST",
  "params": "{\"query\": \"x402 protocol crypto payments\", \"num_results\": 10}"
})
请求体参数:
参数类型默认值描述
querystring必填搜索查询词
num_results1-205返回的结果数量
响应:
json
{
  "results": [
    {
      "title": "页面标题",
      "url": "https://example.com/page",
      "snippet": "页面中的相关文本片段..."
    }
  ]
}

Usage Patterns

使用示例

Scrape a page as markdown

以markdown格式爬取页面

x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://docs.solana.com\", \"format\": \"markdown\"}"
})
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://docs.solana.com\", \"format\": \"markdown\"}"
})

Extract specific elements with a CSS selector

使用CSS选择器提取特定元素

x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://news.ycombinator.com\", \"format\": \"html\", \"selector\": \".titleline\"}"
})
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://news.ycombinator.com\", \"format\": \"html\", \"selector\": \".titleline\"}"
})

Bulk crawl multiple URLs

批量爬取多个URL

x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"urls\": [\"https://example.com\", \"https://httpbin.org/get\"], \"format\": \"text\"}"
})
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"urls\": [\"https://example.com\", \"https://httpbin.org/get\"], \"format\": \"text\"}"
})

Search and then crawl top results

先搜索再爬取顶部结果

First search:
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/search",
  "method": "POST",
  "params": "{\"query\": \"ERC-8004 agent identity standard\", \"num_results\": 5}"
})
Then crawl the most relevant result:
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://eips.ethereum.org/EIPS/eip-8004\", \"format\": \"markdown\"}"
})
首先执行搜索:
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/search",
  "method": "POST",
  "params": "{\"query\": \"ERC-8004 agent identity standard\", \"num_results\": 5}"
})
然后爬取最相关的结果:
x_payment({
  "url": "https://web.surf.cascade.fyi/v1/crawl",
  "method": "POST",
  "params": "{\"url\": \"https://eips.ethereum.org/EIPS/eip-8004\", \"format\": \"markdown\"}"
})

Cost

费用说明

  • Crawl: $0.005 USDC per call (single or bulk)
  • Search: $0.01 USDC per call
All payments on Solana mainnet. Each request is a separate call. For bulk crawls, one payment covers all URLs in the batch.
  • 爬取:单次调用0.005 USDC(单URL或批量URL均为单次收费)
  • 搜索:单次调用0.01 USDC
所有支付均在Solana主网完成。每个请求为独立调用。批量爬取时,单次支付覆盖批次内所有URL。

Errors

错误码说明

HTTPMeaning
400Invalid parameters (check body format)
402Payment required (handled automatically by x_payment)
429Too many concurrent requests (retry later)
502Upstream crawl/search error
HTTP状态码含义
400参数无效(检查请求体格式)
402需要支付(由x_payment工具自动处理)
429并发请求过多(稍后重试)
502上游爬取/搜索服务错误