Tools

EPUB to Markdown API

Submit any EPUB file. Get back the full text, metadata, author, and title as a readable Markdown document.

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 EPUBs into Markdown

Upload an EPUB file or submit a URL, get Markdown back.

# Design Patterns: Elements of Reusable Software

**Kind:** document
**Created:** 2026-07-20T10:00:00.000Z
**MIME Type:** application/epub+zip
**Size:** 1248000 bytes
**Chunks:** 86

## Document

**Author:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
**Pages:** 395
**Created:** 1994-10-31T00:00:00.000Z

What is Exabase's EPUB to Markdown API?

Submit an EPUB file to the Exabase Extract API and get a Markdown document back instead of JSON. The same extraction pipeline runs: text extraction, metadata parsing, and thumbnail generation. Pass ?format=markdown when retrieving the result and you get a human-readable Markdown document with the book's content and metadata.

The Markdown output includes the title, author, page count, creation date, and MIME type at the top, followed by the extracted text. The result is ready to feed into an LLM context window, store in a knowledge base, or use as a readable reference.

What you get back

The Markdown response is a single text document. Book metadata appears at the top. The content follows as readable prose. 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 ?format=markdown works across all of them. For EPUBs, you get book metadata and text. For PDFs, you get document metadata and (for recognised types) structured field extraction rendered as Markdown. For audio and video, you get the transcript. For images, you get OCR text.

The submission flow is identical across all types. The Extract docs cover each content type in detail.

What you can build with it

Feed book content directly into your agent's context window as readable Markdown. Build a learning copilot that references textbook content. Power a digital library where ebook text is stored and indexed as Markdown for search and retrieval.

Store extracted EPUBs as Resources in a Base and the content becomes searchable through Deep Search. Workers can process new uploads as they arrive.

Beyond Markdown

The Extract API also returns JSON (the default) with structured chunks and page numbers for programmatic processing. Use Markdown for LLM context and human review, JSON for search indexing and structured retrieval. The EPUB 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 an EPUB file

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("./design-patterns.epub"),
  name: "Design Patterns: Elements of Reusable Software",
});

console.log(job.id);
console.log(job.state);
  1. Get Markdown back

Poll the job until state reaches completed, or skip polling entirely with webhooks.

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

One API call. No Calibre, no epub.js, no Markdown conversion.

Example output

# Design Patterns: Elements of Reusable Software

**Kind:** document
**Created:** 2026-07-20T10:00:00.000Z
**MIME Type:** application/epub+zip
**Size:** 1248000 bytes
**Chunks:** 86

## Document

**Author:** Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides
**Pages:** 395
**Created:** 1994-10-31T00:00:00.000Z

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. For webhooks, set webhookFormat: "markdown".

Can I still get JSON?

Yes. JSON is the default. For programmatic processing, Resume to JSON returns typed fields.

What EPUB versions are supported?

Both EPUB 2 and EPUB 3

Does it handle DRM-protected EPUBs?

No. The file must be unprotected.

Do I have to poll for results?

No. Configure a webhook with webhookFormat: "markdown".

How long are files retained?

1 day from job creation, then permanently deleted.

Is there an SDK?

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

What other document types does Extract recognise?

Invoices and contracts can also get extracted into Markdown. See the Invoice to JSON and Contract to JSON tool pages. General PDFs return text chunks and metadata without the structured object. The same endpoint also handles images, audio, video, and web 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.