Documentation Index Fetch the complete documentation index at: https://firecrawl-mog-search-exclude-include-domains.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
获取你的 API 密钥 注册并获取你的 API 密钥,开始使用 Firecrawl
在 Playground 中试用 无需编写任何代码即可立即测试 API
将 Firecrawl 与 AI 代理配合使用 (推荐)
Firecrawl 技能是让代理发现并使用 Firecrawl 的最快方式。否则,你的代理不会知道可以使用 Firecrawl。
npx -y firecrawl-cli@latest init --all --browser
也可以使用 MCP Server 将 Firecrawl 直接连接到 Claude、Cursor、Windsurf、VS Code 等其他 AI 工具。
抓取 从任意 URL 提取内容,支持 markdown、HTML 或结构化 JSON 格式
交互 继续处理任何已抓取的页面——点击、填写表单、提取动态内容
适用于 LLM 的输出 :干净的 markdown、结构化 JSON、截图等。
应对复杂场景 :代理、反机器人机制、JavaScript 渲染以及动态内容。
可靠 :专为生产环境打造,具备高可用性和稳定一致的结果。
快速 :数秒内返回结果,并针对高吞吐量进行了优化。
MCP Server :通过 模型上下文协议 将 Firecrawl 连接到任何 AI 工具。
进行网页搜索,并在一次调用中获取搜索结果的完整页面内容。请参见 Search 功能文档 了解所有选项。
from firecrawl import Firecrawl
firecrawl = Firecrawl( api_key = "fc-YOUR-API-KEY" )
results = firecrawl.search(
query = "Firecrawl" ,
limit = 3 ,
)
print (results)
SDK 会直接返回数据对象。cURL 会返回完整的 payload。 {
"success" : true ,
"data" : {
"web" : [
{
"url" : "https://www.firecrawl.dev/" ,
"title" : "Firecrawl - 面向 AI 的 Web 数据 API" ,
"description" : "用于 AI 的网页爬取、抓取与搜索 API。为规模而建。Firecrawl 将整个互联网送达 AI 代理与开发者。" ,
"position" : 1
},
{
"url" : "https://github.com/firecrawl/firecrawl" ,
"title" : "mendableai/firecrawl:将整站转换为可供 LLM 使用的内容 - GitHub" ,
"description" : "Firecrawl 是一项 API 服务,接收一个 URL,对其进行爬取,并将其转换为干净的 Markdown 或结构化数据。" ,
"position" : 2
},
...
],
"images" : [
{
"title" : "快速上手 | Firecrawl" ,
"imageUrl" : "https://mintlify.s3.us-west-1.amazonaws.com/firecrawl/logo/logo.png" ,
"imageWidth" : 5814 ,
"imageHeight" : 1200 ,
"url" : "https://docs.firecrawl.dev/" ,
"position" : 1
},
...
],
"news" : [
{
"title" : "Y Combinator 创业公司 Firecrawl 准备出资 100 万美元雇用三名 AI 代理作为员工" ,
"url" : "https://techcrunch.com/2025/05/17/y-combinator-startup-firecrawl-is-ready-to-pay-1m-to-hire-three-ai-agents-as-employees/" ,
"snippet" : "目前它在 YC 的招聘板发布了三则" 仅限 AI 代理 "的新职位,并为此预留了总计 100 万美元的预算。" ,
"date" : "3 个月前" ,
"position" : 1
},
...
]
}
}
抓取任意 URL,并以 markdown、HTML 或其他格式获取其内容。请参见 Scrape 功能文档 了解所有选项。
from firecrawl import Firecrawl
firecrawl = Firecrawl( api_key = "fc-YOUR-API-KEY" )
# 抓取网站:
doc = firecrawl.scrape( "https://firecrawl.dev" , formats = [ "markdown" , "html" ])
print (doc)
各 SDK 将直接返回数据对象。cURL 将按下方所示原样返回有效载荷。 {
"success" : true ,
"data" : {
"markdown" : "Launch Week I 开始了[💥 获享 2 个月免费..." ,
"html" : "<!DOCTYPE html><html lang= \" en \" class= \" light \" style= \" color-scheme: light; \" ><body class= \" __variable_36bd41 __variable_d7dc5d font-inter ..." ,
"metadata" : {
"title" : "首页 - Firecrawl" ,
"description" : "Firecrawl 可抓取并将任何网站转换为干净的 Markdown。" ,
"language" : "en" ,
"keywords" : "Firecrawl,Markdown,Data,Mendable,Langchain" ,
"robots" : "follow, index" ,
"ogTitle" : "Firecrawl" ,
"ogDescription" : "将任意网站转换为可直接用于 LLM 的数据。" ,
"ogUrl" : "https://www.firecrawl.dev/" ,
"ogImage" : "https://www.firecrawl.dev/og.png?123" ,
"ogLocaleAlternate" : [],
"ogSiteName" : "Firecrawl" ,
"sourceURL" : "https://firecrawl.dev" ,
"statusCode" : 200 ,
"contentType" : "text/html"
}
}
}
抓取页面后,继续与其交互——点击按钮、填写表单、提取动态内容,或继续深入导航。你可以用简单的英文描述你的需求,或编写代码以实现完全控制。请参见 Interact 功能文档 了解所有选项。
from firecrawl import Firecrawl
app = Firecrawl( api_key = "fc-YOUR-API-KEY" )
# 1. 抓取 Amazon 首页
result = app.scrape( "https://www.amazon.com" , formats = [ "markdown" ])
scrape_id = result.metadata.scrape_id
# 2. 交互 — 搜索商品并获取价格
app.interact(scrape_id, prompt = "Search for iPhone 16 Pro Max" )
response = app.interact(scrape_id, prompt = "Click on the first result and tell me the price" )
print (response.output)
# 3. 停止会话
app.stop_interaction(scrape_id)
{
"success" : true ,
"liveViewUrl" : "https://liveview.firecrawl.dev/..." ,
"interactiveLiveViewUrl" : "https://liveview.firecrawl.dev/..." ,
"output" : "The iPhone 16 Pro Max (256GB) is priced at $1,199.00." ,
"exitCode" : 0 ,
"killed" : false
}
API Reference 完整的 API 参考文档,包含交互式示例
SDKs Python、Node.js、CLI 以及社区 SDK
Open Source 自行托管 Firecrawl 或为项目做出贡献
Integrations LangChain、LlamaIndex、OpenAI 等