Mathpix OCR API for STEM
Image & PDF digitizing software for STEM companies. Make creating and searching STEM content easy for your end users.
Battle-tested with deep functionality, including math equations, chemical diagrams, tables, and full PDF document conversion. Compatible with industry standards like PDFs, LaTeX, AsciiMath, MathML, Markdown, HTML, and SMILES.
The most trusted OCR provider for STEM
Median image response
Send an image, get LaTeX or Markdown back. Fast enough to sit inside a live user interaction.
Per 20-page PDF
Every page runs in parallel, so a 500-page textbook still comes back in well under a minute.
Digital ink
Stylus strokes recognized in real time, for handwriting-first apps.
Uptime
Elastic GPU capacity across multiple clouds. No queueing, no single point of failure.
Latency figures measured on live customer traffic, not a curated test set.
Our API Capabilities
Mathpix OCR API is the industry-leading computer vision solution for all things STEM. We excel at processing documents that are technical in nature and contain structured data.
Text
Scan text and handwriting from images and PDFs.
Math
The industry standard for processing images and documents with PhD-level math.
Chemical Diagrams
OCR printed and handwritten molecules.
Code
Extract perfectly formatted code snippets from images and PDFs.
Tables
Complex tables are no match for Mathpix OCR API. Scan tabular data in seconds.
All Mathpix OCR API Endpoints
v3/text — Process an Image
Our most widely used endpoint. OCR individual images of handwritten and printed equations, text, tables, and diagrams to get digital formats like LaTeX, AsciiMath, and MathML.
Developer Docs
v3/pdf — Process a PDF
OCR PDFs and convert them to other formats. This endpoint works asynchronously since large PDF files can take several minutes to process. Accepts PDF files and URLs.
Developer Docs
v3/strokes — Digital Ink
Add stroke recognition (digital ink) to your app. Works for all math and for Hindi and Latin alphabet text. Supports live drawing capabilities via session IDs.
Developer Docsv3/batch — Batch Processing
Process multiple images in a single POST request. Returns a batch ID queried with a GET request once processing completes. Best for workflows that are not latency-sensitive.
Developer Docs
Industry Leaders Trust Mathpix
Digitize Entire PDFs
PDFs are first converted into Mathpix Markdown, then exported to DOCX, XLSX, LaTeX, and PDF. Text, diagrams, equations, and tables are extracted from the PDF.
Read the PDF API Docs
Original PDF
Extracted Mathpix Markdown
Rendered Result
Supported Image Types
Use Mathpix OCR API to accurately convert images of simple and complicated printed and handwritten math, text, tables, and chemical diagrams. We also recognize 100+ languages.
Use Cases for Mathpix OCR API
Solving & Search Apps
With a long tail of advanced math, handwriting, and foreign language features, Mathpix OCR API is the #1 choice for solving, tutoring, and search apps.
Grading & Assessment
Grading and assessment platforms use Mathpix OCR API to make it faster and easier for professors to distribute and grade homework and exams with AI.
Publishing & Accessibility
Publishing companies use Mathpix OCR API to create digital STEM educational material. Accessibility companies use Mathpix to make science content accessible to all students.
Bulk Digitization
Our APIs are useful for bulk digitization of images or PDFs. We also offer on-premise and secure conversion solutions.
Ready to Get Started?
Pay-as-you-go plans require a credit or debit card. Enterprise payment options available on request.