Mistral Parser

Extract text from PDF documents

The Mistral Parse tool provides a powerful way to extract and process content from PDF documents using Mistral's OCR API. This tool leverages advanced optical character recognition to accurately extract text and structure from PDF files, making it easy to incorporate document data into your agent workflows.

With the Mistral Parse tool, you can:

  • Extract text from PDFs: Accurately convert PDF content to text, markdown, or JSON formats
  • Process PDFs from URLs: Directly extract content from PDFs hosted online by providing their URLs
  • Maintain document structure: Preserve formatting, tables, and layout from the original PDFs
  • Extract images: Optionally include embedded images from the PDFs
  • Select specific pages: Process only the pages you need from multi-page documents

The Mistral Parse tool is particularly useful for scenarios where your agents need to work with PDF content, such as analyzing reports, extracting data from forms, or processing text from scanned documents. It simplifies the process of making PDF content available to your agents, allowing them to work with information stored in PDFs just as easily as with direct text input.

Usage Instructions

Integrate Mistral Parse into the workflow. Can extract text from uploaded PDF documents, or from a URL.

Tools

mistral_parser

Parse PDF documents using Mistral OCR API

Input

ParameterTypeRequiredDescription
filePathstringYesURL to a PDF document to be processed
fileUploadobjectNoFile upload data from file-upload component
resultTypestringNoType of parsed result (markdown, text, or json). Defaults to markdown.
includeImageBase64booleanNoInclude base64-encoded images in the response
pagesarrayNoSpecific pages to process (array of page numbers, starting from 0)
imageLimitnumberNoMaximum number of images to extract from the PDF
imageMinSizenumberNoMinimum height and width of images to extract from the PDF
apiKeystringYesMistral API key (MISTRAL_API_KEY)

Output

ParameterTypeDescription
pagesarrayArray of page objects from Mistral OCR
indexnumberPage index (zero-based)
markdownstringExtracted markdown content
imagesarrayImages extracted from this page with bounding boxes
idstringImage identifier (e.g., img-0.jpeg)
top_left_xnumberTop-left X coordinate in pixels
top_left_ynumberTop-left Y coordinate in pixels
bottom_right_xnumberBottom-right X coordinate in pixels
bottom_right_ynumberBottom-right Y coordinate in pixels
image_base64stringBase64-encoded image data (when include_image_base64=true)
dimensionsobjectPage dimensions
dpinumberDots per inch
heightnumberPage height in pixels
widthnumberPage width in pixels
tablesarrayExtracted tables as HTML/markdown (when table_format is set). Referenced via placeholders like [tbl-0.html]
hyperlinksarrayArray of URL strings detected in the page (e.g., [
headerstringPage header content (when extract_header=true)
footerstringPage footer content (when extract_footer=true)
modelstringMistral OCR model identifier (e.g., mistral-ocr-latest)
usage_infoobjectUsage and processing statistics
pages_processednumberTotal number of pages processed
doc_size_bytesnumberDocument file size in bytes
document_annotationstringStructured annotation data as JSON string (when applicable)

On this page

Start building today
Trusted by over 60,000 builders.
Build Agentic workflows visually on a drag-and-drop canvas or with natural language.
Get started