Firecrawl Parse
使用 Firecrawl 将单个本地文档解析为 Markdown、HTML、原始 HTML、链接、摘要、JSON 或文档问答结果。支持的扩展名为 .html、.htm、.xhtml、.pdf、.docx、.doc、.odt、.rtf、.xlsx、.xls。 输入与流程 • filePath 与 uploadRef 必须且只能提供一个,均为非空字符串。本地 MCP 模式从 MCP 服务器文件系统读取 filePath。托管模式不能读取或检查调用方的本地文件:第一次用 filePath 获取上传说明;调用方完成上传后,再用返回的短期 uploadRef 及所需解析选项调用本工具。 • 托管模式是“两次调用加上传”的交接流程,不是带任务状态轮询的异步解析任务。本工具未提供单独的任务状态查询或结果提取生命周期;首次返回上传说明并不代表已解析完成。 参数 • formats 为数组,可选 markdown、html、rawHtml、links、summary、json、query。结构化提取可通过 jsonOptions.prompt 描述需求,并通过 jsonOptions.schema 提供 JSON Schema 对象。queryOptions 必须同时包含 prompt(最多 10000 个字符)和 mode(directQuote 或 freeform);虽然 schema 标注 freeform 为默认值,传入 queryOptions 时仍必须提供 mode。 • PDF 应包含 parsers:["pdf"];可用 pdfOptions.maxPages 限制页数,取值为 1–10000 的整数。 • contentType 用于覆盖托管第一阶段的 MIME 类型;省略时仅根据扩展名推断,不读取文件。declaredSizeBytes 为可选的已知文件大小声明,整数范围 1–9007199254740991 字节;此范围不代表允许上传同等大小的文件,也不会触发服务器测量文件大小。 • includeTags、excludeTags 用于筛选 HTML 标签;onlyMainContent 请求仅返回主体内容;removeBase64Images 用于移除输出中的 base64 图片。 • redactPII 请求对返回内容中的个人身份信息脱敏。zeroDataRetention 请求处理后不保留文件数据,需要符合条件的已认证账户,匿名免密钥使用时应省略。 • proxy 仅支持 basic 或 auto。skipTlsVerification 请求在获取文件资源时跳过 TLS 证书校验,会降低传输验证保障。storeInCache 是接口暴露的缓存存储请求选项,不能据此保证缓存效果。maxAge 会被忽略:parse 不复用或存储索引内容。除 filePath/uploadRef 二选一外,其余参数均为可选,不接受额外的未定义参数。 返回值 返回对象的字段随阶段及调用结果变化。托管第一阶段可能包含 mode、upload 上传信息(uploadUrl、method、headers、fields、command、expiresAt、maxSizeBytes、uploadRef)、形如 {name, arguments} 的 nextToolCall,以及 notes、message。最终 data 包含所选格式的解析内容,可能含 data.metadata.scrapeId。还可能返回 success、error、warning、用于非 JSON 响应体的 raw、agent_hints、conversationId。这些字段不保证每次均出现,接口未规定固定的 mode/状态字符串或 data 内部结构。上传应以返回的过期时间和大小限制为准,不能假定统一上限。 限制 一次解析一个文件,多个文件需分别调用。远程网页 URL 应使用独立的 firecrawl_scrape 操作。本工具不支持交互动作、截图、品牌信息提取或变更跟踪,也未暴露 waitFor、location、mobile 参数。禁止同时提交 filePath 与 uploadRef。提取指定字段适合使用 JSON 加 schema,获取全文适合使用 Markdown。
价格说明
单次费用为(较大值((1.19 × 若(本地文件路径 ≠ 未提供),取0;否则取实际文档解析用量), 0))AE积分。各项条件同时适用,按所选条件计算合计费用。
托管模式下,提供本地文件路径的首次调用仅获取上传说明;完成上传后,使用上传引用调用解析。解析费用依据实际记录的文档解析用量结算。PDF 的实际解析页数影响用量,最大页数参数仅限制解析范围,不代表实际解析页数。
API 调用
通过统一工具网关发起同步请求,鉴权和计费由 AgentEarth 处理。
curl --request POST \
--url 'https://agentearth.ai/agent-api/v1/tool/execute?tool_name=ae_firecrawl_parse' \
--header "X-Api-Key: $AGENTEARTH_API_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
"params": {}
}'- 请求方式
- POST
- 接口地址
- /agent-api/v1/tool/execute
- 鉴权方式
- X-Api-Key
- 超时时间
- 60 秒
{
"error_no": 0,
"error_msg": "",
"result": [
{
"type": "text",
"text": "xxx"
}
],
"platform_annotations": {
"source": "AgentEarth",
"platform_note": "xxx",
"platform_suggestion": "xxx"
}
}工具参数
未传入的可选参数将使用平台默认值。
| 参数 | 类型 | 必填 | 说明 | 默认值 |
|---|---|---|---|---|
proxy | enum (basic | auto) | 否 | 暂无参数说明。 | — |
maxAge | number | 否 | Ignored: parse never reuses or stores indexed content. | — |
formats | array | 否 | Output formats to generate from the parsed file, such as markdown, HTML, JSON, summary, links, or query results. | — |
parsers | array | 否 | Parsers to apply to the file. Include "pdf" when parsing PDF files. | — |
filePath | string | 否 | Phase 1 only: path to the local file on the caller/harness machine. Hosted MCP will not read or stat this path; it is used only to produce upload instructions. | — |
redactPII | boolean | 否 | Redact personally identifiable information from returned content. | — |
uploadRef | string | 否 | Phase 2 only: short-lived upload reference returned by phase 1 after the local PUT upload completes. | — |
pdfOptions | object | 否 | Options for the PDF parser. | — |
pdfOptions.maxPages | integer | 否 | Maximum number of PDF pages to parse. | — |
contentType | string | 否 | Phase 1 MIME type override. If omitted, the server infers it from the file extension without reading the file. | — |
excludeTags | array | 否 | HTML tags to exclude from the parsed output. | — |
includeTags | array | 否 | HTML tags to include in the parsed output. | — |
jsonOptions | object | 否 | Options for extracting structured JSON from the file. | — |
jsonOptions.prompt | string | 否 | Instructions describing the data to extract as JSON. | — |
jsonOptions.schema | object | 否 | JSON schema that defines the structure of the extracted data. | — |
queryOptions | object | 否 | Options for querying the parsed file. | — |
queryOptions.mode | enum (directQuote | freeform) | 是 | 暂无参数说明。 | freeform |
queryOptions.prompt | string | 是 | Question or query to run against the file content. | — |
storeInCache | boolean | 否 | Store the parsing result in the cache. | — |
onlyMainContent | boolean | 否 | Return only the main document content. | — |
declaredSizeBytes | integer | 否 | Optional phase 1 size declaration. Hosted MCP does not stat the file; provide this only if the caller already knows it. | — |
zeroDataRetention | boolean | 否 | Do not retain file data after processing. | — |
removeBase64Images | boolean | 否 | Remove base64-encoded images from the parsed output. | — |
skipTlsVerification | boolean | 否 | Skip TLS certificate verification when retrieving file resources. | — |

