firecrawl-developer-index
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFirecrawl Developer Index
Firecrawl Developer 索引
Answer a developer question from the primary source: the issue where the bug was reported, the merged pull request that fixed it, the README or documentation page that states the contract. A blog post that describes a behaviour is a weaker answer than the passage that defines it, so reach for the index first and the open web second.
There is no fixed recipe. Read the question, decide what kind it is, and choose the approach below. A literal error string wants a different move than "how do I do X". Don't run machinery a question doesn't call for.
从一手资料中回答开发者问题:报告bug的工单、修复bug的已合并Pull Request、定义契约的README或文档页面。描述行为的博客文章不如明确定义行为的内容权威,因此优先使用本索引,其次才考虑开放网页。
没有固定的操作流程。先阅读问题,判断问题类型,再选择以下方法。字面错误字符串和“如何实现X”的处理方式不同,不要用不必要的流程处理问题。
The tools, and what each is uniquely good at
各工具及其独特优势
-
HTTP:MCP:
GET|POST https://api.firecrawl.dev/v2/search/developerCLI:firecrawl_developer_search(query, k?, skills?)Ranked results over the whole index. Each carriesfirecrawl developer <query> [--limit <n>] [--skills-only](id),issue:owner/repo#123(type|doc|issue|pull_request),readme,url, and the matched passages in markdown, so tables and code blocks survive. The default first move for a developer question. It is the only surface that returns the passages, which is what lets you answer instead of pointing at a page.title/kis 1–100 and defaults to 10.--limit/skills="only"restricts the search to agent-skill files. Keyless; send--skills-onlyfor higher rate limits.Authorization: Bearer $FIRECRAWL_API_KEY -
MCP:CLI:
firecrawl_search(query, categories: ["developer"])Developer hits in afirecrawl search <query> --categories developergroup besidedeveloper, each withweb,url,title(the matched passage),description, andposition— web results carry nocategory: "developer", so that is the field to key on when merging. Use this when you are already running a web search and want developer sources weighed in the same call. It exposes none of the filters and no passage control.category -
MCP:/
firecrawl_scrape(url)CLI:firecrawl_search(query)/firecrawl scrape <url>General web fetch and search, for what no primary source states: a comparison between two libraries, an outage, a migration write-up, a project with no public repository or indexed docs. Also the follow-through when a hit is the right page but you need all of it —firecrawl search <query>the result'sscrape.url
-
HTTP:MCP:
GET|POST https://api.firecrawl.dev/v2/search/developerCLI:firecrawl_developer_search(query, k?, skills?)对整个索引的结果进行排序。每个结果包含firecrawl developer <query> [--limit <n>] [--skills-only](格式如id)、issue:owner/repo#123(可选值:type|doc|issue|pull_request)、readme、url,以及匹配到的Markdown格式片段,因此表格和代码块会被保留。 这是处理开发者问题的默认首选方式。它是唯一能返回内容片段的工具,而这些片段正是你用来回答问题而非仅指向页面的关键。title/k的取值范围是1–100,默认值为10。--limit/skills="only"参数会将搜索范围限制在Agent技能文件内。 无需密钥即可使用;若发送--skills-only请求头,可获得更高的速率限制。Authorization: Bearer $FIRECRAWL_API_KEY -
MCP:CLI:
firecrawl_search(query, categories: ["developer"])开发者相关结果会被归为firecrawl search <query> --categories developer组,与developer组并列。每个结果包含web、url、title(匹配到的片段)、description和position——网页结果没有category: "developer"字段,因此合并结果时可通过该字段区分来源。 当你已经在进行网页搜索,且希望在同一请求中纳入开发者来源时使用此方法。它不支持任何筛选器,也无法控制返回的内容片段。category -
MCP:/
firecrawl_scrape(url)CLI:firecrawl_search(query)/firecrawl scrape <url>通用网页抓取和搜索工具,适用于一手资料未覆盖的场景:两个库的对比、服务中断情况、迁移指南、无公开仓库或未被索引文档的项目。 当搜索结果中的页面是正确来源,但你需要完整内容时,也可使用此工具——抓取结果中的firecrawl search <query>即可。url
Filters, and what each one costs you
筛选器及其影响
Only the HTTP surface takes these. On , pass or repeat the parameter; on , pass arrays. All are optional.
GETtypes=issue,pull_requestPOST- — which of
types,doc,issue,pull_requestto search. Defaults to all four. Narrowing here is the cheapest way to sharpen a query.readme - (
repos) scopes the repository half, meaningowner/name,issue, andpull_request;readme(documentation source ids, at most 20) scopes the documentation half, meaningsources. Passing both unions the halves rather than intersecting them. Both echo back in the response withdoc— that is how you tell "not in the index" from "found nothing".indexed: true|false - A filter that cannot match any requested is a
type, not an empty list:400with no repository type inrepos, ortypeswithoutsources.doc - (1–5, default 1) is the maximum passages per result, not a guarantee. Raise it when one page is clearly the right page but the first passage is the wrong part of it.
passages - ,
language,topic,license,min_stars,max_stars,archiveddescribe a repository. Most documentation pages in the index have no repository behind them, so no repository fact can admit or exclude one. Send any of these without aforkscope and the response holds repository evidence only —sources,issue,pull_request— withreadmereportingcoverageasdoc. That is the design, not an index fault: do not retry it and do not report the index broken. To keep documentation, drop the repository filters, or scope the documentation half withunavailableand readsourcesto confirmcoverageanswered.doc
仅HTTP接口支持以下筛选器。使用请求时,可传递或重复该参数;使用请求时,可传递数组参数。所有筛选器均为可选。
GETtypes=issue,pull_requestPOST- ——指定搜索的内容类型,可选值为
types、doc、issue、pull_request,默认搜索全部四种类型。缩小类型范围是优化查询成本最低的方式。readme - (格式为
repos)用于限定仓库相关内容,即owner/name、issue和pull_request;readme(文档源ID,最多20个)用于限定文档相关内容,即sources。同时传递两者会合并两个范围而非取交集。响应中会返回doc字段来反馈参数有效性——通过该字段可判断是“不在索引中”还是“未找到匹配内容”。indexed: true|false - 若筛选器与请求的不匹配,会返回
type错误而非空列表:例如400中无仓库类型时传递types,或repos中无types时传递doc。sources - (取值范围1–5,默认1)是每个结果返回的最大片段数,而非保证值。当确定某页面是正确来源但第一个片段不是所需内容时,可提高该参数值。
passages - 、
language、topic、license、min_stars、max_stars、archived用于描述仓库。索引中的大部分文档页面没有对应的仓库,因此仓库相关条件无法筛选文档内容。若未指定fork范围而传递上述参数,响应将仅包含仓库相关内容——sources、issue、pull_request——且readme字段会显示coverage为doc。这是设计预期而非索引故障:无需重试,也无需报告索引损坏。若要保留文档内容,请移除仓库筛选器,或通过unavailable限定文档范围并查看sources字段确认coverage是否有结果。doc
Match the approach to the question
根据问题类型选择对应方法
- Literal error message or stack-trace string → search the string itself plus the library name, with . Whoever hit it filed it. If nothing matches, strip the volatile parts (paths, line numbers, ids, addresses) and retry — the invariant middle of the message is what is indexed.
types=["issue","pull_request"] - Conceptual "how do I do X" → the full question in natural language, all four types. The answer is usually a or a
doc; raisereadmebefore raisingpassages.k - Known bug → the issue reports it, the merged pull request fixes it, and the fix is what you want. Search , then re-query the issue's own terms scoped to its repo with
types=["issue","pull_request"]. A merged PR's passages tell you what changed and in which direction.types=["pull_request"] - API contract ("what does X return", "is Y required", "what is the default") → and
readmeare authoritative and a blog post is not. Usedoc. If the contract looks like it moved, follow up withtypes=["readme","doc"]for the change that moved it.pull_request - Version-specific behaviour → an issue's opening report describes the broken version; its resolution supersedes it. Raise to see further into the thread, and read the resolution and the linked pull request before answering. Never answer from an opening report alone.
passages - Scoped to one library → when you know the slug, plus
repos=["owner/name"]if you want its docs in the same call. If a scoped search comes back empty, read the echoedsourcesflag first:indexedmeans nothing from that repo or source can ever match and no rephrasing will help — drop the scope and search the whole index, or go to the web.false - Ecosystem-wide ("which libraries do X", "who else hit this") → no scope. Use /
language/topicto keep to maintained repositories, accepting that this gives up allmin_starsresults.doc - Agent skills and tooling conventions → /
skills="only".--skills-only - Comparison, opinion, news, or an unindexed project → the open web. , then
firecrawl_searchwhatever deserves a full read. Combining is often right: take the contract from the index and the trade-off from the web.firecrawl_scrape
- 字面错误信息或堆栈跟踪字符串 → 直接搜索该字符串加上库名,并设置。遇到该问题的开发者通常会提交工单。若无匹配结果,移除可变部分(路径、行号、ID、地址)后重试——错误信息中不变的核心部分才会被索引。
types=["issue","pull_request"] - 概念性问题“如何实现X” → 使用自然语言完整提问,搜索全部四种类型。答案通常来自或
doc;优先提高readme参数而非passages参数。k - 已知bug → 工单会报告bug,已合并的Pull Request会修复bug,而修复内容才是你需要的信息。搜索,然后使用工单中的术语限定对应仓库,再搜索
types=["issue","pull_request"]。已合并PR的片段会告诉你修改内容和方向。types=["pull_request"] - API契约(如“X返回什么”、“Y是否为必填项”、“默认值是什么”) → 和
readme是权威来源,博客文章不算。使用doc。若契约看起来有变动,可进一步搜索types=["readme","doc"]查看变更记录。pull_request - 特定版本的行为 → 工单的初始报告描述的是存在问题的版本;其解决方案会取代初始报告。提高参数以查看更多线程内容,在回答前请阅读解决方案和关联的Pull Request。绝不要仅根据初始报告回答问题。
passages - 限定单个库 → 若知道仓库slug,设置,若需要同时包含其文档可加上
repos=["owner/name"]参数。若限定范围的搜索返回空结果,请先查看返回的sources标志:indexed表示该仓库或源的内容从未被索引,重新措辞也无济于事——此时应移除范围限制搜索整个索引,或转向网页搜索。false - 生态系统范围的问题(如“哪些库支持X”、“还有谁遇到过这个问题”) → 不设置范围限制。使用/
language/topic参数筛选维护中的仓库,但需注意这样会放弃所有min_stars结果。doc - Agent技能和工具约定 → 使用/
skills="only"参数。--skills-only - 对比、观点、新闻或未被索引的项目 → 使用开放网页搜索。先调用,再对值得深入阅读的结果调用
firecrawl_search。通常结合两种方式效果最佳:从索引获取契约信息,从网页获取权衡分析。firecrawl_scrape
Principles
原则
- Read before concluding a source doesn't exist. Every response reports
coverage|ok|degraded|unavailableper type.skippedmeans your ownskippedvalue did not ask for that type.typesordegradedmeans the gap came from the index or from a filter you sent, not from your query — drop the filter or widen, rather than retrying the same call or reporting that nothing exists.unavailablewith no hits of that type is a genuine miss: rephrase.ok - Quote the passage, cite the . The passages are the evidence; hand them over rather than paraphrasing them into a claim the reader can't check.
urlis frequently absent ontitleresults — fall back todoc.url - A merge supersedes a report. When an issue and a pull request disagree, the merged pull request is the current behaviour. Say which one you read.
- Scope last, not first. Search the whole index, then narrow with ,
types, orreposonce you know what the hits look like. Scoping first hides the result that would have told you where to look.sources - Go to the web when the index has nothing to say. Trade-offs, ecosystem opinion, and anything about an unindexed project are web questions. Don't force them through the index, and don't dress a general web page up as a primary source.
- 在判断来源不存在前先查看字段。 每个响应会按类型报告
coverage|ok|degraded|unavailable状态。skipped表示你的skipped参数未包含该类型。types或degraded表示缺口来自索引或你设置的筛选器,而非查询语句问题——此时应移除筛选器或扩大范围,而非重试相同请求或报告无结果。unavailable状态但无对应类型的结果才是真正未命中:此时需要重新措辞查询。ok - 引用内容片段并标注。 内容片段是证据;直接提供给读者,而非将其改写为无法验证的结论。
url结果经常没有doc字段——此时可使用title替代。url - 合并的PR优先于报告。 当工单和Pull Request内容不一致时,已合并的Pull Request代表当前行为。请说明你参考了哪一个。
- 最后再设置范围限制。 先搜索整个索引,在了解结果特征后再通过、
types或repos缩小范围。先设置范围会隐藏能指引你正确方向的结果。sources - 当索引无相关内容时转向网页。 权衡分析、生态系统观点以及未被索引项目的相关问题均属于网页搜索范畴。不要强行通过索引处理这些问题,也不要将普通网页伪装成一手资料。