Tools

EPUB to JSON API

Submit any EPUB file. Get back text content as searchable chunks, metadata, author, title, and cover thumbnail as structured JSON.

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 structured JSON

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

{
  "kind": "document",
  "name": "Sarah Chen — CV",
  "state": "completed",
  "extraction": {
    "common": {
      "mimeType": "application/pdf",
      "size": 156672,
      "thumbnail": "https://cdn.exabase.io/...",
      "chunkCount": 14
    },
    "document": {
      "pages": 2,
      "author": "Sarah Chen",
      "title": "Sarah Chen — CV",
      "creationDate": "2025-04-12T00:00:00.000Z",
      "pdfRender": { "url": "https://cdn.exabase.io/..." },
      "documentType": "resume",
      "structured": {
        "name": "Sarah Chen",
        "email": "sarah.chen@example.com",
        "phone": "+1 (415) 555-0182",
        "summary": "Full-stack engineer with 6 years of experience building data pipelines and developer tools. Previously at Stripe and Vercel.",
        "experience": [
          {
            "company": "Vercel",
            "title": "Senior Software Engineer",
            "startDate": "2022-03",
            "endDate": "2025-04",
            "description": "Led development of the edge middleware runtime. Reduced cold start latency by 40%."
          },
          {
            "company": "Stripe",
            "title": "Software Engineer",
            "startDate": "2019-06",
            "endDate": "2022-02",
            "description": "Built internal tools for payment reconciliation. Processed $2B+ in daily transaction volume."
          }
        ],
        "education": [
          {
            "institution": "UC Berkeley",
            "degree": "B.S. Computer Science",
            "graduationDate": "2019"
          }
        ],
        "skills": ["TypeScript", "Python", "PostgreSQL", "AWS", "Kubernetes", "React", "Node.js"]
      }
    }
  }
}

What is Exabase's EPUB to JSON API?

Submit an EPUB file to the Exabase Extract API and get structured JSON back. The response includes the book title, author, page count, creation date, MIME type, file size, a CDN-hosted cover thumbnail, and the full text content split into searchable chunks. The API handles EPUB parsing, text extraction, and chunking. No Calibre, no epub.js, no ebook processing pipeline on your end.

This is the same POST /v2/extract endpoint used for all content types. Submit the EPUB, poll for completion (or use a webhook), then read the extraction data or fetch chunks. The Submitting Jobs guide walks through the full flow.

What you get back

The response includes the book metadata (title, author, page count, creation date) and the full text split into searchable chunks. Each chunk has a sequence number, the extracted text, and a page number. You also get a CDN-hosted thumbnail (typically the cover image), MIME type, file size, and total chunk count. The API reference has the complete response schema.

One multi-modal API

The same POST /v2/extract endpoint handles every content type Exabase supports. For EPUBs and other documents, it returns text chunks with page numbers and document metadata. For PDFs, it also supports structured field extraction for recognised document types (invoices, contracts, resumes). For audio and video, it generates full transcripts with timestamps. For images, it runs OCR. For web pages, it renders JavaScript and extracts the 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

The structured chunks are the same format used across the Exabase platform. Feed them into a RAG pipeline so your agent can reference and cite specific passages from a book. Build a searchable ebook library where readers find the right paragraph across thousands of titles. Index a catalogue of digital publications and make them searchable at the sentence level.

Store extracted EPUBs as Resources in a Base and the content becomes searchable through Deep Search at the paragraph level. Workers can process new uploads on a schedule, keeping your library indexed without manual work.

Beyond extraction

The Extract API returns more than text chunks. You get book metadata, a CDN-hosted cover thumbnail, and a rendered version. Store the output as a Resource and it's searchable through Deep Search immediately. Extract key details into Memory so your agent retains what it read between sessions. The Submitting Jobs guide at https://exabase.io/docs/developer-guide/extraction/submitting-jobs walks through the full flow.

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

console.log(job.id);    // extraction job id
console.log(job.state); // "pending"
  1. Get the result

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

const result = await api.extract.get({ jobId: job.id });

if (result.state === "completed") {
  console.log(result.extraction?.document?.title);
  console.log(result.extraction?.document?.author);
  console.log(result.extraction?.document?.pages);
  console.log(result.extraction?.common?.chunkCount);
  console.log(result.extraction?.common?.thumbnail);
}

One API call. No Calibre, no epub.js, no ebook parser.

What you get back

Field

Type

Description

state

string

completed or failed

kind

string

document

[...].mimeType

string

application/epub+zip

[...].size

number

File size in bytes

[...].thumbnail

string

CDN-hosted thumbnail URL

[...].chunkCount

number

Number of text chunks

[...].pages

number

Page count

[...].author

string

Book author

[...].title

string

Book title

[...].creationDate

string

Publication or creation date

[...].pdfRender.url

string

CDN-hosted rendered PDF URL

Text chunks are retrieved separately via GET /v2/extract/{jobId}/chunks.

Each chunk includes a sequence number, the extracted text, and a page number.

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

/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.

What EPUB versions are supported?

Both EPUB 2 and EPUB 3. The API handles the structural differences between versions automatically.

Does it extract embedded images from the EPUB?

The API extracts text content and generates a cover thumbnail. Embedded images within the content are not extracted as separate files.

Can I submit a URL instead of uploading a file?

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

Do I have to poll for results?

No. You can configure a webhook URL and Exabase will POST the full result to your server when processing completes. The webhooks guide covers setup.

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.

Does it handle DRM-protected EPUBs?

No. DRM-protected EPUBs cannot be processed. The file must be unprotected.

Can I use the extracted content with other Exabase features?

Yes. Store extracted EPUBs as a Resource in a Base and the content becomes searchable through Deep Search. Extract key details into Memory so your agent retains what it read. Workers can process new uploads on a schedule.

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 file types does Extract support?

PDFs, DOCX, PPTX, images (with OCR), audio (with transcription), video (with transcription), and web pages. The same POST /v2/extract endpoint handles all of them.

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.