# Firecrawl file upload and parsing

Needs file base64 and filename.

Upload and parse a file

- Tool ID: `firecrawl/parse-file`
- Name in the catalog: Upload and parse a file
- Provider: [Firecrawl](/providers/firecrawl.md)
- Capability: [Document & PDF parsing](/tools/web-scraping/documents.md)
- Price: price pending
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No price is recorded for this tool yet.


```json
{
  "model": "reported",
  "costPath": "",
  "requireCost": true,
  "maxUsdDefault": 0,
  "maxUsdCap": 0,
  "headroom": 1
}
```

Pricing source: [https://docs.firecrawl.dev/billing](https://docs.firecrawl.dev/billing). Standard monthly allowance $100/100,000 = $0.001/credit; marginal Standard overage $5/2,000 = $0.0025/credit. Gateway uses marginal cost; no automatic reload changed..

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "fileBase64": {
      "type": "string",
      "minLength": 4,
      "maxLength": 13981016
    },
    "filename": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "pattern": "^[^\\\\/\\r\\n]+$"
    },
    "contentType": {
      "type": "string",
      "default": "application/octet-stream",
      "pattern": "^[a-zA-Z0-9.+-]+/[a-zA-Z0-9.+-]+$"
    },
    "options": {
      "type": "object",
      "description": "Optional parse options sent as JSON in the multipart `options` field.",
      "properties": {
        "formats": {
          "type": "array",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "title": "Markdown",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "markdown"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Summary",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "summary"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "HTML",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "html"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Raw HTML",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "rawHtml"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Raw Base64",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "rawBase64"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Links",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "links"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Images",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "images"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Screenshot",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "screenshot"
                    ]
                  },
                  "fullPage": {
                    "type": "boolean",
                    "description": "Whether to capture a full-page screenshot (ignores viewport.height) or limit to the current viewport.",
                    "default": false
                  },
                  "quality": {
                    "type": "integer",
                    "description": "The quality of the screenshot, from 1 to 100. 100 is the highest quality."
                  },
                  "viewport": {
                    "type": "object",
                    "properties": {
                      "width": {
                        "type": "integer",
                        "description": "The width of the viewport in pixels"
                      },
                      "height": {
                        "type": "integer",
                        "description": "The height of the viewport in pixels"
                      }
                    },
                    "required": [
                      "width",
                      "height"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "JSON",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "json"
                    ]
                  },
                  "schema": {
                    "type": "object",
                    "description": "The schema to use for the JSON output. Must conform to [JSON Schema](https://json-schema.org/)."
                  },
                  "prompt": {
                    "type": "string",
                    "description": "The prompt to use for the JSON output"
                  },
                  "checkPromptInjection": {
                    "type": "boolean",
                    "description": "When enabled, scans the scraped page content for prompt injection attempts before running the extraction. If an injection is detected, the request fails with a 403 and error code SCRAPE_PROMPT_INJECTION_DETECTED. Adds 4 credits when the check runs. Defaults to false.",
                    "default": false
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Change Tracking",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "changeTracking"
                    ]
                  },
                  "modes": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "git-diff",
                        "json"
                      ]
                    },
                    "description": "The mode to use for change tracking. 'git-diff' provides a detailed diff, and 'json' compares extracted JSON data."
                  },
                  "schema": {
                    "type": "object",
                    "description": "Schema for JSON extraction when using 'json' mode. Defines the structure of data to extract and compare. Must conform to [JSON Schema](https://json-schema.org/)."
                  },
                  "prompt": {
                    "type": "string",
                    "description": "Prompt to use for change tracking when using 'json' mode. If not provided, the default prompt will be used."
                  },
                  "tag": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "default": null,
                    "description": "Tag to use for change tracking. Tags can separate change tracking history into separate \"branches\", where change tracking with a specific tagwill only compare to scrapes made in the same tag. If not provided, the default tag (null) will be used."
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Branding",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "branding"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Product",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "product"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Menu",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "menu"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Audio",
                "description": "Extract audio (MP3) from supported video URLs, e.g. YouTube. Returns a signed GCS URL.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "audio"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Video",
                "description": "Extract best-quality video from supported video URLs, e.g. YouTube. Returns a signed GCS URL.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "video"
                    ]
                  }
                },
                "required": [
                  "type"
                ]
              },
              {
                "type": "object",
                "title": "Question",
                "description": "Ask a natural-language question about the page. Returns the answer in the response `answer` field.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "question"
                    ]
                  },
                  "question": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "The question to answer about the page. Maximum 10,000 characters."
                  }
                },
                "required": [
                  "type",
                  "question"
                ]
              },
              {
                "type": "object",
                "title": "Highlights",
                "description": "Find relevant source text from the page. Returns the selected text in the response `highlights` field.",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "highlights"
                    ]
                  },
                  "query": {
                    "type": "string",
                    "maxLength": 10000,
                    "description": "The text-selection query to run against the page. Maximum 10,000 characters."
                  }
                },
                "required": [
                  "type",
                  "query"
                ]
              },
              {
                "type": "string",
                "enum": [
                  "markdown",
                  "summary",
                  "html",
                  "rawHtml",
                  "rawBase64",
                  "links",
                  "images",
                  "screenshot",
                  "json",
                  "changeTracking",
                  "branding",
                  "product",
                  "menu",
                  "audio",
                  "video",
                  "question",
                  "highlights"
                ]
              }
            ]
          },
          "description": "Output formats to include in the response. You can specify one or more formats, either as strings (e.g., `'markdown'`) or as objects with additional options (e.g., `{ type: 'json', schema: {...} }`). Some formats require specific options to be set. Example: `['markdown', { type: 'json', schema: {...} }]`.",
          "default": [
            "markdown"
          ],
          "maxItems": 10
        },
        "onlyMainContent": {
          "type": "boolean",
          "description": "Only return the main content of the page excluding headers, navs, footers, etc.",
          "default": true
        },
        "includeTags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags to include in the output."
        },
        "excludeTags": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Tags to exclude from the output."
        },
        "headers": {
          "type": "object",
          "description": "Headers to send when additional network requests are required."
        },
        "timeout": {
          "type": "integer",
          "description": "Timeout in milliseconds for the request. Default is 30000 (30 seconds). Maximum is 300000 (300 seconds).",
          "default": 30000,
          "maximum": 300000
        },
        "parsers": {
          "type": "array",
          "description": "Controls file parser behavior when relevant (for example PDF parser mode).",
          "items": {
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "pdf"
                    ]
                  },
                  "mode": {
                    "type": "string",
                    "enum": [
                      "fast",
                      "auto",
                      "ocr"
                    ],
                    "default": "auto",
                    "description": "PDF parsing mode. \"fast\": text-only extraction. \"auto\": text-first with OCR fallback. \"ocr\": OCR on every page."
                  },
                  "maxPages": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10,
                    "description": "Maximum number of pages to parse from the PDF."
                  },
                  "pages": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include physical per-page markdown alongside the document markdown. Populates the `pages` field on the document as an array of { pageNumber, markdown }. No additional cost."
                  },
                  "blocks": {
                    "type": "boolean",
                    "default": false,
                    "description": "Include per-page typed layout blocks alongside the document markdown. Populates the `blocks` field on the document: typed blocks (title, section_header, text, table, formula, figure, caption, ...) with normalized bounding boxes, reading order, character-span links into the markdown, and per-block confidence. No additional cost."
                  },
                  "pageMarkers": {
                    "type": "boolean",
                    "default": false,
                    "description": "Annotate page breaks in the document markdown: pages are joined with `\\n\\n---\\n\\n<!-- page N -->\\n\\n`, where N is the 1-based physical page of the content that follows. Markers appear between pages only (no leading marker for page 1), and numbering may skip pages merged across a page break — use `pages: true` when every physical page is needed. No new response field; no additional cost."
                  }
                },
                "required": [
                  "type",
                  "maxPages"
                ],
                "additionalProperties": false
              }
            ]
          },
          "default": []
        },
        "skipTlsVerification": {
          "type": "boolean",
          "description": "Skip TLS certificate verification when making requests.",
          "default": true
        },
        "removeBase64Images": {
          "type": "boolean",
          "description": "Remove base64-encoded images from output and keep alt text placeholders.",
          "default": true
        },
        "blockAds": {
          "type": "boolean",
          "description": "Enable ad and cookie popup blocking.",
          "default": true
        },
        "redactPII": {
          "oneOf": [
            {
              "type": "boolean"
            },
            {
              "type": "object",
              "description": "Tuning options for PII redaction.",
              "properties": {
                "mode": {
                  "type": "string",
                  "enum": [
                    "accurate",
                    "aggressive",
                    "fast"
                  ],
                  "default": "accurate",
                  "description": "Redaction strategy. `accurate` is model-only and optimized for precision, `aggressive` increases recall with additional heuristics, and `fast` uses heuristics without the model call."
                },
                "entities": {
                  "type": "array",
                  "description": "Restrict redaction to these entity buckets. If omitted, all supported entities are redacted.",
                  "items": {
                    "type": "string",
                    "enum": [
                      "PERSON",
                      "EMAIL",
                      "PHONE",
                      "LOCATION",
                      "FINANCIAL",
                      "SECRET"
                    ],
                    "description": "Public PII entity buckets supported by Firecrawl redaction."
                  }
                },
                "replaceStyle": {
                  "type": "string",
                  "enum": [
                    "tag",
                    "mask",
                    "remove"
                  ],
                  "default": "tag",
                  "description": "`tag` replaces spans with placeholders like `<EMAIL>`, `mask` replaces characters with `*`, and `remove` deletes the span text."
                }
              },
              "additionalProperties": false
            }
          ],
          "default": false,
          "description": "Redact personally identifiable information from returned markdown. Pass `true` to use defaults, or an object to tune mode, entities, and replacement style."
        },
        "proxy": {
          "type": "string",
          "enum": [
            "basic",
            "auto"
          ],
          "description": "Proxy mode for parse uploads. `/parse` supports only `basic` and `auto`."
        },
        "origin": {
          "type": "string",
          "description": "Origin identifier for analytics and logging.",
          "default": "api"
        },
        "integration": {
          "type": [
            "string",
            "null"
          ],
          "description": "Optional integration identifier."
        },
        "auditMetadata": {
          "type": "object",
          "description": "User attribution included with SIEM logging events when SIEM Logging is enabled for the organization.",
          "additionalProperties": false,
          "required": [
            "username"
          ],
          "properties": {
            "username": {
              "type": "string",
              "maxLength": 1024,
              "description": "The username associated with the request."
            }
          }
        },
        "zeroDataRetention": {
          "type": "boolean",
          "default": false,
          "description": "If true, this will enable zero data retention for this parse. To enable this feature, please contact help@firecrawl.dev"
        }
      }
    }
  },
  "required": [
    "fileBase64",
    "filename"
  ],
  "additionalProperties": false
}
```

## Published example

No example input is published for this tool. Ask for the inputs required by its schema.

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

[Provider documentation](https://docs.firecrawl.dev/api-reference/v2-introduction)

[REST inspection](https://api.agentik.cc/v1/tools/firecrawl/parse-file) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/firecrawl/parse-file) · [Agent index](/llms.txt)
