PDF & DOCX to Markdown + JSON for RAG & LLMs avatar

PDF & DOCX to Markdown + JSON for RAG & LLMs

Pricing

Pay per event

Go to Apify Store
PDF & DOCX to Markdown + JSON for RAG & LLMs

PDF & DOCX to Markdown + JSON for RAG & LLMs

Convert PDF, DOCX, PPTX and XLSX files from URLs into clean Markdown and structured JSON with pages, sections, metadata and RAG-ready chunks.

Pricing

Pay per event

Rating

0.0

(0)

Developer

BENVENTIONS

BENVENTIONS

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Security

Limited permissions

Share

Document to Markdown & JSON

Give it links to PDF, Word (DOCX), PowerPoint (PPTX) or Excel (XLSX) files. You get back clean Markdown for each document, plus JSON with the title, page-by-page text, a section outline, file metadata and optional chunks sized for embeddings or RAG.

What you get per document

FieldWhat it is
markdownThe whole document as Markdown. PDF headings are worked out from font size and weight, wrapped lines are joined back into paragraphs, and hyphenated line breaks are healed. Word, PowerPoint and Excel keep their headings, lists and tables.
pagesOne entry per PDF page, slide or sheet, each with its own Markdown. Turn off with includePages.
sectionsThe document split at each heading: heading, level and text.
chunksOnly when chunkSize is set. Splits on paragraph boundaries where it can, never goes over chunkSize characters, overlaps by chunkOverlap, and records the heading each chunk sits under.
title, metadataThe document title (from file properties when they look real, otherwise the first heading) and PDF metadata such as author and dates.
pageCount, pagesConverted, billablePagesHow long the file is, how much was converted, and how many pages you're charged for.
scannedPagesSuspected, warningsPDF pages with little or no text (likely scans), truncation notices and anything else worth knowing.

Input

{
"documents": [{ "url": "https://example.com/annual-report.pdf" }],
"chunkSize": 1500,
"chunkOverlap": 200
}
  • maxPagesPerDocument (default 300): only the first N pages, slides or sheets are converted and charged.
  • maxFileSizeMb (default 50): bigger files are skipped and not charged.
  • includePages (default on): adds the per-page array.

Links must be direct downloads. If a link returns a web page or a login screen instead of a file, it's skipped and not charged. The file type is read from the file itself, not the extension.

Example output

A real run on sample.docx, the small test file in this repo's tests/fixtures folder (4 Nov 2026). The sourceUrl is shown as a placeholder.

{
"sourceUrl": "https://example.com/sample.docx",
"fileName": "sample.docx",
"fileType": "docx",
"sizeBytes": 36853,
"title": "Quarterly Report",
"pageCount": null,
"pagesConverted": null,
"billablePages": 1,
"truncated": false,
"wordCount": 20,
"charCount": 175,
"markdown": "# Quarterly Report\n# Summary\n\nRevenue grew strongly this quarter across all regions.\n\n# Details\n\n* First point.\n* Second point.\n\n| Region | Sales |\n| --- | --- |\n| WA | 120 |\n",
"sections": [
{
"heading": "Quarterly Report",
"level": 1,
"text": ""
},
{
"heading": "Summary",
"level": 1,
"text": "Revenue grew strongly this quarter across all regions."
},
{
"heading": "Details",
"level": 1,
"text": "* First point.\n* Second point.\n\n| Region | Sales |\n| --- | --- |\n| WA | 120 |"
}
],
"metadata": {},
"scannedPagesSuspected": [],
"warnings": [],
"convertedAt": "2026-11-04T05:29:12.806845+00:00"
}

What it doesn't do

  • No OCR. Scanned PDFs come back flagged in scannedPagesSuspected with little or no text.
  • PDF tables come out as text, not Markdown tables. Tables in Word, PowerPoint and Excel are kept as tables.
  • Two-column PDF layouts can have their columns run together on some pages.
  • Old .doc, .ppt and .xls files aren't supported. Save them in the newer format first.
  • Password-protected files are skipped.
  • Very large outputs that won't fit in one dataset item are saved to the run's key-value store, and the item tells you the key.

Pricing

Pay per event: US$0.003 per page for the first 50 pages of each document, then US$0.001 per page after that. A 10-page PDF costs US$0.03, and a 300-page PDF costs US$0.40. A PDF page, a slide or a spreadsheet sheet counts as one page. Word files don't have fixed pages, so they're counted as one page per 500 words, rounded up. Files that fail to download or convert aren't charged. If a document needs more page charges than your maximum spend allows, the run stops before converting it.

Limits and good use

  • This Actor only reads files you link to. It doesn't log in, get past paywalls or captchas, or work around blocks.
  • It converts the text of the documents you give it and doesn't look up or add information about anyone. If your files contain names or contact details, they'll appear in the output as they appear in the file.
  • It downloads one file at a time and follows each site's robots.txt rules.
  • Only run it on files you own or are allowed to process. You're responsible for using the results in line with the laws that apply to you and the terms of any site you download from.
  • You're only charged for results the Actor actually delivers. Failed or empty conversions aren't billed.
  • This Actor isn't affiliated with, endorsed by or sponsored by any site, search engine or AI company it mentions.
  • Your files are processed only to produce your output and aren't kept by us after the run. Apify stores run data under your own account's retention settings.
  • Don't upload documents you don't have the right to process. If your files contain personal or sensitive information, you're responsible for handling it lawfully.