---
title: Convert Document to Markdown API
slug: convert-document-to-markdown
url: https://apyhub.com/chensichengmalu/service/convert-document-to-markdown
provider: Malu
categories: [Ingestion Kit, Document Intelligence Kit, Output Kit]
tags: [document-conversion, markdown, content-extraction, file-ingestion]
auth: api_key
version: 1.1.0
service_type: sync
endpoints: 1
atoms: 120
mcp: true
---

# Convert Document to Markdown API

Convert office documents, UTF-8 text and text PDFs to Markdown. Marketplace limits: 3 MiB decoded input and 5 MiB complete JSON request; output up to 5 MiB. Sha

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/chensichengmalu/convert-document-to-markdown` | What it does Converts one document — Word, Excel, PowerPoint, OpenDocument, EPUB, RTF, text-based P… | 120 |

## Endpoint reference

### Convert a document to Markdown

`POST https://api.eu.apyhub.com/chensichengmalu/convert-document-to-markdown` · 120 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `filename` | body | string | yes | The file's name, 1–255 characters, ending in a supported extension (it decides the format). Paths and control characters are stripped; HTML markup is rejected. Example: `document.csv`. |
| `contentBase64` | body | string | yes | The file's bytes as standard padded base64 (ASCII spaces, tabs and line breaks allowed). At most 3 MiB decoded and 5 MiB for the whole JSON request. Example: `bmFtZSxzY29yZQpBZGEsNDIK`. |

#### Quickstart

```bash
curl -X POST "https://api.eu.apyhub.com/chensichengmalu/convert-document-to-markdown" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"filename":"document.csv","contentBase64":"bmFtZSxzY29yZQpBZGEsNDIK"}'
```

#### What you'll get back

The sample file is a two-line CSV (`name,score` / `Ada,42`); it comes back as a Markdown table:

```json
{
  "markdown": "| name | score |\n| --- | --- |\n| Ada | 42 |\n",
  "format": "csv",
  "filename": "document.csv",
  "inputBytes": 18,
  "outputBytes": 44,
  "ocrUsed": false
}
```

## About

## What it does

Document to Markdown converts a single office document, spreadsheet, slide deck, e-book, PDF or text file into Markdown. You send the file's name and its bytes as base64, and get back clean Markdown — tables for spreadsheets and CSVs, text with line breaks for PDFs — plus the detected format and the input and output sizes. It reads 28 formats including docx, xlsx, pptx, odt, epub, rtf, pdf, csv, html and json; it does not run OCR and does not send documents to an external AI model.

It has one endpoint, `Convert a document to Markdown`. Its `filename` picks the format by extension and `contentBase64` carries the file, up to 3 MiB. Errors are specific — `UNSUPPORTED_FORMAT`, `EMPTY_DOCUMENT`, `OCR_REQUIRED` for scanned PDFs, `CORRUPT_FILE` — so a pipeline can tell a bad file from a bad request. Capacity is shared across buyers: 30 requests per minute and 10,000 per day.

Document to Markdown is a good fit when you need to feed office files and PDFs into search indexing, a RAG or language-model pipeline, or a content workflow that expects plain Markdown — without running your own document converters.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/chensichengmalu/service/convert-document-to-markdown
