上传并解析文件
curl --request POST \
--url https://api.firecrawl.dev/v2/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'options={
"blockAds": true,
"excludeTags": [
"<string>"
],
"formats": [
"markdown"
],
"headers": {},
"includeTags": [
"<string>"
],
"integration": "<string>",
"onlyMainContent": true,
"origin": "api",
"parsers": [
"pdf"
],
"redactPII": false,
"removeBase64Images": true,
"skipTlsVerification": true,
"timeout": 30000,
"zeroDataRetention": false
}'{
"data": {
"actions": {
"javascriptReturns": [
{
"type": "<string>",
"value": "<unknown>"
}
],
"pdfs": [
"<string>"
],
"scrapes": [
{
"html": "<string>",
"url": "<string>"
}
],
"screenshots": [
"<string>"
]
},
"answer": "<string>",
"audio": "<string>",
"branding": {
"animations": {},
"colors": {
"accent": "<string>",
"background": "<string>",
"error": "<string>",
"link": "<string>",
"primary": "<string>",
"secondary": "<string>",
"success": "<string>",
"textPrimary": "<string>",
"textSecondary": "<string>",
"warning": "<string>"
},
"components": {
"buttonPrimary": {
"background": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"buttonSecondary": {
"background": "<string>",
"borderColor": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"input": {}
},
"fonts": [
{
"family": "<string>"
}
],
"icons": {},
"images": {
"favicon": "<string>",
"logo": "<string>",
"ogImage": "<string>"
},
"layout": {},
"logo": "<string>",
"personality": {},
"spacing": {
"baseUnit": 123,
"borderRadius": "<string>",
"margins": {},
"padding": {}
},
"typography": {
"fontFamilies": {
"code": "<string>",
"heading": "<string>",
"primary": "<string>"
},
"fontSizes": {
"body": "<string>",
"h1": "<string>",
"h2": "<string>",
"h3": "<string>"
},
"fontWeights": {
"bold": 123,
"light": 123,
"medium": 123,
"regular": 123
},
"lineHeights": {
"body": "<string>",
"heading": "<string>"
}
}
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"highlights": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"menu": {
"isMenu": true,
"sections": [
{
"items": [
{
"name": "<string>",
"availability": {
"inStock": true,
"text": "<string>"
},
"calories": 123,
"description": "<string>",
"dietary": [
"<string>"
],
"id": "<string>",
"identifiers": {
"merchantItemId": "<string>"
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"optionGroups": [
{}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sourceUrl": "<string>",
"url": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"confidence": 123,
"currency": "<string>",
"merchant": {
"name": "<string>",
"type": "<string>"
},
"sourceUrl": "<string>"
},
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"contentType": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"url": "<string>"
},
"product": {
"title": "<string>",
"url": "<string>",
"variants": [
{
"availability": {
"inStock": true,
"text": "<string>"
},
"id": "<string>",
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sale": {
"originalPrice": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
}
},
"sku": "<string>",
"title": "<string>",
"values": {}
}
],
"brand": "<string>",
"category": "<string>",
"description": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"summary": "<string>",
"video": "<string>",
"warning": "<string>"
},
"success": true
}解析端点
解析
POST
/
parse
上传并解析文件
curl --request POST \
--url https://api.firecrawl.dev/v2/parse \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file='@example-file' \
--form 'options={
"blockAds": true,
"excludeTags": [
"<string>"
],
"formats": [
"markdown"
],
"headers": {},
"includeTags": [
"<string>"
],
"integration": "<string>",
"onlyMainContent": true,
"origin": "api",
"parsers": [
"pdf"
],
"redactPII": false,
"removeBase64Images": true,
"skipTlsVerification": true,
"timeout": 30000,
"zeroDataRetention": false
}'{
"data": {
"actions": {
"javascriptReturns": [
{
"type": "<string>",
"value": "<unknown>"
}
],
"pdfs": [
"<string>"
],
"scrapes": [
{
"html": "<string>",
"url": "<string>"
}
],
"screenshots": [
"<string>"
]
},
"answer": "<string>",
"audio": "<string>",
"branding": {
"animations": {},
"colors": {
"accent": "<string>",
"background": "<string>",
"error": "<string>",
"link": "<string>",
"primary": "<string>",
"secondary": "<string>",
"success": "<string>",
"textPrimary": "<string>",
"textSecondary": "<string>",
"warning": "<string>"
},
"components": {
"buttonPrimary": {
"background": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"buttonSecondary": {
"background": "<string>",
"borderColor": "<string>",
"borderRadius": "<string>",
"textColor": "<string>"
},
"input": {}
},
"fonts": [
{
"family": "<string>"
}
],
"icons": {},
"images": {
"favicon": "<string>",
"logo": "<string>",
"ogImage": "<string>"
},
"layout": {},
"logo": "<string>",
"personality": {},
"spacing": {
"baseUnit": 123,
"borderRadius": "<string>",
"margins": {},
"padding": {}
},
"typography": {
"fontFamilies": {
"code": "<string>",
"heading": "<string>",
"primary": "<string>"
},
"fontSizes": {
"body": "<string>",
"h1": "<string>",
"h2": "<string>",
"h3": "<string>"
},
"fontWeights": {
"bold": 123,
"light": 123,
"medium": 123,
"regular": 123
},
"lineHeights": {
"body": "<string>",
"heading": "<string>"
}
}
},
"changeTracking": {
"diff": "<string>",
"json": {},
"previousScrapeAt": "2023-11-07T05:31:56Z"
},
"highlights": "<string>",
"html": "<string>",
"links": [
"<string>"
],
"markdown": "<string>",
"menu": {
"isMenu": true,
"sections": [
{
"items": [
{
"name": "<string>",
"availability": {
"inStock": true,
"text": "<string>"
},
"calories": 123,
"description": "<string>",
"dietary": [
"<string>"
],
"id": "<string>",
"identifiers": {
"merchantItemId": "<string>"
},
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"optionGroups": [
{}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sourceUrl": "<string>",
"url": "<string>"
}
],
"name": "<string>",
"description": "<string>",
"id": "<string>"
}
],
"confidence": 123,
"currency": "<string>",
"merchant": {
"name": "<string>",
"type": "<string>"
},
"sourceUrl": "<string>"
},
"metadata": {
"<any other metadata> ": "<string>",
"concurrencyLimited": true,
"concurrencyQueueDurationMs": 123,
"contentType": "<string>",
"description": "<string>",
"error": "<string>",
"keywords": "<string>",
"language": "<string>",
"ogLocaleAlternate": [
"<string>"
],
"sourceURL": "<string>",
"statusCode": 123,
"title": "<string>",
"url": "<string>"
},
"product": {
"title": "<string>",
"url": "<string>",
"variants": [
{
"availability": {
"inStock": true,
"text": "<string>"
},
"id": "<string>",
"images": [
{
"url": "<string>",
"alt": "<string>"
}
],
"price": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
},
"sale": {
"originalPrice": {
"amount": 123,
"currency": "<string>",
"formatted": "<string>"
}
},
"sku": "<string>",
"title": "<string>",
"values": {}
}
],
"brand": "<string>",
"category": "<string>",
"description": "<string>"
},
"rawHtml": "<string>",
"screenshot": "<string>",
"summary": "<string>",
"video": "<string>",
"warning": "<string>"
},
"success": true
}上传本地或非公开文档,并将其转换为整洁、可供 LLM 使用的数据。何时使用
当源文档是本地文件或无法通过公开 URL 访问时,请使用
/parse 通过 multipart/form-data 接收文件二进制内容,并返回 Markdown、JSON、HTML、链接、图像或摘要——同时保留阅读顺序和表格。
- 将 PDF、DOCX、XLSX、HTML 等转换为 Markdown 或结构化 JSON
- 借助基于 Rust 的引擎,解析速度最高可提升 5 倍
- 单次请求最多支持 50 MB 的文件
- 支持零数据保留
何时使用 /parse
/parse。如果你有一个指向文档的公开 URL,建议优先使用 /scrape——它会根据扩展名或内容类型自动识别文件类型,并以相同方式解析。
| 来源 | 端点 |
|---|---|
指向文档的公开 URL (例如 https://example.com/report.pdf) | POST /scrape |
| 本地文件或非公开字节流 (PDF、DOCX、XLSX、HTML 等) | POST /parse (此端点) |
通过 MCP 使用 Firecrawl? 对于本地文件,请使用
firecrawl_parse。配置了 FIRECRAWL_API_URL 时,本地 MCP 可以直接读取文件。远程托管的 MCP 会先返回一个短期有效的上传命令,然后再解析返回的 uploadRef。公开文档 URL 仍应使用 /scrape。授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
请求体
multipart/form-data
⌘I

