Home  ›  Tool API  ›  Document OCR API

Document OCR API

Extract text from scans and PDFs for agents

Free-tier OCR and document text extraction for AI agents. Upload images or PDFs; get plain text, engine, word count via REST and MCP. For embedded PDF text use PDF-to-text.

✓ Transparent usage terms✓ REST + MCP✓ Real browser tool

Working examples

Copy it into your stack.

Upload a scan, image, or PDF—or pass a public URL. Local OCR/text extraction returns plain text, engine name, and word/char counts as JSON for LLM and RAG pipelines.

Copyable requests

curl
curl -F "file=@scan.png" https://agentmediatools.com/api/ocr
Python
import requests
r = requests.post("https://agentmediatools.com/api/ocr", files={"file": open("scan.png","rb")})
print(r.json()["text"])

Frequently asked questions

Is this a document OCR API?

Yes. Upload images or scanned PDFs for OCR. For PDFs that already contain selectable text, prefer PDF-to-text for cleaner extraction.

Which engines are used?

PDFs use pdftotext or pdf-parse; images use the server Tesseract installation.

What does the response contain?

The JSON response includes extracted text, engine, word count, and character count.

Does image OCR always work?

Image OCR requires Tesseract on the server; the response reports clearly when OCR is unavailable.

One tool now, one integration later

Test it in the browser. Automate it when ready.

The same Agent Media Tools account connects this operation to the wider Tool API and MCP catalog.