Documentation Index Fetch the complete documentation index at: https://firecrawl-fix-openapi-interact-prompt-parameter.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
只需一次 API 调用,就能将任意网站转换为干净、适配 LLM 的数据。
获取你的 API 密钥 注册并获取你的 API 密钥,开始抓取
在 Playground 中试用 无需编写任何代码即可立即测试 API
将 Firecrawl 与 AI 智能体配合使用 (推荐)
Firecrawl 技能是让智能体发现并使用 Firecrawl 的最快方式。否则,你的智能体不会知道可以使用 Firecrawl。
npx -y firecrawl-cli@latest init --all --browser
也可以使用 MCP Server 将 Firecrawl 直接连接到 Claude、Cursor、Windsurf、VS Code 等其他 AI 工具。
复制下方的代码,将 fc-YOUR-API-KEY 替换为你的 API 密钥,然后运行:
curl -X POST 'https://api.firecrawl.dev/v2/scrape' \
-H 'Authorization: Bearer fc-YOUR-API-KEY' \
-H 'Content-Type: application/json' \
-d '{"url": "https://example.com"}'
{
"success" : true ,
"data" : {
"markdown" : "# Example Domain \n\n This domain is for use in illustrative examples..." ,
"metadata" : {
"title" : "Example Domain" ,
"sourceURL" : "https://example.com"
}
}
}
抓取 从任意 URL 提取内容,支持 markdown、HTML 或结构化 JSON 格式
交互 继续处理任何已抓取的页面——点击、填写表单、提取动态内容
搜索、抓取和交互 — 三个 API,全面覆盖可靠采集网页数据所需能力
适用于 LLM 的输出 : 干净的 markdown、结构化 JSON、截图等多种格式
处理棘手问题 : 代理、反机器人、JavaScript 渲染和动态内容
可靠 : 为生产环境打造,高可用且结果稳定一致
快速 : 数秒内返回结果,并针对高吞吐场景进行了优化
MCP Server : 通过 Model Context Protocol 将 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 等