PDF to Markdown & Text Extractor — Fast AI & RAG avatar

PDF to Markdown & Text Extractor — Fast AI & RAG

Pricing

from $0.60 / 1,000 pdf document extracteds

Go to Apify Store
PDF to Markdown & Text Extractor — Fast AI & RAG

PDF to Markdown & Text Extractor — Fast AI & RAG

Batch-convert digital PDF URLs into clean Markdown, plain text, per-page output, and structured metadata for AI, LLMs, and RAG pipelines. Priced from $1.00 down to $0.50 per 1,000 PDFs — broken links and image-only scans are skipped automatically at $0.

Pricing

from $0.60 / 1,000 pdf document extracteds

Rating

0.0

(0)

Developer

Alias Data Studio

Alias Data Studio

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

9 minutes ago

Last modified

Features

Limited permissions

Share

Turn batches of digital PDF URLs into clean Markdown, plain text, per-page chunks, and structured document metadata in seconds — purpose-built for AI agents, LLM ingestion, RAG knowledge bases, and document search indexing. Export directly as JSON, CSV, Excel, XML, or RSS.

Why Choose PDF to Markdown & Text Extractor?

  • Built for AI & RAG speed at a fraction of the cost — batch-extracts digital PDFs (research papers, whitepapers, SEC filings, technical docs, manuals, contracts, and policy reports) at $1.00 down to $0.50 per 1,000 extracted PDFs, up to 5–10x cheaper than heavy OCR-first parsers.
  • Clean, chunk-ready Markdown & per-page output — automatically detects headings, reflows hard-wrapped paragraphs, repairs hyphenated line breaks, normalizes bullet/numbered lists, and optionally emits a structured pages array (pageNumber, text, markdown, characterCount) with exact startPage / endPage slicing.
  • Rich document metadata out of the box — captures title, author, subject, UTC createdAtIso, fileName, fileSizeBytes, pageCount, extractedPageCount, wordCount, and characterCount for every document.
  • Zero charge for broken links or image-only scans — 404 errors, HTML pages, password-protected files, corrupted documents, oversized files, and scanned image-only PDFs (no_text_layer) are detected and skipped automatically at $0 cost while valid PDFs in the same batch finish without interruption.
  • Automatic batch hygiene & RUN_SUMMARY — deduplicates URLs, enforces per-file size (up to 50 MB) and timeout caps, redacts query secrets, and saves a concise RUN_SUMMARY report in Key-Value Storage.

Ideal Use Cases

  • RAG & AI knowledge bases — convert ArXiv papers, product manuals, API specifications, and industry whitepapers into clean Markdown ready for chunking and vector embeddings.
  • Financial, legal & regulatory pipelines — batch-extract text, page ranges, and metadata from public filings, standards specifications, and compliance bulletins at ultra-low cost.
  • Enterprise search indexing — load normalized titles, authors, timestamps, and full text into Elasticsearch, OpenSearch, PostgreSQL, Qdrant, or Pinecone.
  • AI Agent tooling (MCP & n8n) — connect directly to Claude, Cursor, or n8n workflows to read and summarize linked PDFs on demand.

Pricing

Pay only for successfully extracted PDFs saved to your dataset — failed URLs and image-only scanned PDFs always cost $0:

Apify PlanPrice per 1,000 PDFsPrice per PDF
Free$1.00$0.00100
Starter (Bronze)$0.85$0.00085
Scale (Silver)$0.70$0.00070
Business (Gold)$0.60$0.00060
Enterprise (Platinum / Diamond)$0.50$0.00050

Input Example

{
"pdfUrls": [
"https://arxiv.org/pdf/1706.03762",
"https://arxiv.org/pdf/2005.11401"
],
"outputFormat": "both",
"startPage": 1,
"endPage": 5,
"shouldIncludePages": true
}

Input Parameters

FieldTypeDefaultDescription
pdfUrlsstring[](required)Direct public HTTP or HTTPS URLs pointing to digital PDF files. Duplicate URLs are automatically deduplicated.
outputFormat"both" | "markdown" | "text""both"Choose clean Markdown, plain text, or both. Selecting "markdown" keeps dataset rows compact for RAG pipelines.
shouldIncludePagesbooleanfalseWhen true, adds a pages array with per-page pageNumber, text, markdown, and characterCount.
startPageinteger | null1Optional 1-based inclusive starting page number.
endPageinteger | null(last page)Optional 1-based inclusive ending page number.
maxFileSizeMegabytesinteger50Maximum allowed file size per PDF (1–50 MB). Larger files are skipped safely at $0.
requestTimeoutSecondsinteger30Maximum download timeout per PDF (5–120 seconds).

Output Example

Each successfully extracted PDF produces one structured item in your default dataset:

{
"sourceUrl": "https://arxiv.org/pdf/1706.03762",
"fileName": "1706.03762v7.pdf",
"fileSizeBytes": 2215244,
"pageCount": 15,
"extractedPageCount": 5,
"wordCount": 2418,
"characterCount": 15482,
"title": "Attention Is All You Need",
"author": "Ashish Vaswani et al.",
"subject": "Computation and Language",
"createdAtIso": "2024-04-10T21:11:43Z",
"fullText": "Attention Is All You Need...",
"markdown": "## Attention Is All You Need\n\n#### Abstract\n\nThe dominant sequence transduction models...",
"pages": [
{
"pageNumber": 1,
"text": "Attention Is All You Need...",
"markdown": "## Attention Is All You Need...",
"characterCount": 3120
}
]
}

Quick Integration: Python, Node.js, MCP & n8n

Python (apify-client)

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("alias_md5/pdf-markdown-extractor").call(run_input={
"pdfUrls": ["https://arxiv.org/pdf/1706.03762"],
"outputFormat": "markdown",
"shouldIncludePages": True,
})
for doc in client.dataset(run["defaultDatasetId"]).iterate_items():
print(doc["title"], doc["wordCount"], len(doc.get("pages", [])))

Node.js (apify-client)

import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor("alias_md5/pdf-markdown-extractor").call({
pdfUrls: [
"https://arxiv.org/pdf/1706.03762",
"https://arxiv.org/pdf/2005.11401",
],
outputFormat: "markdown",
shouldIncludePages: true,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.map((d) => ({ title: d.title, words: d.wordCount })));

AI Agents (Apify MCP Server)

Give Claude Desktop, Cursor, or any MCP-compatible AI agent direct PDF-to-Markdown reading capabilities:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com/?actors=alias_md5/pdf-markdown-extractor",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
}

n8n Workflow (Automated RAG Ingestion)

  1. Trigger on new PDF URLs from RSS, Google Drive, Slack, or a webhook.
  2. Add the official Apify node (@apify/n8n-nodes-apify) → Run Actor with alias_md5/pdf-markdown-extractor (outputFormat: "markdown", shouldIncludePages: true).
  3. Chain Get Dataset Items directly into your vector store node (Pinecone, Qdrant, Supabase, or PostgreSQL pgvector) or an LLM summarization step.

Batch Summary (RUN_SUMMARY)

At the end of every run, a compact JSON report is saved to Key-Value Storage under the key RUN_SUMMARY:

{
"requestedUrlCount": 8,
"uniqueUrlCount": 8,
"succeededCount": 6,
"failedCount": 2,
"skippedDueToBudgetCount": 0,
"chargedEventCount": 6,
"totalExtractedPageCount": 140,
"totalWordCount": 59962,
"elapsedMilliseconds": 2377,
"failedTargets": [
{
"sourceUrl": "https://arxiv.org/pdf/9999.99999-nonexistent-audit-test.pdf",
"failureCode": "http_error",
"reason": "HTTP request returned status 404."
},
{
"sourceUrl": "https://www.w3.org/",
"failureCode": "non_pdf_content",
"reason": "Downloaded content is not a valid PDF document (missing %PDF- header)."
}
]
}

Supported Documents & FAQ

  • Which PDFs work best? Digital PDFs with an embedded text layer — including academic papers (ArXiv), financial filings, whitepapers, technical manuals, contracts, invoices, and policy reports.
  • What happens if my batch contains scanned image-only PDFs? Because this Actor prioritizes ultra-fast native text extraction without running heavy visual OCR, any image-only PDF without a text layer is automatically detected, skipped cleanly with reason no_text_layer in RUN_SUMMARY, and billed $0. You can easily route only those flagged no_text_layer URLs to a dedicated visual OCR step while saving 80–90% on all digital PDFs.
  • Can I extract only the first few pages of long documents? Yes — set startPage and endPage (1-based inclusive) to extract specific page windows such as abstracts, executive summaries, or tables of contents.