File Conversion API
Convert HTML, ZIP, and other file formats to clean Markdown via the REST API.
Convert Notion HTML exports to Markdown programmatically. Supports single HTML files and ZIP archives containing multiple pages.
/api/v1/convertBearer tokenUpload a file and receive clean Markdown in the response body.
Request
Send a multipart/form-data request with the file attached.
Parameters
fileFilerequiredThe Notion HTML file (.html) or ZIP archive (.zip) to convert. Maximum file size: 10 MB for HTML, 50 MB for ZIP.
formatstringOutput format. Defaults to markdown. Supported values: markdown, json.
include_metadatabooleanWhen true, includes frontmatter with the page title, export date, and source URL. Defaults to false.
Examples
Response
Success (200)
Returns the converted Markdown as text/markdown (or application/json if format=json).
bodystringThe converted Markdown content. For ZIP uploads containing multiple files, each page is separated by a horizontal rule (---).
Error responses
| Status | Description |
|---|---|
400 | Missing or invalid file. Unsupported file type. |
401 | Missing or invalid API token. |
413 | File exceeds size limit. |
429 | Rate limit exceeded. See Rate Limits. |
Rate limits
API requests are rate-limited per plan. Free plans allow 10 conversions/day. See Rate Limits for details.
Batch conversion
For ZIP archives, the API converts all .html files found in the archive and returns them as a single Markdown document with --- separators.
curl -X POST https://kami.typo.monster/api/v1/convert \
-H "Authorization: Bearer em_live_abc123" \
-F "file=@notion-workspace.zip"ZIP processing is asynchronous for archives larger than 5 MB. The API returns a 202 with a job ID that you can poll for status.