PDF to text API

Send a PDF as a URL or as a file, get its text back as JSON, page by page. One request, no SDK.

Get a free API key Try it free on your PDF (first 2 pages) Plans from $9 a month Sample answer (JSON)

A free key makes 100 calls a month: leave an e-mail address, open the link, paste the key. Failed calls are never charged.

One request

curl -H "Authorization: Bearer $API_KEY" \
  "https://mcp.glyphcall.com/pdf/text?url=https%3A%2F%2Fbitcoin.org%2Fbitcoin.pdf"

Python

import os, requests

r = requests.get(
    "https://mcp.glyphcall.com/pdf/text",
    params={
    "url": "https://bitcoin.org/bitcoin.pdf",
    },
    headers={"Authorization": f"Bearer {os.environ['API_KEY']}"},
    timeout=60,
)
r.raise_for_status()
print(r.json())

Node.js

const params = new URLSearchParams({
  url: "https://bitcoin.org/bitcoin.pdf",
});
const r = await fetch(`https://mcp.glyphcall.com/pdf/text?${params}`, {
  headers: { Authorization: `Bearer ${process.env.API_KEY}` },
});
if (!r.ok) throw new Error(await r.text());
console.log(await r.json());

Send a file instead of a URL

curl -H "Authorization: Bearer $API_KEY" \
  -F "file=@report.pdf" -F "pages=5" \
  "https://mcp.glyphcall.com/pdf/text"

Or the raw file as the body: --data-binary @report.pdf -H "Content-Type: application/pdf". Up to 10 MB. The file is read in memory for this one request and not stored.

The answer

{
  "url": "https://bitcoin.org/bitcoin.pdf",
  "title": null,
  "author": null,
  "totalPages": 9,
  "firstPage": 1,
  "pagesRead": 1,
  "chars": 46,
  "truncated": true,
  "pages": [
    {
      "page": 1,
      "chars": 46,
      "text": "Bitcoin: A Peer-to-Peer Electronic Cash System"
    }
  ]
}

Try it free on your PDF (first 2 pages)

Up to 10 MB. Read in memory for this one request and not stored.

Or try it on a PDF that is on the web:

A PDF at a URL

Absolute public http(s) URL of the PDF

Uses one of your 3 free calls. Nothing is charged, and a call that fails is not counted.

Pricing

One API key, paid by card through Stripe. $0.002 per successful call with a key; failed calls cost nothing.

$9 a month7,500 PDFs each monthStart plan
$19 a month20,000 PDFs each monthStart plan
$1 once500 PDFsBuy
$5 once2,500 PDFsBuy
$20 once11,000 PDFsBuy
$100 once62,500 PDFsBuy

A plan adds its credits each month when the payment succeeds; unused credits stay, and you can cancel at any time. Packs never expire. After paying you get your key on the next page. The same key works on every tool in the catalog. Details: credits and plans.

Inputs

NameTypeDescription
url (required)stringAbsolute public http(s) URL of the PDF
firstPageintegerFirst page to read (default 1)
pagesintegerHow many pages to read (1-200, default 20)
maxCharsintegerMaximum characters of text returned across all pages (1000-200000, default 50000)

What it does not do

Also on the same key

Questions

Does it OCR scanned PDFs?

No. It extracts the text layer. A scanned file without one fails and is not charged.

How large can the PDF be?

Up to 10 MB, and up to 200 pages in one call. Ask for a first page and a page count to read a long report in parts.

Can I send a file instead of a URL?

Yes. POST the file as application/pdf, as a multipart form field named file, or as base64 in JSON, up to 10 MB. firstPage, pages and maxChars go in the query string or as form fields.

What happens to a file I upload?

It is read in memory to answer that one request and then dropped. It is not written to any store or cache and is never fetched again.

What happens when the site blocks the download?

The Internet Archive's dated copy is read when there is one, and the answer says so. If nothing can be read, the call is not charged.

Is there a subscription?

There is a monthly plan and there are one-off credit packs. Both give one API key; a plan adds credits each month and unused credits stay.

Guides

For AI agents

The same tool is on the MCP server https://mcp.glyphcall.com/mcp (the first 25 successful calls are free), and an agent with a wallet can pay per call in USDC: the tool URL answers 402 Payment Required with x402 and MPP terms. Reference: tool page · OpenAPI · docs for agents.