Document Parsing API for AI

PDF to Markdown API

Turn PDFs into AI-ready Markdown and structured JSON with one HTTP request. Built for RAG pipelines, AI agents, and LLM applications.

Try it

Upload a PDF, then send a live request to POST /v1/parse. The code samples update as you go.

curl -X POST https://api.ragparser.com/v1/parse \
  -H "Authorization: Bearer rp_live_your_api_key" \
  -F "file=@"

Click document.pdf in the request to upload a PDF (max 25 MB).

Built for the modern AI stack

Whether you're building retrieval-augmented generation, autonomous agents, or LLM-powered search — RagParser turns raw PDFs into the structured input your pipeline expects.

RAG Pipelines
Parse PDFs into Markdown, chunk by headings, and embed into Pinecone, Weaviate, or Qdrant for retrieval-augmented generation.
AI Agents
Give your agents the ability to read any PDF. One tool call to RagParser returns structured content your agent can reason over.
LLM Applications
Feed clean Markdown into GPT-4, Claude, Gemini, or any LLM. Markdown preserves structure without wasting tokens on HTML noise.
Knowledge Bases
Ingest thousands of PDFs into your knowledge base with consistent, structured output. Build searchable document repositories at scale.
Vector Databases
Markdown splits cleanly at heading boundaries — ideal for creating semantically meaningful chunks for vector search and similarity retrieval.
Document Ingestion
Automate document processing workflows. Upload PDFs from S3, Google Drive, or user uploads and receive parsed content via webhook or polling.

Why use an API instead of open-source?

Open-source PDF parsers are powerful, but running them in production means managing Python environments, Docker containers, GPU instances, and dependency hell. RagParser eliminates all of that.

Why not Docling?

Docling is an excellent Python library for document conversion. But using it means installing Python, managing virtual environments, downloading model weights, and provisioning servers with enough memory to run inference.

RagParser uses Docling under the hood when a document needs it — but you never touch the infrastructure. One POST request replaces an entire self-hosted pipeline.

RagParser vs. Docling
Why not Marker?

Marker produces high-quality Markdown from PDFs, especially with GPU acceleration. The tradeoff is operational complexity: CUDA dependencies, model downloads, and a Python runtime that doesn't run on edge platforms.

With RagParser, you get comparable output quality via a simple HTTP call. No GPU provisioning. No Docker. Works from any language or runtime.

RagParser vs. Marker

No Python. No Docker. Just an API.

RagParser is a managed document parsing API. You send an HTTP request with a PDF and get Markdown back. It works from any language, framework, or platform that can make an HTTP call.

Next.js
Node.js
Bun
Cloudflare Workers
Vercel
Go
Rust
Python
Ruby
PHP
Java
cURL

Infrastructure, not an app

One endpoint that solves PDF parsing extremely well. No SDKs to install, no configuration files, no infrastructure to manage.

Clean Markdown, instantly
Upload a PDF, get structured Markdown and plain text back in seconds. Ready for chunking and embedding into any vector database.
Structured JSON response
Page count, title, author, and document metadata in a predictable, typed JSON response you can parse without guesswork.
Smart pipeline selection
Automatically picks the best parsing engine — PyMuPDF, pdfplumber, or Docling — for each document's layout and complexity.
Nothing is stored
Uploaded files are parsed in memory and deleted immediately. We keep only lightweight usage metadata. Your documents never touch disk.
Simple Bearer auth
One API key. No SDKs required. Works with curl, fetch, requests, or any HTTP client in any language.
Predictable rate limits
Transparent monthly quotas with clear 4xx error codes you can handle programmatically. No surprise bills.

One request. Structured output.

Send a multipart upload with your API key. Get back clean Markdown, plain text, and document metadata — all in a single JSON response.

Example request

POST a PDF to /v1/parse with a Bearer token. That's the entire integration.

bash
curl -X POST https://api.ragparser.com/v1/parse \
  -H "Authorization: Bearer rp_live_your_api_key" \
  -F "[email protected]"

Example response

The response includes Markdown with preserved headings, tables, lists, and block quotes — plus plain text and structured metadata.

json
{
  "success": true,
  "pages": 42,
  "title": "2024 Annual Report",
  "markdown": "# 2024 Annual Report\n\n## Executive Summary\n\nRevenue grew 34% year-over-year to $60.5M...\n\n## Financial Highlights\n\n| Metric | Q1 | Q2 | Q3 | Q4 |\n| --- | --- | --- | --- | --- |\n| Revenue ($M) | 12.4 | 14.1 | 15.8 | 18.2 |\n| Users (K) | 340 | 410 | 485 | 570 |\n\n## Product Updates\n\n### New Features\n\n- **AI-powered search** — semantic retrieval across all documents\n- **Team workspaces** — shared collections with role-based access\n- **API v2** — structured JSON responses with streaming support\n\n> \"Our document processing pipeline improved 10x.\" — Engineering Lead",
  "text": "2024 Annual Report\n\nExecutive Summary\n\nRevenue grew 34% year-over-year to $60.5M...\n\nFinancial Highlights\n\nMetric Q1 Q2 Q3 Q4\nRevenue ($M) 12.4 14.1 15.8 18.2\nUsers (K) 340 410 485 570...",
  "metadata": {
    "author": "Jane Doe",
    "creator": "Microsoft Word",
    "language": "en",
    "pageCount": 42
  }
}

Explore the full API reference, error codes, and integration guides in the documentation.

What you get back

Every response from the document parsing API includes five structured fields designed for downstream AI workflows.

Markdown
Clean Markdown with headings, lists, tables, bold, italic, and block quotes preserved. Ideal for chunking by heading level and feeding into LLM context windows.
Plain Text
The full document as flat text with formatting stripped. Useful for full-text search indexes, keyword extraction, and simple embedding pipelines.
Structured JSON
The entire response is typed JSON. Parse it with any language's standard library — no XML wrangling, no custom deserializers.
Metadata
Author, creator application, language, and page count extracted from the PDF's internal metadata. Use it for filtering, tagging, or enriching your vector store.
Page Count
Know exactly how many pages were processed. Useful for billing visibility, progress tracking, and splitting large documents into manageable sections.
Document Title
The document title is extracted when available — useful for labeling chunks in your knowledge base or displaying results in your search UI.

Pricing

Start free. Upgrade when your document ingestion pipeline scales to production.

Free
$0/month
For prototypes and side projects.
  • 100 PDFs per month
  • Markdown + JSON output
  • Community support
Get API Key
Pro
Popular
$15/month
For production RAG pipelines.
  • 5,000 PDFs per month
  • Higher rate limits
  • Priority parsing
  • Email support
Get API Key
Business
Custom
For high volume and custom needs.
  • Custom volume
  • Dedicated support
  • SLA
  • Invoicing
Contact Sales
See the full breakdown on the pricing page.

Frequently asked questions

Everything developers ask about our PDF parser API, from integration to output quality.

What is a PDF to Markdown API?

A PDF to Markdown API is a web service that accepts PDF files over HTTP and returns clean Markdown text, preserving headings, lists, tables, and document structure. RagParser does this in a single POST request — upload a PDF and receive structured Markdown ready for chunking, embedding, or feeding into an LLM.

How is RagParser different from Docling?

Docling is an open-source Python library you install and run yourself. It requires Python, dependency management, and infrastructure to host. RagParser is a managed API — one HTTP request, no setup, no servers. You get the same quality output without maintaining parsing infrastructure. Compare details on our Docling alternative page.

How is RagParser different from Marker?

Marker is an open-source tool that requires a local Python environment and GPU for best results. RagParser eliminates that complexity with a cloud API that handles engine selection automatically. No GPU provisioning, no model downloads, no Docker containers. See our full Marker comparison.

Can I use RagParser from Next.js?

Yes. RagParser works with any HTTP client. In Next.js, use the native fetch API in a Server Action or API route to send a multipart form upload to our /v1/parse endpoint. The response is standard JSON — no special SDK needed.

Does RagParser work on Cloudflare Workers?

Yes. Cloudflare Workers support the Fetch API and FormData, which is all you need. RagParser has no native dependencies or SDKs, so it works in any edge runtime including Cloudflare Workers, Vercel Edge Functions, and Deno Deploy.

Why is Markdown the best format for RAG?

Markdown preserves semantic structure — headings, lists, tables, emphasis — while remaining plain text that tokenizers handle efficiently. LLMs understand Markdown natively, and it splits cleanly at heading boundaries for chunking. Compared to raw text (which loses structure) or HTML (which adds noise), Markdown is the optimal middle ground for retrieval-augmented generation.

How accurate is the PDF parser?

RagParser uses a multi-engine pipeline that automatically selects the best parser for each document. Simple text PDFs use fast extractors, while complex layouts with tables and columns use advanced engines. The result is high-accuracy Markdown with correctly formatted tables, headings, and lists.

What output formats does RagParser support?

Every API response includes Markdown, plain text, page count, document title, and a metadata object with author, creator, language, and page count. The entire response is structured JSON, so you can extract exactly the fields you need.

Does RagParser store my documents?

No. Uploaded files are parsed in memory and deleted immediately after processing. RagParser only persists lightweight usage metadata — filename, page count, processing time, and status — for your dashboard analytics.

Is there a free tier?

Yes. The free plan includes 100 PDF parses per month with full Markdown and JSON output. No credit card required. Upgrade to Pro for 5,000 parses per month when you scale to production.

How do I authenticate API requests?

Send your API key as a Bearer token in the Authorization header. Generate and rotate keys from your dashboard. Example: Authorization: Bearer rp_live_your_api_key.

Does RagParser handle tables in PDFs?

Yes. RagParser detects and converts tables into proper Markdown table syntax with aligned columns. This is critical for RAG and LLM use cases where tabular data needs to be preserved and queryable.

What is the maximum file size?

The API accepts PDF files up to 25 MB. Most documents process in a few seconds. For larger volumes, the Pro and Business plans offer higher rate limits and priority processing.

Can I use RagParser with LangChain or LlamaIndex?

Absolutely. RagParser returns standard JSON with a Markdown field that you can pass directly to LangChain's document loaders or LlamaIndex's node parsers. No adapter needed — just fetch the Markdown and feed it into your RAG pipeline.

Does RagParser support OCR for scanned PDFs?

RagParser currently focuses on extracting embedded text and structure from digital PDFs. OCR support for scanned documents is on the roadmap as a dedicated endpoint. For most AI and RAG workflows, digital PDFs are the primary use case.

Start parsing PDFs in minutes

Get your free API key and convert your first PDF to Markdown. No credit card required. Upgrade when you're ready.

100 free parses per month. See pricing for production plans and volume discounts.