PDF to text API, page by page

$0.002 per call with a key ($0.005 paid per call from a wallet) · failed calls are never charged · no account needed: a card key or USDC

PDF to text API: code samples in curl, Python and Node, and monthly plans.

Extract the text of a public PDF (up to 10 MB) from its URL, page by page, with title, author and page count. Choose the first page, how many pages (up to 200) and maxChars. arXiv abstract links work. If a site blocks our fetch, the Internet Archive's dated copy is read and the answer says so. Scanned, encrypted and non-PDF files fail uncharged. Use to read papers, invoices, reports and manuals into an agent.

When to use it

Guide: PDF to text API

Try it free on your PDF (first 2 pages) Buy credits by card (from $1) Example result (JSON)

$0.002 per call with prepaid credits: $1 by card pays for 500 calls, with no account and no subscription.

Try it with your own inputs

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.

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)

Request

Over HTTP, with a card key from /credits:

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

Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.

Example result

{
  "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"
    }
  ]
}

From an AI agent (MCP)

Add the MCP server to Claude, Cursor or any MCP client. This tool is pdf_text, and the first 25 successful calls are free:

https://glyphcall.com/mcp

Questions

Does it OCR scanned PDFs?

No, it extracts the text layer. Scanned images without text return little or nothing.

How do I pay?

Each successful call costs $0.005; failed calls are not charged. A browser can try it free on this page (at most 2 pages a read, 3 tries); through an MCP client the first 25 calls are free. Then pay with card credits (from $1; the key goes in an Authorization header or, for clients that can only fetch a URL, as api_key= in the URL) or per call in USDC over x402 or MPP. No account is needed.

Related tools