* * * PENNYOCR × LANGCHAIN * * *
PennyOCR with LangChain.
LangChain's stock PDF loaders read text layers — scans and photos come back empty. Wrap PennyOCR in a loader and every document becomes markdown Documents with page metadata: pip install pennyocr langchain, then a ten-line custom loader (below) — an official langchain-pennyocr package is on the roadmap.
START FREE — 100 PAGES
$0.75 / 1,000 PAGES
1,333 PAGES PER DOLLAR · NO CREDIT CARD
01 / TRY IT
ONE ENDPOINT.
POST a file, get JSON back — the extracted text, per page and joined. PDF, PNG, JPEG, WebP or TIFF.
curl https://api.pennyocr.com/v1/ocr \
-H "Authorization: Bearer $PENNYOCR_API_KEY" \
-F "file=@scan.pdf"
# $0.75 per 1,000 pages, first 100 free02 / USE CASES
THE TEN-LINE LOADER.
THE CODE
from pennyocr import PennyOCR · docs = [Document(page_content=p.text, metadata={"page": p.page, "source": path}) for p in PennyOCR().ocr(path).page_results]
WHY MARKDOWN IN
MarkdownHeaderTextSplitter chunks along real document structure — retrieval quality follows.
PAGE METADATA
Each Document carries its page number, so retrieved chunks cite real pages in the final answer.
MIXED CORPORA
One loader for born-digital PDFs, scans and photos — no branching on 'does this have a text layer'.
03 / PRICE CHECK
HALF THE PRICE OF THE BIG CLOUDS.
Per 1,000 pages, public list prices, first tier.
PENNYOCR$0.75
AWS TEXTRACT$1.50
GOOGLE CLOUD VISION$1.50
AZURE DOC INTELLIGENCE$1.50
YOU KEEP50%
IS THERE AN OFFICIAL LANGCHAIN INTEGRATION?
Not yet — the loader above is 10 lines and works today. An official langchain-pennyocr package (and a LlamaIndex reader) is on the roadmap; email [email protected] to nudge priority.
WHAT ABOUT LANGCHAIN AGENTS?
Point them at our MCP server (mcp.pennyocr.com) or wrap client.ocr as a @tool — the response includes cost_usd for budget-aware agents.
COST FOR A TYPICAL RAG INGEST?
A 10,000-page corpus is $7.50, once. The first 100 pages each month are free to prototype with.
ALSO ON THE MENU