# PDF, Word & Excel to Markdown Converter - DOCX, XLSX, PPTX (`bigdavidson/document-to-markdown`) Actor

Unofficial. Convert public PDF, Word, Excel and PowerPoint files to Markdown from their URLs. Keeps headings and real tables for DOCX, XLSX and PPTX. Text only, no OCR. One bad file never stops the run. Plain requests, robots.txt respected, no login.

- **URL**: https://apify.com/bigdavidson/document-to-markdown.md
- **Developed by:** [Jack Sheward](https://apify.com/bigdavidson) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.10 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## PDF, Word & Excel to Markdown Converter - DOCX, XLSX, PPTX

Give it links to public PDF, DOCX, XLSX or PPTX files and get one clean row per document: the text as Markdown, plus title, page or sheet count, table count, size and any warnings. Word, Excel and PowerPoint tables come out as real Markdown tables, headings are kept, and PDF pages can be marked. Text only: there is no OCR, so scanned documents come back empty with a warning. The Markdown is the document's own text: nothing in it is removed or replaced.

Use it to feed documents into a search index or an AI pipeline, turn spreadsheets into readable tables, or archive reports as plain text.

- **$3.00 per 1,000 documents.** Pay only for rows delivered. No subscription.
- **Nothing to set up.** No account, no API key, no proxies.
- **One bad file never stops the run.** Each document is converted on its own, with size and time limits, and a link that fails is skipped and not charged.
- **Clean, consistent fields**, ready for CSV, Excel, JSON or a database.
- **Runs on a schedule** and connects to the Apify API, Make, Zapier, n8n and AI agents.

### Who uses it

- Teams building search or AI pipelines over public reports, filings and spreadsheets.
- Analysts who want an Excel workbook as readable tables rather than a binary file.
- Archivists and researchers who need the text of many documents in one format.

### What you get

One row per document, however many pages it has (this is the real row for the W3C sample PDF, run without page markers):

```json
{
  "url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
  "fileType": "pdf",
  "title": null,
  "pageCount": 1,
  "sheetCount": null,
  "tableCount": 0,
  "charCount": 14,
  "sizeBytes": 13264,
  "contentSha256": "3df79d34abbca99308e79cb94461c1893582604d68329a41fd4bec1885e6adb4",
  "markdown": "Dummy PDF file",
  "warnings": []
}
```

- `fileType` is found from the file itself, not from the link: `pdf`, `docx`, `xlsx` or `pptx`.
- `title` is the document's title property, or for Word and PowerPoint the first heading or slide title. It is empty when there is none. Author and other person-related properties are never read.
- `pageCount` is the PDF page count, the PowerPoint slide count, or for Word the page count the saving program stored in the file (it can be missing or out of date). `sheetCount` is the number of sheets in an Excel workbook. The other field is empty.
- `tableCount` counts Markdown tables: Word and PowerPoint tables, and one per non-empty Excel sheet. It is always 0 for PDF.
- `charCount` is the length of `markdown`; `sizeBytes` and `contentSha256` describe the downloaded file, so you can detect a changed document between runs.
- `warnings` reports what the converter knows it left out or cut: pages, slides or rows beyond a limit, hidden, empty or chart sheets, a scanned PDF without text, a damaged sheet or slide, a conversion that ran out of time, and Markdown cut for size. Content types that are never read (see Limits) are not listed document by document.

What the Markdown looks like:

- **Word:** Title and Heading styles become `#` headings, list styles become `-` or `1.` items, tables become Markdown tables. The text reads as it would with tracked changes accepted: inserted text is included, deleted text is not. Link text, field results and content controls are included. Inside a table cell, `|` is written `\|`, a backslash is doubled and a line break becomes `<br>`.
- **Excel:** every visible sheet becomes `## Sheet name` and a table. The first non-empty row is used as the header row; if it is a title line and not column names, that is how it appears. Values are the stored results of formulas, not the formulas.
- **PowerPoint:** every slide becomes a `##` heading (its title, or "Slide N"), followed by its text and tables, including text inside grouped shapes. A line break inside a paragraph becomes a space.
- **PDF:** the text of each page, in reading order as the PDF stores it. With page markers on, `<!-- page 3 -->` precedes each page.

### Input

| Field | What it does |
|---|---|
| Document URLs | Direct links to public PDF, DOCX, XLSX or PPTX files, one per line, up to 1,000 per run. Duplicates are removed. |
| Page markers | Put `<!-- page N -->` before each PDF page and `<!-- slide N -->` before each slide. Not available for Word files. |
| Maximum pages per document | Convert at most this many PDF pages or PowerPoint slides (1 to 2000, default 200). A warning says how many were left out. |
| Maximum rows per sheet | Convert at most this many non-empty rows of each Excel sheet (1 to 100,000, default 5000). A warning says when rows were left out. |
| Maximum results | Stop after this many documents. Default 100. |

A link that cannot be converted gets no row and costs nothing, and the run carries on with the next link. The reason is written to the run log: not a supported file, larger than 25 MB, password protected, damaged, disallowed by the site's robots.txt, refused by the site, or not a public web address. If no link at all can be converted, the run fails with the reasons.

Size and time limits, per document:

- A file larger than 25 MB is not downloaded beyond that point.
- A Word or PowerPoint file that unpacks to more than 150 MB, or any Office file with a single internal part over 30 MB, is skipped.
- Each document is converted in its own process. After about 60 seconds the converter stops reading and delivers what it has, with a warning. A conversion still running after 120 seconds is stopped and the link is skipped.
- Markdown longer than 3,000,000 characters is cut, with a warning. Text in non-Latin scripts can be cut earlier, because a result row has a size limit.

### How to run it

1. Open the **Input** tab. The prefilled example (a PDF, a Word file and an Excel file from public sites) works as it is; replace the links with yours.
2. Press **Start**. Rows appear in the **Output** tab as documents are converted.
3. Download the results as JSON, CSV, Excel, XML or HTML, or read them through the Apify API.

### How much does it cost?

**$3.00 per 1,000 documents** ($0.003 per document), plus Apify's standard start charge of $0.00005 per run. There is no subscription and no rental fee.

| Results | Cost |
|---|---|
| 100 | $0.30 |
| 1,000 | $3.00 |
| 10,000 | $30.00 |

You pay only for rows delivered (the `document` charge). Platform usage is included in that price, and a run stops at the spending limit you set. The Pricing tab always shows the current price.

### FAQ

**Do I need an account, an API key or a proxy?** No. The Actor downloads the public links you give it and needs nothing else.

**Can I run it on a schedule?** Yes. Use Apify Schedules, and compare `contentSha256` between runs to see which documents changed.

**What happens to a link that cannot be converted?** It gets no row and costs nothing. The reason (not a supported file, larger than 25 MB, password protected, damaged, blocked by the site's robots.txt, the server refused it) is written to the run log. If no link at all can be converted, the run fails with the reasons.

**Why did my run stop early?** One bad link does not stop a run. If a site refuses a request with a login wall, a CAPTCHA or HTTP 401 or 403, the Actor does not force its way in: that link and any later links on the same site are skipped, and the other links are still converted. A run ends early only at Maximum results or at the spending limit you set, and it fails only when no link at all could be converted.

**Something looks wrong or a field is missing?** Open the **Issues** tab on this page and include the input you used.

### Limits

- **No OCR.** Scanned or image-only PDFs, and text inside pictures, are not read. A PDF with no text layer returns an empty result with a warning.
- **PDF is text only.** Headings, tables, lists and columns are not detected: the text comes out as the PDF stores it, and multi-column or table layouts can come out in a different order than on the page.
- Word: text in headers, footers, footnotes, endnotes, comments and text boxes, images, and formatting such as bold or italics are not included. A merged table cell shows its text once, in its first position. A table inside a table cell is flattened into lines of text in that cell. Old binary `.doc`, `.xls` and `.ppt` files and HTML pages are not supported.
- Excel: number formats are not applied (a percentage appears as 0.15, a date as 2026-01-31, a date with a time as 2026-01-31 13:45:00), formulas without a stored result come out empty, and blank rows are dropped. A merged cell shows its value in its top-left position only. Hidden sheets are left out and counted in a warning without their names. Chart sheets, charts and images are not included.
- PowerPoint: speaker notes, charts, diagrams (SmartArt) and images are not included.
- Only direct file links on public web addresses work, on the standard web ports. Links to private, local or internal addresses, and links that carry a user name or password, are refused. Links that need a login, a cookie, a form or a script are not followed. Password-protected files are skipped.
- Uses ordinary web requests, one per second per site, and identifies itself honestly. It keeps no cookies. It obeys the site's robots.txt, also on the site a redirect leads to, and a link that robots.txt disallows is skipped.
- It does not log in, solve CAPTCHAs or work around blocks. If a site refuses a request (a login wall, a CAPTCHA, HTTP 401 or 403), that link and every later link on the same site are skipped for the rest of the run. Links on other sites are still converted.
- **The document text is delivered exactly as converted. Nothing in `markdown` is removed or replaced**, so email addresses, phone numbers and names that appear in your documents stay in it. The other text fields (`title`, `warnings`) go through a scrubber that replaces email addresses with `[email removed]` and, in long text only, phone numbers with `[phone removed]`. A title can still contain a person's name. Use documents you have the right to process.
- Unofficial. Not affiliated with, endorsed by or sponsored by any of the sites or software vendors whose file formats it reads. Check the terms of the sites you take documents from before using the content commercially.

# Actor input Schema

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

Direct links to public PDF, DOCX, XLSX or PPTX files, one per line, up to 1,000 per run. The file type is detected from the file itself, not from the link. Links to private or internal addresses are refused.

## `includePageMarkers` (type: `boolean`):

Insert an HTML comment such as  before each PDF page and  before each PowerPoint slide. Word files have no fixed pages, so nothing is inserted there.

## `maxPagesPerDocument` (type: `integer`):

Convert at most this many PDF pages or PowerPoint slides per document. A warning in the row says when pages were left out.

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

Convert at most this many rows of each Excel sheet. A warning in the row says when rows were left out.

## `maxResults` (type: `integer`):

Stop after this many documents.

## Actor input object example

```json
{
  "urls": [
    "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    "https://calibre-ebook.com/downloads/demos/demo.docx",
    "https://www.census.gov/construction/nrc/xls/newresconst.xlsx"
  ],
  "includePageMarkers": false,
  "maxPagesPerDocument": 200,
  "maxRowsPerSheet": 5000,
  "maxResults": 100
}
```

# Actor output Schema

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

All result rows from the run's default dataset, as JSON.

# 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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "https://calibre-ebook.com/downloads/demos/demo.docx",
        "https://www.census.gov/construction/nrc/xls/newresconst.xlsx"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bigdavidson/document-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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
        "https://calibre-ebook.com/downloads/demos/demo.docx",
        "https://www.census.gov/construction/nrc/xls/newresconst.xlsx",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("bigdavidson/document-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://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
    "https://calibre-ebook.com/downloads/demos/demo.docx",
    "https://www.census.gov/construction/nrc/xls/newresconst.xlsx"
  ]
}' |
apify call bigdavidson/document-to-markdown --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bigdavidson/document-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/PokTSA2v9iXdRwz8B/builds/2B2ibOz0MpMJdUDMD/openapi.json
