Tools

DOCX to Markdown API

Submit any Word document. Get back the full text, metadata, and document properties as a readable Markdown document.

Try it below:

FILEDrop a file or click to upload

Production-ready

Private by design

Security-first

Scalable

Production-ready

Private by design

Security-first

Scalable

Production-ready

Private by design

Security-first

Scalable

Turn Word documents into Markdown

Upload a DOCX file or submit a URL, get Markdown back.

# Project Proposal Q3 2026

**Kind:** document
**Created:** 2026-07-15T10:00:00.000Z
**MIME Type:** application/vnd.openxmlformats-officedocument.wordprocessingml.document
**Size:** 89200 bytes
**Chunks:** 22

## Document

**Author:** Engineering Team
**Pages:** 8
**Created:** 2026-07-12T00:00:00.000Z

What is Exabase's DOCX to Markdown API?

Submit a DOCX file to the Exabase Extract API and get a Markdown document back instead of JSON. The same extraction pipeline runs: text extraction, metadata parsing, rendering, and (for recognised document types) structured field extraction. Pass ?format=markdown when retrieving the result and you get a human-readable Markdown document.

The Markdown output includes the document title, author, page count, creation date, and the full text content. For Word documents containing invoices, contracts, or resumes, the structured fields are rendered under their own heading, just as they are for PDFs. No python-docx, no mammoth.js, no LibreOffice.

What you get back

The Markdown response is a single text document. Document metadata appears at the top. The text content follows. For recognised document types, structured fields render under a heading matching the type (## Invoice, ## Contract, ## Resume). You can also configure webhooks with webhookFormat: "markdown".

One multi-modal API

The same POST /v2/extract endpoint handles every content type, and ?format=markdown works across all of them. For DOCX, you get document metadata and text. For PDFs, the same plus structured data for recognised types. For audio and video, you get the transcript. For images, you get OCR text.

The submission flow is identical across all types. The Extract docs cover each content type in detail.

What you can build with it

Feed Word document content directly into your agent's context window as readable Markdown. Build a RAG pipeline where retrieved documents arrive as clean text with metadata. Power a knowledge base where internal reports, proposals, and policies are extracted and stored as searchable Markdown.

Store extracted documents as Resources in a Base and they become searchable through Deep Search. Workers can process new uploads on a schedule.

Beyond Markdown

The Extract API also returns JSON (the default) with structured chunks and page numbers. Use Markdown for LLM context and human review, JSON for search indexing and structured processing. The DOCX to JSON tool page covers the JSON output.

How do I use it?

  1. Get your API key

Free, no credit card:

Sign up at exabase.io and copy your API key from the dashboard.

  1. Submit a Word document

Using the SDK (Node.js):

import { Exabase } from "@exabase/sdk";
import { createReadStream } from "fs";

const api = new Exabase({
  apiKey: process.env.EXABASE_API_KEY,
});

const job = await api.extract.createFromFile({
  file: createReadStream("./project-proposal.docx"),
  name: "Project Proposal — Q3 2026",
});

console.log(job.id);
console.log(job.state);
  1. Get Markdown back

Poll the job until state reaches completed, or skip polling entirely with webhooks.

curl 'https://api.exabase.io/v2/extract/<jobId>?format=markdown' \
  -H 'X-Api-Key: <EXABASE_API_KEY>'

One API call. No python-docx, no mammoth.js, no Markdown conversion.

Example output

# Project Proposal Q3 2026

**Kind:** document
**Created:** 2026-07-15T10:00:00.000Z
**MIME Type:** application/vnd.openxmlformats-officedocument.wordprocessingml.document
**Size:** 89200 bytes
**Chunks:** 22

## Document

**Author:** Engineering Team
**Pages:** 8
**Created:** 2026-07-12T00:00:00.000Z

API quick reference

Endpoint

Method

Description

/v2/extract

POST

Submit extraction job

/v2/extract

GET

List extraction jobs

/v2/extract/{jobId}

GET

Poll for result

/v2/extract/{jobId}/chunks

GET

Fetch text chunks (JSON only)

/v2/extract-settings

PUT

Configure webhook

Auth: X-Api-Key header on all requests.

File retention: Stored files are retained for 1 day from job creation. Download or copy anything you need before they expire.

Need file extraction or full page content?

Exabase offers a full set of tools to extract content from any media, document or website.

All your data extraction needs in one place.

Why Exabase

FAQs

What is Exabase?

Exabase is infrastructure for AI agents. It gives your agents memory, versioned file storage, AI deep search, and context automation through a set of APIs. Store what your agent learns, search inside any content type, and keep knowledge bases current automatically. Built for production use. Give your agent precise context and cut your token spend by up to 81%.

Who uses Exabase?

Developers and teams building AI agents, copilots, and RAG applications. If your agent needs to remember things between sessions, store and retrieve files, search across documents and media, or stay up to date without manual maintenance, Exabase handles that infrastructure so you can focus on your product.

How do I get Markdown instead of JSON?

Add ?format=markdown to the GET /v2/extract/{jobId} request. For webhooks, set webhookFormat: "markdown".

Can I still get JSON?

Yes. JSON is the default. DOCX to JSON covers the JSON output.

Does it handle .doc files?

The API is optimised for .docx. Older .doc files may be supported but .docx is recommended.

Does it detect document types?

Yes. Invoices, contracts, and resumes in DOCX format get structured field extraction.

Do I have to poll for results?

No. Configure a webhook with webhookFormat: "markdown".

How long are files retained?

Stored files are retained for 1 day from job creation, then permanently deleted. Download or copy anything you need before the retention window expires.

Is there an SDK?

Yes. The @exabase/sdk package for Node.js/TypeScript handles file streaming, job polling, and chunk retrieval. Install with npm install @exabase/sdk. Or call the REST API directly from any language.

What other document types does Extract recognise?

Invoices and contracts can also get extracted into Markdown. See the Invoice to JSON and Contract to JSON tool pages. General PDFs return text chunks and metadata without the structured object. The same endpoint also handles images, audio, video, and web pages.

Deciding?

Ask your favourite AI about Exabase:

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.