Tools

PDF to Markdown API

Submit any PDF. Get back clean, structured Markdown with text content, document metadata, and structured data. Digital and scanned.

Try it below:

FILEDrop a file or click to upload

Production-ready

Private by design

Security-first

Scalable

Production-ready

Private by design

Security-first

Scalable

Production-ready

Private by design

Security-first

Scalable

Turn PDFs into Markdown

Upload a PDF or submit a URL, get Markdown back.

# Q2 2026 Report

**Kind:** document
**Created:** 2026-07-01T10:00:00.000Z
**MIME Type:** application/pdf
**Size:** 204800 bytes
**Chunks:** 42

## Document

**Author:** Jane Smith
**Pages:** 18
**Created:** 2026-06-28T00:00:00.000Z

What is Exabase's PDF to Markdown API?

Submit a PDF to the Exabase Extract API and get a Markdown document back instead of JSON. The same extraction pipeline runs: text extraction, metadata parsing, thumbnail generation, and (for recognised document types like invoices, contracts, and resumes) structured field extraction. The difference is the output. Pass ?format=markdown when retrieving the result and you get a human-readable Markdown document instead of a JSON object.

The Markdown output is structured with headings, property lists, and sections that reflect the document's content. Metadata (author, page count, creation date) appears at the top. Structured data for recognised document types is rendered under a heading named after the type. The result is ready to feed directly into an LLM context window, paste into a knowledge base, or use as a readable summary.

What you get back

The Markdown response is a single text document built from the extraction data. It includes the document title, MIME type, file size, page count, author, and creation date. For invoices, the Markdown includes vendor, invoice number, dates, line items, and total under an "Invoice" heading. For contracts: parties, dates, governing law, and clauses. For resumes: name, contact details, experience, education, and skills. The content mirrors what the JSON response contains, rendered as readable Markdown.

You can also configure webhooks with webhookFormat: "markdown" so completed jobs POST the Markdown document directly to your server.

One multi-modal API

The same POST /v2/extract endpoint handles every content type Exabase supports, and the ?format=markdown parameter works across all of them. For PDFs, you get document metadata and text. For audio and video, you get duration and the full transcript. For images, you get dimensions and OCR text. For web pages, you get the page title, site name, and content.

The submission flow is identical across all types: one endpoint, one SDK method, one webhook configuration. You learn the pattern once and use it for everything. The Extract docs cover each content type in detail.

What you can build with it

Markdown is the most token-efficient format for LLM context. Feed the Markdown output directly into your agent's context window without writing a JSON parser. Build a RAG pipeline where retrieved documents arrive as readable text with metadata. Power a document extraction workflow where humans review the output before it enters your system.

Store extracted documents as Resources in a Base and they become searchable through Deep Search at the paragraph level. Workers can re-extract updated documents on a schedule, keeping your knowledge base current without manual work.

Beyond Markdown

The Extract API also returns JSON (the default) with full text chunks, page numbers, and structured fields you can query programmatically. The JSON and Markdown formats are two views of the same extraction. Use Markdown for LLM context and human review, JSON for structured processing and search indexing. The PDF to JSON tool page covers the JSON output.

How do I use it?

  1. Get your API key

Free, no credit card:

Sign up at exabase.io and copy your API key from the dashboard.

  1. Submit a PDF

Using the SDK (Node.js):

import { Exabase } from "@exabase/sdk";
import { createReadStream } from "fs";

const api = new Exabase({
  apiKey: process.env.EXABASE_API_KEY,
});

const job = await api.extract.createFromFile({
  file: createReadStream("./quarterly-report.pdf"),
  name: "Q2 2026 Report",
});

console.log(job.id);    // extraction job id
console.log(job.state); // "pending"
  1. Get Markdown back

Poll the job until state reaches completed, then request the Markdown format.

curl 'https://api.exabase.io/v2/extract/<jobId>?format=markdown' \
  -H 'X-Api-Key: <EXABASE_API_KEY>'

Or configure your webhook with webhookFormat: "markdown" and receive the Markdown document as a POST body when the job completes.

One API call. No PDF parser, no Markdown converter, no post-processing.

Example output

# Invoice #1042

**Kind:** document
**Created:** 2025-06-01T10:00:00.000Z
**MIME Type:** application/pdf
**Size:** 98304 bytes

## Document

**Author:** Acme Corp
**Pages:** 2
**Created:** 2025-05-28T00:00:00.000Z

## Invoice

**Vendor:** Acme Corp
**Invoice number:** 1042
**Issue date:** 2025-05-28
**Due date:** 2025-06-28
**Line items:**
  - **Description:** API integration consulting
    **Quantity:** 12
    **Unit price:** 150
    **Amount:** 1800
  - **Description:** Infrastructure setup
    **Quantity:** 1
    **Unit price:** 2500
    **Amount:** 2500

**Total:** 4620

A general PDF (without a recognised document type) returns metadata and document properties without the structured section.

API quick reference

Endpoint

Method

Description

/v2/extract

POST

Submit extraction job

/v2/extract

GET

List extraction jobs

/v2/extract/{jobId}

GET

Poll for result

/v2/extract/{jobId}/chunks

GET

Fetch text chunks (JSON only)

/v2/extract-settings

PUT

Configure webhook

Auth: X-Api-Key header on all requests.

File retention: Stored files are retained for 1 day from job creation. Download or copy anything you need before they expire.

Need file extraction or full page content?

Exabase offers a full set of tools to extract content from any media, document or website.

All your data extraction needs in one place.

Why Exabase

Use cases

FAQs

What is Exabase?

Exabase is infrastructure for AI agents. It gives your agents memory, versioned file storage, AI deep search, and context automation through a set of APIs. Store what your agent learns, search inside any content type, and keep knowledge bases current automatically. Built for production use. Give your agent precise context and cut your token spend by up to 81%.

Who uses Exabase?

Developers and teams building AI agents, copilots, and RAG applications. If your agent needs to remember things between sessions, store and retrieve files, search across documents and media, or stay up to date without manual maintenance, Exabase handles that infrastructure so you can focus on your product.

How do I get Markdown instead of JSON?

Add ?format=markdown to the GET /v2/extract/{jobId} request. The response body is a Markdown document with Content-Type: text/markdown. For webhooks, set webhookFormat: "markdown" in your extract settings.

What does the Markdown output include?

Document metadata (title, MIME type, size, page count, author, creation date), and for recognised document types (invoices, contracts, resumes), the structured fields rendered under their own heading. The exact content depends on the document.

Can I still get JSON?

Yes. JSON is the default. Omit the format parameter or pass ?format=json. You can request both formats from the same job. Text chunks are always retrieved as JSON via the chunks endpoint.

Does it handle scanned PDFs?

Yes. OCR is built in. Submit a scanned PDF the same way you'd submit a digital one. The Markdown output includes the extracted text.

How is this different from PDF to JSON?

Same extraction pipeline, different output format. PDF to JSON returns a structured JSON object you parse programmatically. PDF to Markdown returns a readable text document you can feed into an LLM, review manually, or store as documentation. Both are available from the same extraction job.

How is this different from PDF to Chunks?

PDF to Chunks returns the text split into individual chunks with page numbers, designed for RAG retrieval and search indexing. PDF to Markdown returns a single readable document with metadata and structured data. Different output shape for different use cases.

Can I submit a URL instead of uploading a file?

Yes. Pass a url field in the request body pointing to a publicly accessible PDF. Exabase fetches and processes it.

Do I have to poll for results?

No. Configure a webhook URL with webhookFormat: "markdown" and Exabase will POST the Markdown document directly to your server when processing completes.

What happens if extraction fails?

The job state moves to failed. You can call the reprocess endpoint to retry without re-uploading the original file.

How long are files retained?

Stored files are retained for 1 day from job creation, then permanently deleted. Download or copy anything you need before the retention window expires.

Is there an SDK?

Yes. The @exabase/sdk package for Node.js/TypeScript handles file streaming and job polling. Install with npm install @exabase/sdk. Or call the REST API directly from any language.

What other content types support Markdown output?

All of them. The ?format=markdown parameter works for images, audio, video, and web pages too. See the Website to Markdown, Audio to Markdown, Video to Markdown, and Image to Markdown tool pages.

Deciding?

Ask your favourite AI about Exabase:

Cut your token spend and give your agent precise context.

Get started in minutes.

Cut your token spend and give your agent precise context.

Get started in minutes.