API & MCP
Everything a person can do on Searchable PDF OCR, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://searchablepdfocr.usefulweb.site/api/v1/calculate– run Searchable PDF OCRGET https://searchablepdfocr.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Searchable PDF OCR
Adds an invisible, selectable text layer to scanned PDFs (or a scanned JPG/PNG) using OCRmyPDF and Tesseract. Choose the document languages, straighten crooked scans, fix upside-down pages and optionally create a PDF/A for archiving. Reports how many pages were recognised and shows a sample of the extracted text.
| Field | Type | Default | Description |
|---|---|---|---|
file (required) | file | — | Scanned PDF or image. Max 100 MB and 60 pages. |
languages | multiselect (eng, deu, fra, spa, ita, nld, por, pol) | ["eng"] | Document languages. Pick every language that appears. Only languages installed on the server can be used; the result lists them. |
mode | select (skip-text, force-ocr) | "skip-text" | Pages that already contain text |
deskew | boolean | false | Straighten crooked scans (deskew) |
rotatePages | boolean | false | Fix sideways or upside-down pages |
pdfa | boolean | false | Save as PDF/A-2b (archiving) |
password | text | — | PDF password (only if the file is protected). Used only to open the file for this conversion; it is written to a private temporary file, never to a command line, and deleted with the job. |
Example request
Scanned line of text (PNG) to a searchable PDF
curl -X POST https://searchablepdfocr.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"file":{"filename":"scan.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAAggAAABGAQAAAACBSlH7AAABvklEQVRYw+3UMUvEMBQH8MgVM+bGG4QMfgkn47dx1V2aA4eO/UonGfoxbMngaLpFCHm+l1ZUUNOeIAh5w5+jvfy45N4Lg98WK0IRilCEIvydYL/+RtDw9LMQ1WchcnAKI4hjBXcCvcBwm2OFnukDx+jXC2+Q102HYd4frRQgKGEx2hXCmexA9trCCRzoKJW0GHiQ4UZ7GfQhK2y5iWovbWCaqSSMFChcyQMPen+dExi3UVXC+m1d4bp4mYSdhFCJh/ugK54TuLG4qrVu2n24VCN+2mJLyPZxCLVscoKwY6hVZ3GdJqEmoWYbZBqgV1lBonCnOzuAhw7Ak+BrbhDs4IVeZYWRBGPtJLiIgotiSIJfJngftCWB4aENJAxR0qY6x44QDAlmEmxPQrYfUHCzQI8aEppZMAt3EW4/CIIWC5h20a4QzCxEiYtTrBHieZj+TU2DBdjg6k1wS4U4dxSQgg2uoR2oo1BY0lFj3MS5q5/B4Vl2FIa6uumXdDX+Xg7TZJ0KvKMU3VEYabLYkslKwjzdSehFCprufrdkupMw3zCKBKcwvKQbxl3kb5gfig42W0X4J8KiKkIRilCE7+oV25/CiYnY+pIAAAAASUVORK5CYII="},"languages":["eng"]}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://searchablepdfocr.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
searchable_pdf_ocr - Local stdio connector:
node src/mcp-stdio.ts --tool=searchable-pdf-ocr
{
"mcpServers": {
"searchable-pdf-ocr": { "type": "http", "url": "https://searchablepdfocr.usefulweb.site/mcp" }
}
}