deep_research
提出一个问题,它会执行多次网络搜索,抓取最有价值的结果,将每个段落与您的问题进行匹配打分,并返回得分最高的若干段落——每条都附带其出处页面的 URL 和标题。
使用场景
回答问题并附上引用
每条结论都带有 source_url,因此每个说法都可以追溯到其摘录自的页面。
概览多个来源对某个主题的说法
一次调用即可执行多条搜索查询,并从多达 10 个不同来源中提取内容,无需逐页阅读。
为 LLM 提示词提供已抓取的事实依据
结论是原文段落而非改写,因此可直接作为上下文传给您自己的模型,不必再经过他人摘要这一层。
把研究范围限定在可信来源
research_scope.domains 可将搜索限制在最多 10 个域名内——适用于法规、供应商或内部文档类研究。
Endpoint
/api/v1/tools/deep_researchParameters
research_query,不是 topic 或 query,且长度至少为 10 个字符。未知键会被静默丢弃,因此传 topic 会因缺少 research_query 而返回 400。| Name | Type | Required | Default | Description |
|---|---|---|---|---|
research_query | string | Required | - | 要研究的问题。至少 10 个字符。请表述为一个问题或一个具体论断——这段文字既用于执行搜索,也用于给段落打分,因此精确的表述比单个关键词的排序效果更好。 Example: What are the tradeoffs of edge caching for API responses? |
research_scope | object | Optional | - | 用于控制研究广度与时效性的可选项。 |
max_sources | number | Optional | - | 覆盖 `depth_level` 所隐含的来源数量,1-10。两者同时设置时以本参数为准。 Example: 8 |
respect_robots | boolean | Optional | true | 遵守每个来源站点的 robots.txt。保持 `true` 时,robots.txt 对 `CrawlForge` 禁止的搜索结果不会被抓取——它仍留在来源集合中,`fetched` 为 `false`,只保留其搜索摘要,原因会写入 `warnings`,而不是返回 403。固定的 credits 成本不变。仅在你与目标站点另有约定时才设为 `false`——该覆盖会记录到你的 API key 上,并且不适用于列入 CrawlForge 永久排除名单的主机。 Example: true |
methodology.llm_used: false 中说明了这一点。如需由 LLM 撰写的综合,请使用 CrawlForge MCP 服务器。一次研究是如何进行的
四个阶段,全部在一次请求内完成。
methodology.queries_run 中返回。depth_level 或 max_sources 决定。methodology.sources_considered 报告筛选前共看到多少条。sources 中,并标记 fetched: false。key_findings,每条截断至 600 个字符,并标注其出处 URL。relevance_score 是相对于您查询的词语重合度评分,并非对事实准确性或来源可信度的判断。分数高只说明该段落与您所问的内容相符,仅此而已。在依据某条结论行事前,请先查看 source_url。请求示例
# The query parameter is research_query, not topic. Minimum 10 characters.
curl -X POST https://crawlforge.dev/api/v1/tools/deep_research \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"research_query": "What are the tradeoffs of edge caching for API responses?",
"research_scope": {
"depth_level": "deep",
"time_range": "year",
"language": "en"
},
"max_sources": 8
}'
# Restrict the search to sources you already trust
curl -X POST https://crawlforge.dev/api/v1/tools/deep_research \
-H "X-API-Key: cf_test_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"research_query": "What does the EU AI Act require for general-purpose models?",
"research_scope": {
"domains": ["europa.eu", "eur-lex.europa.eu"]
}
}'响应示例
{ "success": true, "data": { "research_query": "What are the tradeoffs of edge caching for API responses?", "methodology": { "queries_run": [ "tradeoffs of edge caching for API responses", "edge caching API responses disadvantages", "CDN edge cache API latency consistency" ], "search_backend": "google_cse", "sources_considered": 27, "sources_fetched": 5, "synthesis": "extractive", "llm_used": false }, "key_findings": [ { "text": "Edge caching cuts round-trip latency by serving from a point of presence near the client, but it introduces a consistency window: until the TTL expires or an explicit purge lands, different regions can serve different versions of the same resource.", "source_url": "https://example.com/engineering/edge-caching", "source_title": "Edge caching in practice", "relevance_score": 0.874 }, { "text": "Purge propagation is the operational cost most teams underestimate. A global invalidation is not instantaneous, and designs that assume it is will read stale data during the propagation window.", "source_url": "https://example.org/cdn-invalidation", "source_title": "CDN invalidation strategies", "relevance_score": 0.791 } ], "sources": [ { "url": "https://example.com/engineering/edge-caching", "title": "Edge caching in practice", "snippet": "How edge caching changes the latency and consistency profile of an API...", "fetched": true, "domain": "example.com" }, { "url": "https://example.net/blocked-article", "title": "Caching at the edge", "snippet": "An overview of edge caching patterns...", "fetched": false, "domain": "example.net" } ], "summary": "Edge caching trades consistency for latency. The dominant operational cost is purge propagation, and the dominant design question is which endpoints tolerate a staleness window.", "notes": "Synthesis is extractive (no LLM on the hosted API). For LLM-synthesized deep research, use the CrawlForge MCP server.", "researched_at": "2026-08-26T14:30:00.000Z" }, "credits_used": 10, "credits_remaining": 990, "processing_time": 14260}data.methodology.queries_run实际执行的搜索,由您的问题扩展而来。可据此判断这次运行是否理解了问题。data.methodology.sources_considered筛选前看到的搜索结果数量;sources_fetched 则是随后实际抓取的数量。data.methodology.llm_used在托管 REST API 上始终为 false——综合是抽取式的。data.key_findings最多 10 个段落,按得分从高到低排列,每条截断至 600 个字符。data.key_findings.source_url该段落原文摘自的页面——这就是引用出处。data.key_findings.relevance_score相对于您查询的词语重合度评分,保留 3 位小数。并非可信度信号。data.sources.fetched为 false 表示该页面无法抓取。它仍会列在此处,但没有贡献任何结论。data.summary由排名靠前的段落拼合而成,并非由模型撰写。processing_time研究运行较慢——搜索并抓取多个页面通常需要 10-20 秒。错误处理
缺少 research_query (400 VALIDATION_ERROR)
通常是因为传了 topic 或 query。未知键会被丢弃,于是请求到达时根本没有查询内容。
查询过短 (400 VALIDATION_ERROR)
research_query 至少需要 10 个字符。单个关键词会被拒绝,而且通常本身就是糟糕的查询——段落正是按这些词来打分的。
搜索后端不可达 (502 RESEARCH_SEARCH_UNAVAILABLE)
无法连接上游搜索服务商。不扣除 credits。
搜索失败 (502 RESEARCH_SEARCH_FAILED)
搜索服务商返回错误,最常见的是配额超限。不扣除 credits。
被 robots.txt 禁止(不是错误——该来源不会被抓取)
robots.txt 对 CrawlForge 禁止的搜索结果不会被抓取,但它仍留在来源集合中,fetched 为 false 并保留其搜索摘要,warnings 会说明原因——因此本次运行不会返回 403,来源数量也不变。若你与目标站点另有约定,可设置 respect_robots: false 予以覆盖——该覆盖会记录到你的 API key 上,并且不适用于列入 CrawlForge 永久排除名单的主机。
research_query 的词语重合度,因此这条查询身兼两职:既是搜索输入,也是排序依据。带有独特术语的具体问题优于宽泛问题;而当您已经知道信任哪些来源时,使用 research_scope.domains 比把查询写得更长更有效。credits 消耗
depth_level 或抓取了多少来源无关——覆盖 10 个来源的 comprehensive 运行与覆盖 3 个来源的 surface 运行费用相同。失败的调用(包括两种搜索后端错误)均不计费。成本明细:
任意一次研究,3 至 10 个来源:10 credits
方案建议:
Free 方案: 1,000 个一次性试用 credits = 100 次研究
Hobby 方案: 5,000 credits/月 = 500 次研究($19/月)
Professional 方案: 50,000 credits/月 = 5,000 次研究($99/月)
由于费用固定,使用 surface 并不能省钱——除非您需要更快的速度,否则请直接用 deep 或 comprehensive。