Skip to main content
Developer REST API

PDF OCR API for text and searchable PDFs

Send a scanned PDF, get plain text or a searchable PDF back. One REST API, 100+ languages, files up to 1 GiB.

PDF to text API

One endpoint family on an asynchronous 5-step REST pipeline. Need the PDF itself searchable? See the searchable PDF API.

Document OCR API

/v1/documents

100+ Languages

Designed for scanned books, contracts, receipts, invoices, and multi-lingual records delivered as PDF files or images. Preserves logical reading order and columns.

Supported Inputs: PDF files up to 1 GiB; PNG, JPG, JPEG, GIF, WebP and BMP images up to 20 MiB, one page each.
Multi-Language: Latin, Arabic, Chinese, Cyrillic, Devanagari, Japanese, Korean, Urdu, and more.
Export Formats: Raw plain text (format=text) and dual-layer searchable PDF with invisible text layer overlay (format=pdf).
Document OCR Docs
POST
/v1/documents

Bank Statement API

/v1/bank-statements

Send a bank statement PDF or scan and get the transactions back as JSON, CSV, Excel (XLSX), QuickBooks QBO, QuickBooks CSV, QFX and OFX, with a balance check on every account. Create the statement, upload the file, then poll until it is completed: that response carries the download links.

Same statement pages as the website. 50 free statement pages, then Bank Statement Packs from $4.99 for 100 pages.

Multilingual

Multilingual PDF OCR API: right-to-left and CJK searchable PDFs

The API reads 100+ languages and detects the language itself, so one endpoint handles a Hebrew contract, an Urdu book and a Japanese scan. The hard part of a multilingual searchable PDF is the invisible text layer: it has to copy and search correctly in a PDF viewer, not just contain the right characters.

  • Right-to-left text (Arabic, Persian, Urdu, Hebrew) is drawn in the visual order viewers expect, and Arabic-script digits copy out in the right order.
  • Chinese, Japanese and Korean text uses CJK fonts in the layer, so it copies out as text, not empty boxes.
  • Columns read in order. On pages with columns, including right-to-left newspapers, the text layer keeps each column together, so selecting down one column jumps into the next far less often.

One limit: Chrome's built-in PDF viewer can scramble Latin words and brackets inside a right-to-left line, as it does on born-digital Arabic and Hebrew PDFs. macOS Preview copies those lines correctly.

Language pages: Arabic, Urdu, Persian, Hebrew, Chinese, Japanese, Korean.

Test pageBeforeNow
Persian newspaper, three right-to-left columns7832
Hebrew newspaper, two right-to-left columns387
All 24 test pages (newspapers, forms, tables, Persian, Hebrew, Urdu, vertical Chinese)67596
Column jumps in the searchable PDF's text layer: places where a drag-selection leaves one column for another, beyond the minimum. Fewer is better. Measured October 2026 on 24 test pages (18 public, 6 customer pages), with the production renderer, reading the text back with poppler; PDFium (Chrome's PDF engine) gives similar totals.

API Quickstart

Python SDK, Node.js and cURL examples for the Document OCR endpoints. More on the Python SDK.

Full Reference Guide →
# Install first: pip install fastocr-sdk

from fastocr_sdk import FastOCR

# Reads the key from the FASTOCR_API_KEY environment variable.
with FastOCR() as client:
    text = client.extract_text("scan.pdf")
    print(text)
Base URL: https://api.fastocr.org/v1
API key
Authorization: Bearer

The 5-Step REST Architecture

To handle large files without browser timeouts or proxy payload caps, the Document OCR API uses an asynchronous workflow.

1
POST

Create Document

POST to /v1/documents with filename and file size to receive a document ID and presigned S3 URL.

2
PUT

Upload File

PUT file bytes directly to the presigned S3 upload URL. No gateway payload bottlenecks.

3
POST

Start Processing

POST to /start on your document ID to begin OCR once the upload is complete.

4
GET

Poll Status

GET the document until its status is completed, partial, or failed.

5
GET

Download Output

GET /output with your desired format (text or pdf) for a one-hour download link.

Start in three steps

Any signed-in FastOCR account can create an API key and start right away. The Free plan includes 20 free pages per month, shared with PDFs on the website. Paid plans share their Document OCR allowance with the API too.

  1. 1

    Create a key

    Sign in and create an API key in the developer console. You accept the API terms with your first key.

  2. 2

    Run the snippet

    Run the quickstart with your key in FASTOCR_API_KEY.

  3. 3

    Buy pages when you need more

    When you need more document pages, buy a Page Pack on the pricing page.

API Documentation & Specifications

Everything you need to integrate FastOCR into your backend, workflows, and automated ETL pipelines.

Technical Specifications

Authentication
Bearer
Authorization: Bearer fok_live_...
Supported File FormatsPDF, PNG, JPG, JPEG, GIF, WebP and BMP
File Size LimitsUp to 1 GiB per PDF; 20 MiB per image (one page)
Output FormatsPlain text, Searchable PDF
Request IdempotencyRequired on create requests via
Idempotency-Key
header
StorageFiles are automatically purged after 30 days.
Developer Quota20 free pages per month for every account, shared with PDFs on the website. Buy a Page Pack by card on the API keys page.
Concurrency2 documents at once; 10 with a contract or 10,000+ pages bought.

Frequently Asked Questions

Is there a PDF to text API?

Yes. Create a document at https://api.fastocr.org/v1/documents, upload the PDF to the returned URL, start it, and download the result with format=text for plain UTF-8 text or format=pdf for a searchable PDF. Scanned and photographed PDFs are read with OCR. The same endpoint also reads images (PNG, JPG, JPEG, GIF, WebP and BMP) as one page each.

Does FastOCR have an API?

Yes, FastOCR provides a developer REST API at https://api.fastocr.org supporting asynchronous document OCR for PDF files and images in 100+ languages. It returns plain text or a searchable PDF.

How do I get access to the FastOCR API?

Any signed-in FastOCR account can create an API key and start right away. Sign in and create an API key in the developer console. You accept the API terms with your first key. Run the quickstart with your key in FASTOCR_API_KEY. When you need more document pages, buy a Page Pack on the pricing page. The Free plan includes 20 free pages per month, shared with PDFs on the website. Paid plans share their Document OCR allowance with the API too.

Is there a free tier for developers?

Yes. The Free plan includes 20 free pages per month, shared with PDFs on the website. Paid plans share their Document OCR allowance with the API too. You buy more pages as Page Packs on the pricing page. Page Packs work on the website too. There is no monthly commitment.

What happens after I use my 20 free monthly pages?

A document that runs out of pages fails with buy_pages. After you buy pages, call /start again on the same document. Buy a Page Pack by card at /developers/keys. Rates are at /pricing.

Can I use the FastOCR API for RAG pipelines and vector database chunking?

Yes. The FastOCR Document OCR API (/v1/documents) extracts raw text and dual-layer searchable PDFs from scanned PDFs across 100+ languages (including Arabic, Urdu Nastaliq, Chinese, Japanese, and Hindi), and from PNG, JPG, JPEG, GIF, WebP and BMP images. Downloading text via format=text returns the raw text for vector embeddings and RAG pipelines, or format=pdf returns a searchable PDF with an invisible text layer overlay.

Can I download both raw text and a searchable PDF from the same document?

Yes. Once a document reaches completed status, you can call the /output endpoint multiple times requesting format=text or format=pdf without reprocessing.

Does the FastOCR API handle bank statements?

Yes. POST /v1/bank-statements, upload the PDF, and poll the statement until it is completed. It returns JSON, CSV, Excel (XLSX), QuickBooks QBO, QuickBooks CSV, QFX and OFX, with a balance check on every account. It uses the same statement pages as the website: the first 50 are free. Details are at /bank-statement-api.

Does the API require webhook endpoints?

No webhooks are required. The API uses a polling model: GET /v1/documents/<id> until the status is completed, partial, or failed.

Ready to integrate FastOCR?

Create a key and run the quickstart. Every account gets 20 free pages a month.