ForHosting KIT · OCR & Data Extraction

Read a scanned PDF

The PDF OCR API opens a scanned PDF — the kind that's really just a stack of page images wearing a PDF extension — and returns the text that's visually printed on each page. It exists because a scanned contract or archived report looks searchable but isn't, until something actually reads what's on the page.

● StablePer request + per page$0.010
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

A PDF that only looks like text

Not every PDF contains real, selectable text. Plenty are produced by scanning paper, and what you get is effectively a photograph of each page saved inside a PDF container — open one and try to select a sentence, and nothing highlights, because there's no text layer underneath, only pixels arranged to look like letters. The pdf ocr api is built for exactly this document type: it looks past the image and reads what's actually printed.

Page-by-page recognition

You submit the PDF and the service works through it page by page, recognizing the printed characters on each and assembling the output as plain text tied to its page of origin, so a 40-page scanned report yields the same structure a person would expect if they'd read it cover to cover. This matters for documents like old contracts, government forms, or archived reports that were digitized as images long before anyone thought about making them searchable.

How the async flow runs

Calling POST /ocr/pdf returns a task_id immediately, and recognition proceeds on our global edge without tying up a connection while a long, multi-page document is processed. When it's done, delivery happens by signed webhook — well suited to a document pipeline handling many files — or by a signed link valid 24 hours, for a one-off lookup where a person just needs the text out of a single file.

Fitting into archives and document pipelines

This is the layer that turns a static digital archive into something a search engine, a legal-discovery tool, or a records system can actually query: a legal team making a scanned case file searchable, a records department processing a backlog of digitized forms, a research group extracting text from archived reports scanned years ago. Because each PDF is a single async request, batching a whole archive is a matter of looping the call, not redesigning a workflow.

What it costs and how failures are handled

Pricing runs $0.010 per request plus $0.0575 per page, a published rate scaled to document length rather than a flat or hidden charge. If recognition on a document fails, it's retried three times before a clear error is returned, and you're never billed for a failed task — cost tracks pages actually read, not attempts made. Using the endpoint requires prepaid balance; there's no free tier or trial, which keeps throughput reliable, and requests without balance return 402. Source PDFs and extracted text are removed after the retention period and never used for training.

Making a legal archive searchable

A law firm runs a backlog of scanned case files through the API so lawyers can finally search for a term across decades of paper records.

Digitizing government or historical forms

A records department processes a stack of digitized paper forms and gets back plain text ready to load into a database instead of leaving them as unsearchable scans.

Research on archived reports

A research team extracts text from scanned reports that predate digital publishing, enabling full-text search across an archive that was previously image-only.

Contract review pipelines

A contract-management system OCRs incoming scanned agreements before routing them, so the review tool can search clauses instead of reading page images.

How do I OCR a scanned PDF using an API?

Send the PDF to POST /ocr/pdf and you get a task_id right away. The pdf ocr api reads each page asynchronously and delivers the text by signed webhook or a signed link valid 24 hours.

Is the PDF OCR API free?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

Does it work on multi-page scanned documents?

Yes, it processes the PDF page by page and returns text tied to each page, which is what makes it suited to long scanned contracts, reports, or archives.

What's the difference between this and a PDF that already has text?

A PDF with a real text layer doesn't need OCR at all; this endpoint is specifically for scanned PDFs where the pages are images and nothing is selectable until it's recognized.

Can I process a large backlog of scanned PDFs at once?

Yes. Each PDF is an independent async request with its own task_id, so processing a whole archive is a matter of looping the call across every file.

What happens if OCR fails on a page or document?

The system retries three times before returning a clear error, and a failed task is never charged, so cost tracks pages actually delivered, not failed attempts.

How is page count for pricing determined?

It's based on the number of pages in the submitted PDF, since the $0.0575 per page rate applies to each page the service actually reads.

How long can I retrieve the extracted text?

The signed link stays valid for 24 hours, or you get the text immediately via signed webhook; after the retention window everything is deleted and never used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/ocr/pdf

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/ocr/pdf \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"…"}'
{
  "input": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "ocr.pdf",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.010
Per page$0.0575

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb25
max_pages10
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
413input_too_largeThe file exceeds the size limit.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →