REST API Reference
Programmatic access to document conversion, backend control, downloads, and history
Use the Markit REST API to convert PDF, Word, PowerPoint, Excel, and other documents to Markdown programmatically. Integrate document-to-Markdown conversion into your own applications, scripts, or CI/CD pipelines. For interactive use, try the free web converter instead.
Conversion Settings
Optional settings
Include any of these optional fields in multipart form data requests to control backend parsing behavior.
| Field | Type | Default | Valid Values | Description |
|---|---|---|---|---|
do_ocr |
boolean | true |
true, false |
Run OCR on scanned pages or images inside the document. |
force_ocr |
boolean | false |
true, false |
Force OCR even when the document contains selectable text. |
table_mode |
string | off |
off, fast, accurate |
Table extraction mode (Docling only). accurate uses a slower ML-based pipeline. |
images_scale |
number | 0.5 |
Positive number (e.g. 0.5, 1, 2) |
Resolution scale factor for images embedded in the output. |
heading_style |
string | ATX |
ATX, SETEXT |
Markdown heading style (MarkItDown only). ATX uses # prefixes; SETEXT uses underlines. |
API Endpoint Reference
/api/convert
Convert single document
Convert a single file to Markdown. The request must be sent as multipart/form-data.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
file |
file | Yes | The document to convert (PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, …). |
split_headers |
boolean | No | When true, splits the output on top-level headings and returns a ZIP archive instead of a single .md file. |
| Conversion Settings | — | No | See the Conversion Settings section above. |
curl -X POST https://mitdown.ca/api/convert \
-F "file=@report.pdf" \
-F "split_headers=false"
{
"conversion_status": "SUCCESS",
"filename": "report.md",
"download_url": "/api/download/a1b2c3d4/report.md?is_split=false",
"is_split": false,
"markdown": "# Report\n\nContent here…"
}
/api/convert/batch
Convert multiple documents
Convert multiple files in a single request. The request must be sent as multipart/form-data.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
files[] |
file[] | Yes | One or more files to convert. Repeat the field for each file. |
split_headers |
boolean | No | When true, each converted file is split on top-level headings. |
| Conversion Settings | — | No | See the Conversion Settings section above. |
curl -X POST https://mitdown.ca/api/convert/batch \
-F "files[]=@doc1.pdf" \
-F "files[]=@doc2.docx" \
-F "split_headers=false"
{
"batch_id": "e5f6g7h8",
"results": [
{
"filename": "doc1.md",
"status": "SUCCESS",
"backend_used": "docling",
"download_url": "/api/download/batch/e5f6g7h8/doc1.md"
},
{
"filename": "doc2.md",
"status": "SUCCESS",
"backend_used": "docling",
"download_url": "/api/download/batch/e5f6g7h8/doc2.md"
}
],
"download_all_url": "/api/download/batch/e5f6g7h8/all"
}
/api/convert/current-backend
Get active backend
Returns the conversion backend currently active for this session and the list of formats it supports.
curl https://mitdown.ca/api/convert/current-backend
{
"current_backend": "markit",
"supported_formats": ["pdf", "powerpoint", "word", "excel", "html", "json", "xml", "image", "csv", "audio", "zip", "epub", "yaml"]
}
/api/convert/switch-backend
Switch active backend
Switch the active conversion backend for the current session. Send a JSON body.
Parameters
| Field | Type | Required | Valid Values | Description |
|---|---|---|---|---|
backend |
string | Yes | markitdown, docling, markit |
The backend to activate for subsequent conversions. |
curl -X POST https://mitdown.ca/api/convert/switch-backend \
-H "Content-Type: application/json" \
-d '{"backend": "docling"}'
{
"message": "Successfully switched to docling backend",
"current_backend": "docling"
}
/api/download/<id>/<filename>
Download single conversion
Download a previously converted file by its conversion ID and filename.
Path Parameters
| Parameter | Description |
|---|---|
id |
The 32-character `conversion_id` returned in the conversion response. |
filename |
The filename of the generated document. |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
is_split |
boolean | Set to true when downloading a split headings ZIP archive. |
curl -O "https://mitdown.ca/api/download/a1b2c3d4/report.md"
# For split output:
curl -O "https://mitdown.ca/api/download/a1b2c3d4/report.zip?is_split=true"
/api/download/batch/<id>/<filename>
Download batch converted file
Download a single converted file from a batch conversion result.
Path Parameters
| Parameter | Description |
|---|---|
id |
The batch_id returned by the batch conversion route. |
filename |
The filename of the individual converted file. |
curl -O "https://mitdown.ca/api/download/batch/e5f6g7h8/doc1.md"
/api/download/batch/<id>/all
Download batch zip
Download all files from a batch conversion as a single ZIP archive.
Path Parameters
| Parameter | Description |
|---|---|
id |
The batch_id returned by the batch conversion route. |
curl -O "https://mitdown.ca/api/download/batch/e5f6g7h8/all"
/api/history
Get conversion history
Retrieve the conversion history for the current session.
curl https://mitdown.ca/api/history
{
"conversion_history": [
{
"backend": "markitdown",
"conversion_id": "a1b2c3d4",
"download_url": "/api/download/a1b2c3d4/report.md?is_split=false",
"filename": "report.md",
"is_batch": false,
"is_split": false,
"timestamp": 1716499800000
}
]
}
/api/history
Clear conversion history
Clear all conversion history for the current session.
curl -X DELETE https://mitdown.ca/api/history
{
"message": "Conversion history cleared successfully"
}