web-research

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Web Research with x402 APIs

基于x402 APIs的网页研究

STOP — Read before making any API call. enrichx402.com endpoints are not the same as each provider's native API. All paths use the format
https://enrichx402.com/api/{provider}/{action}
. You MUST either:
  1. Copy exact URLs from the Quick Reference table below, OR
  2. Run
    x402.discover_api_endpoints(url="https://enrichx402.com")
    to get the correct paths
Guessing paths will fail with 405 errors (wrong path) or 404 errors (missing
/api/
prefix).
Access Exa (neural search) and Firecrawl (web scraping) through x402-protected endpoints.
注意——调用任何API前请仔细阅读。 enrichx402.com的端点并非与各服务商的原生API相同。所有路径均采用
https://enrichx402.com/api/{provider}/{action}
格式。您必须:
  1. 复制下方快速参考表中的准确URL,或者
  2. 运行
    x402.discover_api_endpoints(url="https://enrichx402.com")
    获取正确路径
猜测路径会导致失败,返回405错误(路径错误)或404错误(缺少
/api/
前缀)。
通过x402保护的端点访问Exa(神经网络搜索)和Firecrawl(网页爬取)工具。

Setup

配置

See rules/getting-started.md for installation and wallet setup.
请查看rules/getting-started.md了解安装及钱包设置方法。

Quick Reference

快速参考

TaskEndpointPriceBest For
Neural search
https://enrichx402.com/api/exa/search
$0.01Semantic web search
Find similar
https://enrichx402.com/api/exa/find-similar
$0.01Pages similar to a URL
Extract text
https://enrichx402.com/api/exa/contents
$0.002Clean text from URLs
Direct answers
https://enrichx402.com/api/exa/answer
$0.01Factual Q&A
Scrape page
https://enrichx402.com/api/firecrawl/scrape
$0.0126Single page to markdown
Web search
https://enrichx402.com/api/firecrawl/search
$0.0252Search with scraping
任务端点价格适用场景
神经网络搜索
https://enrichx402.com/api/exa/search
$0.01语义网页搜索
查找相似页面
https://enrichx402.com/api/exa/find-similar
$0.01与指定URL相似的页面
提取文本
https://enrichx402.com/api/exa/contents
$0.002从URL提取干净文本
直接获取答案
https://enrichx402.com/api/exa/answer
$0.01事实性问答
爬取页面
https://enrichx402.com/api/firecrawl/scrape
$0.0126将单页转换为清晰的Markdown格式
网页搜索
https://enrichx402.com/api/firecrawl/search
$0.0252带自动爬取的搜索

When to Use What

工具选择指南

ScenarioTool
General web searchWebSearch (free) or Exa ($0.01)
Semantic/conceptual searchExa search
Find pages like XExa find-similar
Get clean text from URLExa contents
Scrape blocked/JS-heavy siteFirecrawl scrape
Search + scrape resultsFirecrawl search
Quick fact lookupExa answer
See rules/when-to-use.md for detailed guidance.
场景推荐工具
通用网页搜索WebSearch(免费)或Exa($0.01)
语义/概念搜索Exa搜索
查找与X相似的页面Exa查找相似页面
从URL获取干净文本Exa内容提取
爬取被封锁/JS渲染的网站Firecrawl爬取
搜索+爬取结果Firecrawl搜索
快速事实查询Exa直接答案
请查看rules/when-to-use.md获取详细指导。

Exa Neural Search

Exa神经网络搜索

Semantic search that understands meaning, not just keywords:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/search",
  method="POST",
  body={
    "query": "startups building AI agents for customer support",
    "numResults": 10,
    "type": "neural"
  }
)
Options:
  • query
    - Search query (required)
  • numResults
    - Number of results (default: 10, max: 25)
  • type
    - "neural" (semantic) or "keyword" (traditional)
  • includeDomains
    - Only search these domains
  • excludeDomains
    - Skip these domains
  • startPublishedDate
    /
    endPublishedDate
    - Date range filter
Returns: List of URLs with titles, snippets, and relevance scores.
能够理解语义而非仅匹配关键词的搜索工具:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/search",
  method="POST",
  body={
    "query": "startups building AI agents for customer support",
    "numResults": 10,
    "type": "neural"
  }
)
可选参数:
  • query
    - 搜索关键词(必填)
  • numResults
    - 结果数量(默认:10,最大值:25)
  • type
    - "neural"(语义搜索)或"keyword"(传统关键词搜索)
  • includeDomains
    - 仅在指定域名内搜索
  • excludeDomains
    - 排除指定域名
  • startPublishedDate
    /
    endPublishedDate
    - 发布日期范围过滤
返回结果:包含URL、标题、摘要和相关度评分的列表。

Find Similar Pages

查找相似页面

Find pages semantically similar to a reference URL:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/find-similar",
  method="POST",
  body={
    "url": "https://example.com/article-i-like",
    "numResults": 10
  }
)
Great for:
  • Finding competitor products
  • Discovering related content
  • Expanding research sources
查找与参考URL语义相似的页面:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/find-similar",
  method="POST",
  body={
    "url": "https://example.com/article-i-like",
    "numResults": 10
  }
)
适用于:
  • 查找竞品产品
  • 发现相关内容
  • 拓展研究来源

Extract Text Content

提取文本内容

Get clean, structured text from URLs:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/contents",
  method="POST",
  body={
    "urls": [
      "https://example.com/article1",
      "https://example.com/article2"
    ]
  }
)
Options:
  • urls
    - Array of URLs to extract
  • text
    - Include full text (default: true)
  • highlights
    - Include key highlights
Cheapest option ($0.002) when you already have URLs and just need the content.
从URL中获取结构化的干净文本:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/contents",
  method="POST",
  body={
    "urls": [
      "https://example.com/article1",
      "https://example.com/article2"
    ]
  }
)
可选参数:
  • urls
    - 待提取的URL数组
  • text
    - 是否包含完整文本(默认:true)
  • highlights
    - 是否包含关键要点
当您已有URL仅需要内容时,这是成本最低的选项($0.002)。

Direct Answers

直接获取答案

Get factual answers to questions:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/answer",
  method="POST",
  body={
    "query": "What is the population of Tokyo?"
  }
)
Returns a direct answer with source citations. Best for:
  • Factual questions
  • Quick lookups
  • Verification of claims
获取事实性问题的直接答案:
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/answer",
  method="POST",
  body={
    "query": "What is the population of Tokyo?"
  }
)
返回带有来源引用的直接答案。最适用于:
  • 事实性问题
  • 快速查询
  • 验证主张

Firecrawl Scrape

Firecrawl页面爬取

Scrape a single page to clean markdown:
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/scrape",
  method="POST",
  body={
    "url": "https://example.com/page-to-scrape"
  }
)
Options:
  • url
    - Page to scrape (required)
  • formats
    - Output formats: ["markdown", "html", "links"]
  • onlyMainContent
    - Skip nav/footer/ads (default: true)
  • waitFor
    - Wait ms for JS to render
Advantages over WebFetch:
  • Handles JavaScript-rendered content
  • Bypasses common blocking
  • Extracts main content only
  • LLM-optimized markdown output
将单页爬取为干净的Markdown格式:
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/scrape",
  method="POST",
  body={
    "url": "https://example.com/page-to-scrape"
  }
)
可选参数:
  • url
    - 待爬取的页面(必填)
  • formats
    - 输出格式:["markdown", "html", "links"]
  • onlyMainContent
    - 是否跳过导航栏/页脚/广告(默认:true)
  • waitFor
    - 等待JS渲染的毫秒数
相较于WebFetch的优势:
  • 支持JS渲染的内容
  • 绕过常见的访问限制
  • 仅提取主要内容
  • 生成适合LLM的Markdown输出

Firecrawl Search

Firecrawl搜索

Web search with automatic scraping of results:
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/search",
  method="POST",
  body={
    "query": "best practices for react server components",
    "limit": 5
  }
)
Options:
  • query
    - Search query (required)
  • limit
    - Number of results (default: 5)
  • scrapeOptions
    - Options passed to scraper
Returns search results with full scraped content for each.
自动爬取搜索结果的网页搜索工具:
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/search",
  method="POST",
  body={
    "query": "best practices for react server components",
    "limit": 5
  }
)
可选参数:
  • query
    - 搜索关键词(必填)
  • limit
    - 结果数量(默认:5)
  • scrapeOptions
    - 传递给爬取工具的参数
返回包含每个结果完整爬取内容的搜索结果列表。

Workflows

工作流

Deep Research

深度研究

  1. (Optional) Check balance:
    x402.get_wallet_info
  2. Discover endpoints (required before first fetch):
    x402.discover_api_endpoints(url="https://enrichx402.com")
  3. Search broadly with Exa
  4. Find related sources with find-similar
  5. Extract content from top sources
  6. Synthesize findings
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/search",
  method="POST",
  body={"query": "AI agents in healthcare 2024", "numResults": 15}
)
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/find-similar",
  method="POST",
  body={"url": "https://best-article-found.com"}
)
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/contents",
  method="POST",
  body={"urls": ["url1", "url2", "url3"]}
)
  1. (可选)查看余额:
    x402.get_wallet_info
  2. 发现端点(首次调用前必填):
    x402.discover_api_endpoints(url="https://enrichx402.com")
  3. 使用Exa进行广泛搜索
  4. 使用查找相似页面功能发现相关来源
  5. 从优质来源中提取内容
  6. 整合研究结果
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/search",
  method="POST",
  body={"query": "AI agents in healthcare 2024", "numResults": 15}
)
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/find-similar",
  method="POST",
  body={"url": "https://best-article-found.com"}
)
mcp
x402.fetch(
  url="https://enrichx402.com/api/exa/contents",
  method="POST",
  body={"urls": ["url1", "url2", "url3"]}
)

Blocked Site Scraping

被封锁网站爬取

  • Try WebFetch first (free)
  • If blocked/empty, use Firecrawl with
    waitFor
    for JS-heavy sites
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/scrape",
  method="POST",
  body={"url": "https://blocked-site.com/article", "waitFor": 3000}
)
  • 先尝试WebFetch(免费)
  • 如果被封锁或返回空内容,使用Firecrawl并设置
    waitFor
    参数处理JS渲染的网站
mcp
x402.fetch(
  url="https://enrichx402.com/api/firecrawl/scrape",
  method="POST",
  body={"url": "https://blocked-site.com/article", "waitFor": 3000}
)

Cost Optimization

成本优化

  • Use Exa contents ($0.002) when you already have URLs
  • Use WebSearch/WebFetch first (free) and fall back to x402 endpoints
  • Batch URL extraction - pass multiple URLs to Exa contents
  • Limit results - request only as many as needed
  • 使用Exa contents($0.002):当您已有URL仅需要内容时
  • 优先使用WebSearch/WebFetch(免费):失败后再使用x402端点
  • 批量提取URL:向Exa contents传递多个URL
  • 限制结果数量:仅请求所需的结果数

Parallel Calls

并行调用

Independent searches can run in parallel:
mcp
undefined
独立的搜索任务可以并行执行:
mcp
undefined

These don't depend on each other

这些任务互不依赖

x402.fetch(url=".../exa/search", body={"query": "topic A"}) x402.fetch(url=".../exa/search", body={"query": "topic B"})
undefined
x402.fetch(url=".../exa/search", body={"query": "topic A"}) x402.fetch(url=".../exa/search", body={"query": "topic B"})
undefined