# Word to Markdown — DOCX & ODT to Clean Markdown for LLMs (`actor-forge/word-to-markdown`) Actor

Convert Word (.docx) and OpenDocument (.odt) files from URLs to clean Markdown and plain text: headings, lists, links and tables kept (plus bold/italic and footnotes for .docx), plus title, author, dates and optional RAG chunks. PowerPoint, Excel and EPUB work too. $3 per 1,000 documents.

- **URL**: https://apify.com/actor-forge/word-to-markdown.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (community)
- **Categories:** AI, Developer tools, Integrations
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 document converteds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Word to Markdown — DOCX & ODT to Clean Markdown for LLMs

Convert Word (.docx) and OpenDocument (.odt) files from URLs to clean Markdown and plain text: headings, lists, links and tables kept (plus bold/italic and footnotes for .docx), plus title, author, dates and optional RAG chunks. PowerPoint, Excel and EPUB work too. $3 per 1,000 documents.

**Convert Word documents to clean Markdown in bulk.** Paste links to **.docx or .odt** files (or a web page that links to them) and get **LLM-ready Markdown** and plain text back: **headings, nested lists, links and tables (as GFM tables)** are kept, plus **bold, italic and footnotes** from .docx, while Word's styling noise and empty paragraphs are dropped. Every document also returns its **title, author, created/modified dates and word count**, and you can switch on **RAG chunks** split at headings with their heading path, ready for embedding. **PowerPoint (.pptx, with speaker notes), Excel (.xlsx, every sheet as a table; typed JSON optional), EPUB and CSV** files work in the same run. Use it to feed contracts, policies, reports and manuals to **LLMs, RAG pipelines and AI agents**, migrate Word content into a CMS or docs site, or add a DOCX-to-Markdown step to **Make, n8n and Zapier**. **Simple pricing: $3 per 1,000 documents**, with no compute bill on top. Failed downloads, corrupt files and duplicates are never charged.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| url | format | title | wordCount | markdown | slideCount |
| --- | --- | --- | --- | --- | --- |
| https://calibre-ebook.com/downloads/demos/demo.docx | docx | DOCX Demo | 1588 | # Demonstration of DOCX support in calibre\n\n…\n\n| ITEM | NEEDED |\n| --- | --- |\n| Books | 1 | |  |
| https://example.org/board-deck.pptx | pptx |  |  | ## Slide 1: Q3 Board Update\n\n- Revenue up 12%\n\n**Speaker notes:**\n\nOpen with the headline number… | 24 |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `document-converted` | $0.003 | per document converted and delivered (all sheets, slides, output formats and chunks included) | 1,000 documents = $3.00; a 300-page document is still $0.003 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 1 GB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `urls` | array | yes | — | Links to Word (.docx) or OpenDocument text (.odt) files. You can also add a web page: every document it links to is converted. PowerPoint, Excel, EPUB and CSV files work too. |
| `outputFormats` | array | no | `["markdown"]` | Which content fields to return. Same price whatever you pick. |
| `spreadsheetJson` | boolean | no | `false` | For Excel, OpenDocument and CSV files, also return every sheet as typed JSON rows keyed by column name (numbers, booleans and ISO dates, not just text). |
| `headerRow` | boolean | no | `true` | Use each sheet's first non-empty row as column names. Turn off to name columns A, B, C… |
| `maxRowsPerSheet` | integer | no | `10000` | Read at most this many data rows from each sheet. Longer sheets are marked truncated. |
| `includeHiddenSheets` | boolean | no | `false` | Also convert Excel sheets that are hidden in the workbook. |
| `includeSpeakerNotes` | boolean | no | `true` | Add each PowerPoint slide's speaker notes after its content. |
| `chunkSize` | integer | no | `0` | Also split each document into chunks of at most this many characters for embedding, split at headings, paragraphs and table rows, each with its heading path. 0 = no chunks. Around 1,500–4,000 suits most embedding models. |
| `maxDocuments` | integer | no | `1000` | Stop after converting this many documents (including ones found on web pages). |
| `findDocumentLinks` | boolean | no | `true` | When a URL is a web page rather than a document, convert the documents it links to (one level, robots.txt respected). |

### Limits & honest notes

- Supported: .docx/.docm, .pptx/.pptm, .xlsx/.xlsm, .odt, .ods, .epub, .csv, .tsv, .md and .txt. Legacy binary files (.doc, .xls, .ppt), .odp, RTF and password-protected documents are reported and not charged. PDFs have their own actor: PDF to Markdown.
- Images, charts and SmartArt are skipped (they have no text or URL to keep). Bold and italic survive in Word files; colours, fonts and layout do not.
- Excel formulas return the value saved in the file (the last calculated result); they are not recalculated. Merged cells keep their value in the first cell only.
- CSV values stay as text so postcodes, IDs and phone numbers keep their leading zeros. Excel and OpenDocument cells are typed.
- Files up to 100 MB. Spreadsheets return up to 100,000 rows per sheet (10,000 by default). Very large results move to a linked file, with a preview kept in the row.
- Web pages in the input are scanned for links to documents (one level deep, robots.txt respected). If a site's robots.txt can't be fetched (HTTP 5xx or a network error, after one retry), the documents linked on that site are skipped (RFC 9309) and the page gets a free row saying why. Pages behind a login are not supported.
- Respects your run budget: set a maximum total charge and conversion stops cleanly at the cap, with no document charged twice.

### Related ActorForge actors

- [PDF to Markdown](https://apify.com/actor-forge/pdf-to-markdown) — the same output for PDFs
- [Word, Excel & PowerPoint to Markdown](https://apify.com/actor-forge/office-to-markdown) — Word, Excel and PowerPoint in one actor
- [Excel to JSON](https://apify.com/actor-forge/excel-to-json)

### Changelog

- **2026-10-18** — Initial release: Word, PowerPoint, Excel, OpenDocument text and spreadsheets, EPUB and CSV to Markdown, plain text and typed JSON rows; speaker notes, metadata, RAG chunks, document-link discovery on web pages.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `urls` (type: `array`):

Links to Word (.docx) or OpenDocument text (.odt) files. You can also add a web page: every document it links to is converted. PowerPoint, Excel, EPUB and CSV files work too.

## `outputFormats` (type: `array`):

Which content fields to return. Same price whatever you pick.

## `spreadsheetJson` (type: `boolean`):

For Excel, OpenDocument and CSV files, also return every sheet as typed JSON rows keyed by column name (numbers, booleans and ISO dates, not just text).

## `headerRow` (type: `boolean`):

Use each sheet's first non-empty row as column names. Turn off to name columns A, B, C…

## `maxRowsPerSheet` (type: `integer`):

Read at most this many data rows from each sheet. Longer sheets are marked truncated.

## `includeHiddenSheets` (type: `boolean`):

Also convert Excel sheets that are hidden in the workbook.

## `includeSpeakerNotes` (type: `boolean`):

Add each PowerPoint slide's speaker notes after its content.

## `chunkSize` (type: `integer`):

Also split each document into chunks of at most this many characters for embedding, split at headings, paragraphs and table rows, each with its heading path. 0 = no chunks. Around 1,500–4,000 suits most embedding models.

## `maxDocuments` (type: `integer`):

Stop after converting this many documents (including ones found on web pages).

## `findDocumentLinks` (type: `boolean`):

When a URL is a web page rather than a document, convert the documents it links to (one level, robots.txt respected).

## Actor input object example

```json
{
  "urls": [
    "https://calibre-ebook.com/downloads/demos/demo.docx"
  ],
  "outputFormats": [
    "markdown"
  ],
  "spreadsheetJson": false,
  "headerRow": true,
  "maxRowsPerSheet": 10000,
  "includeHiddenSheets": false,
  "includeSpeakerNotes": true,
  "chunkSize": 0,
  "maxDocuments": 1000,
  "findDocumentLinks": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per document with clean Markdown, optional plain text, sheets as JSON rows, slides and RAG chunks, plus metadata.

## `summary` (type: `string`):

Documents converted by format, URLs that failed or were skipped, and skip reasons (none of them charged).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://calibre-ebook.com/downloads/demos/demo.docx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/word-to-markdown").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://calibre-ebook.com/downloads/demos/demo.docx"] }

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/word-to-markdown").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://calibre-ebook.com/downloads/demos/demo.docx"
  ]
}' |
apify call actor-forge/word-to-markdown --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actor-forge/word-to-markdown"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/liH65zhE2KuNjbZSS/builds/oADpF1BaNfKE2Bdb0/openapi.json
