PDF to Text API

POST

Pull the text out of any PDF, with page and word counts.

PDF to Text extracts the text layer of a PDF, uploaded or fetched from a URL, and returns it as plain text with the page, word and character counts. Paid plans add the text of each page separately and the document metadata, such as title, author and creation date.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/pdftotext
pdf
Click or drag a file to upload.pdf · max 400KB for live testing
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "text": "Table Of Content\nChapter 1 .......................................................... 2\nParagraph 1.1 ...................................................... 3\npage 1 / 3\n\nChapter 1\npage 2 / 3\n\nParagraph 1.1\nPowered by TCPDF (www.tcpdf.org)\npage 3 / 3",
    "pageCount": 3,
    "pagesExtracted": 3,
    "truncated": false,
    "hasText": true,
    "wordCount": 31,
    "characterCount": 250,
    "pages": [
      {
        "page": 1,
        "text": "Table Of Content\nChapter 1 .......................................................... 2\nParagraph 1.1 ...................................................... 3\npage 1 / 3",
        "wordCount": 15
      },
      {
        "page": 2,
        "text": "Chapter 1\npage 2 / 3",
        "wordCount": 6
      },
      {
        "page": 3,
        "text": "Paragraph 1.1\nPowered by TCPDF (www.tcpdf.org)\npage 3 / 3",
        "wordCount": 10
      }
    ],
    "metadata": {
      "title": "Basic API Test",
      "author": "Brendan Dahl",
      "subject": null,
      "creator": "pdf.js",
      "producer": "TCPDF 5.9.133 (http://www.tcpdf.org)",
      "creationDate": "2012-04-10T21:30:26.000Z",
      "modificationDate": "2012-04-10T21:30:26.000Z",
      "pdfVersion": "1.7"
    }
  }
}

About the PDF to Text API

Text is read with Mozilla's pdf.js, in reading order with line breaks kept. Up to 100 pages are read per call; longer documents report their full page count with truncated set to true. Scanned PDFs have no text layer and return hasText false, as no OCR is performed.

What people use it for

Search Indexing
Index the text of uploaded PDFs so users can search inside documents, not just their titles.
AI and RAG Pipelines
Feed PDF text, page by page, into embeddings or a language model for question answering over documents.
Document Intake
Read invoices, statements and forms as text for downstream parsing and validation.
Content Moderation
Check the text of uploaded PDFs against your policies before they are published.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use PDF to Text

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the PDF to Text API.

Read the docs →
How many PDFs does the Starter plan cover?
Starter covers 20,000 PDF extractions each month. At 10 credits per request, that works out to $1.50 per 1,000 PDFs, or about $0.0015 per PDF. The Free plan includes 20 extractions per month for testing.
What does the Free plan return?
The Free plan returns the full extracted text, the page count, the pages read, the truncated and hasText flags and the word and character counts. Paid plans add pages, the text and word count of each page, and metadata such as the title, author, producer and creation date.
How large a PDF can I send?
Up to 10 MB per PDF, uploaded or by URL, with 400 KB uploads on the Free plan. The first 100 pages are read; for longer documents pageCount gives the full length and truncated is true.
Does it work on scanned PDFs?
No OCR is performed. A scanned PDF has no text layer, so it returns hasText false and empty text. Use the Image to Text API on the page images for scanned documents.
How is the text extracted?
With Mozilla's pdf.js, the engine behind Firefox's PDF viewer, which reads the text in content order and keeps line breaks. Pages are separated by a blank line in text.

Ready to build with PDF to Text? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs