Head to head · Document parsing · October 2026 research run

Docling vs Mathpix OCR API

Docling scores 68 (B) on agent readiness against Mathpix OCR API's 61.7 (C), and leads in 5 of 7 scored categories. Mathpix OCR API leads on security & auth. Both do document parsing.

Best document parsing, OCR and extraction APIs for AI agents · All 253 documents comparisons

Which one, for what

Docling B

Best for Self-hosted PDF and Office conversion to Markdown or JSON for RAG and agents that can't send documents out.

Ahead on

  • Schema & documentation, 77 against 55
  • Agent ergonomics, 77 against 61
  • Payments & pricing, 90 against 30
  • Maintenance & community, 89 against 79
  • Transparency & trust, 65 against 57

Also in its favour

  • No key needed to call it
  • Runs on your own machine
  • Open source

Watch for

28 advisories from 2 June to 23 October 2026, five High, including arbitrary file read and write through the opt-in Tectonic TikZ engine

Mathpix OCR API C

Best for Converting scientific and technical documents, equation images, tables and handwriting into LaTeX or Markdown at a few tenths of a cent per image, for teams that accept a card and a setup fee.

Ahead on

  • Security & auth, 58 against 53

Also in its favour

  • A hosted endpoint, with nothing to install
  • No incidents deducted, where Docling loses 8 points for them

Watch for

An API key needs a card and a one-time $19.99 setup fee, and no free API tier was found

Why the edge

Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.

Payments & pricing Docling +60

Docling 90

Self-hosted rule. Free MIT software with nothing to buy, so 20 + 20 + 20, and no payment protocol (0). 60. Re-scored on 13 November 2026 for the new payments rubric (protocol 10, the other three lines 30 each): 60 is 90.

Mathpix OCR API 30

No x402, MPP or L402 (0). Per-image and per-page prices are public without a login (30). A card and a $19.99 non-refundable setup fee come before the first key, and the $29 test credit follows payment, so there is no card-free trial for the API (0). Access needs a browser sign-up and a card, and no programmatic route was found (0). Total 30.

Schema & documentation Docling +22

Docling 77

No OpenAPI file is published; docling-serve is a FastAPI app that serves its schema when run, and docling-mcp's tools carry typed inputs with Field descriptions from Pydantic (20 of 25). No llms.txt on the docs site; Markdown docs and AGENTS.md in the repository (5 of 10). MCP tool docstrings say what each tool returns and which other tool supplies its key, with little on when not to use one (14 of 20). Pydantic types with descriptions, few enums (12 of 15). Many runnable examples in docs/examples, with errors raised as Python exceptions that name the fix, such as OperationNotAllowed and unknown document keys listing valid ones (11 of 15). Changelog per release (15). 20+5+14+12+11+15 = 77.

Mathpix OCR API 55

No OpenAPI file was found (0). mathpix.com/llms.txt returned 404 and docs.mathpix.com was not checked for one (0). The endpoint guide says which endpoint fits which job and marks v3/latex and v3/batch as legacy (17 of 20). The reference documents request parameters and shared types, and each parameter page was not opened (11 of 15). Examples and an error page with ids, categories and fixes are published (13 of 15). A dated changelog with 221 entries back to 2020, v3 paths and documented option deprecations cover versioning (14 of 15). Total 55.

Agent ergonomics Docling +16

Docling 77

About 25 MCP tools in the default groups (15), selectable as conversion, generation and manipulation groups, with anchor tools to read one part of a document (22 of 25). max_num_pages, max_file_size and page ranges on conversion, Markdown or JSON export (15 of 20). Errors are exceptions with messages, such as an unknown document key listing the valid ones (12 of 20). readOnlyHint and destructiveHint on the MCP tools, and conversions are repeatable (18 of 20). Sensible defaults and one call to convert; Python only, with a docling-client package for docling-serve (10 of 15). 22+15+12+18+10 = 77.

Mathpix OCR API 61

Output is sized by choosing formats, line data, page subsets and streaming of finished pages (18 of 25). Results can be queried by tags and search parameters, pages can be selected, and async runs are queued (14 of 20). Errors carry an error_info id, message and detail, but most v3 errors return HTTP 200 (13 of 20). Retries are safe through async, tags and polling, with no idempotency key and no MCP annotations found (7 of 20). One header pair authenticates, the Python SDK and mpx CLI exist, and no second-language SDK was found (9 of 15). Total 61.

Maintenance & community Docling +10

Docling 89

v2.148.0 on 5 November 2026, the day before this check (30). 13 releases from 9 October to 5 November (20). Open issues and pull requests are numerous, an AI triage workflow and PR reminders run, and six maintainers are named; replies not sampled (17 of 25). docling-mcp publishes to the official MCP registry on release under io.github.docling-project, per its workflow and server.json; the registry entry itself was not read (12 of 15). CI, a dependency-update workflow and uv.lock (10). 30+20+17+12+10 = 89.

Mathpix OCR API 79

The changelog's newest entry is 3 November 2026 (30). It has five dated entries since 31 August 2026 (20). Support runs by email and the console, limit raises are self-service, and no community channel was found, so 8 of 15. The Python SDK and mpx CLI are current, with mpxpy 0.0.23 on 22 September 2026 (15). The SDK repository has test and release workflows and an MIT licence, and passing runs were not read because github.com's pages refuse our reader (6 of 10). Total 79.

Transparency & trust Docling +8

Docling 65

MIT, an OSI licence, with model licences noted as separate (30). Runs locally, remote services off by default and air-gapped use documented; no privacy statement is needed for local use, but model downloads from Hugging Face on first run are only partly described (22 of 30). Breaking changes are marked in the changelog, with no deprecation policy or dated notices (10 of 20). No telemetry found in the source; nothing to opt out of (15 of 20). 30+22+10+15 = 77.

Mathpix OCR API 57

A closed service under terms last updated on 1 March 2024, clear on fees and refunds, and the SDK is MIT (13 of 30). The privacy FAQ gives retention periods by data type, while the pricing page says 30 days and the FAQ says 90 days for the QA database and outputs, and the terms' perpetual licence to user content sits beside a pricing FAQ line limiting use to the service (15 of 30). Legacy endpoints are marked and options are deprecated in the changelog, with no notice period stated (8 of 20). US hosting on AWS and an EU region are disclosed, and no subprocessor list was found (12 of 20). Total 48.

Security & auth Mathpix OCR API +5

Docling 53

Framework reading. No credentials for local use; docling-serve has one optional shared key, off by default (20 of 30). Remote services are off unless explicitly enabled, local file fetch is guarded by flags, and MCP tools carry read-only and destructive annotations; manipulation tools can delete items and save files (12 of 20). Converted documents are untrusted text and no prompt-injection guidance was found (3 of 15). Logging only, no audit trail (3 of 15). A disclosure policy with private reporting, 28 advisories published in public with fixed versions, under the LF AI & Data Foundation; no bug bounty (15 of 20). 20+12+3+3+15 = 53. The advisories themselves are the deduction.

Mathpix OCR API 58

A revocable app_id and app_key pair per key, with a disable switch for a leaked key, per-key limits and five-minute app tokens for client apps, and no scopes (22 of 30). Members have roles and keys carry limits, but no read-only or per-endpoint scopes were found (8 of 20). OCR output is untrusted text from user documents and no injection guidance was found (3 of 15). A usage tab with alerts, a results tab and hourly usage by key give per-call visibility (11 of 15). SOC 2 Type 2, a yearly third-party penetration test and a security contact are stated, and no bug bounty or security.txt was found (14 of 20). Total 58.

Score by category

CategoryWeightDoclingMathpix OCR APIEdge
Reliability16%8585even
Performance10%pendingpendingpendingnot scored in this run
Schema & documentation13%7755Docling +22
Agent ergonomics13%7761Docling +16
Security & auth14%5358Mathpix OCR API +5
Payments & pricing10%9030Docling +60
Task success10%pendingpendingpendingnot scored in this run
Maintenance & community7%8979Docling +10
Transparency & trust7%6557Docling +8
Negative events≤15-80
TotalB 68/100C 61.7/100

Facts side by side

FactDoclingMathpix OCR API
KindSDK + MCPHTTP API
VendorDocling Project (LF AI & Data Foundation, started at IBM Research Zurich)Mathpix
Hosted endpointno (local only)https://api.mathpix.com
Transportsstdio, Streamable HTTP, HTTPHTTP
AuthNoneAPI key
PricingFreePay per use
x402nono
LicenceMITClosed service under the Mathpix Terms of Service (Mathpix, Inc., a Delaware corporation). The Python SDK is MIT.
Tools exposed25none
Read-only variant documentednono
llms.txtnono
MCP registryio.github.docling-project/docling-mcpnot listed
Last release2026-11-052026-11-03
Terms last updatedno document linkednot read yet
Privacy policy last updatedno document linkednot read yet
Popularity70k stars, 947k PyPI/wknone

How the scores have moved

Docling

Mathpix OCR API

No score change since it was listed.

Verdicts

Docling

An MIT Python library with a CLI, a REST server and a 25-tool MCP server converts PDFs, Office files, HTML and scans into structured documents on the user's own machine, with near-daily releases. Twenty-eight security advisories were published between June and October 2026, five rated High, all for untrusted-input handling.

Mathpix OCR API

Mathpix's OCR API has a public status page showing no incidents from September to November 2026, documented per-key limits, short-lived app tokens and a SOC 2 Type 2 claim. An API key needs a card and a $19.99 setup fee, there is no free API tier, and most v3 errors return HTTP 200.

Before you call either

Docling

  1. Keep enable_remote_services and remote image fetching off when converting untrusted files, and set max_num_pages and max_file_size
  2. Upgrade to v2.148.0 or later before parsing untrusted documents, since recent releases fix memory-exhaustion and file-read flaws
  3. Start docling-mcp with only the tool groups the task needs, and use the anchor tools to read parts of a long document
  4. Treat converted text as untrusted input, never as instructions
  5. Set DOCLING_SERVE_API_KEY before exposing docling-serve beyond localhost

Mathpix OCR API

  1. Send app_id and app_key headers from a server. For a client app, mint a short-lived token from v3/app-tokens instead.
  2. Check error_info.id in the response body. Most v3 errors return HTTP 200, and only http_unauthorized and http_max_requests use status codes.
  3. If error_info.id is http_max_requests, wait and retry with exponential backoff. Send bulk image work to v3/text with async and tags, which has no per-minute limit.
  4. Set Improve Mathpix off on the key for sensitive files. The key setting overrides the improve_mathpix flag in a request.
  5. Ask for a zip output such as mmd.zip when you need page images after 30 days. Image URLs in the Markdown expire.

Questions

Which is better for AI agents, Docling or Mathpix OCR API?

Docling scores 68 (B) on agent readiness against Mathpix OCR API's 61.7 (C), and leads in 5 of 7 scored categories. Mathpix OCR API leads on security & auth.

Can an agent call Docling and Mathpix OCR API without installing anything?

Docling runs on your own machine, with no hosted endpoint listed. Mathpix OCR API has a hosted endpoint at https://api.mathpix.com.

Are Docling and Mathpix OCR API open source?

Docling is open source (MIT). No open-source release is listed for Mathpix OCR API.

Other comparisons with Docling or Mathpix OCR API

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.