markdown

Convert to Markdown

Convert a file or URL to markdown.

File Upload: Use multipart/form-data with a file field.

URL Fetch: Provide a url field. For websites (HTML), uses a headless browser to render the page before converting — handles JS-heavy sites.

Supported formats: PDF, DOCX, PPTX, XLSX, CSV, HTML, images, audio, code files, and any URL via headless browser rendering.

post/api/v1/markdown/convert

Request

  • Base URL: https://docs.thedrive.ai (the document declares no server; this is the origin it was published from)
  • URL: https://docs.thedrive.ai/api/v1/markdown/convert
  • Auth: none declared

Headers

X-API-Keystring

Response

Successful Response

successboolean
markdownstring required

Converted markdown content

filenamestring required

Original filename or URL

content_typestring nullable

Detected MIME type

content_lengthinteger required

Length of the markdown output in characters

scanned_pagesinteger[] nullable

With structure=true, for a PDF: the pages that are images of text (reported even with ocr=false)

transcribed_pagesinteger[] nullable

With structure=true, for a PDF: the pages whose text is a transcription of the image

Example response

{
  "content_length": 1234,
  "content_type": "application/pdf",
  "filename": "document.pdf",
  "markdown": "# Document Title\n\nThis is the content...",
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.