South Star

OCR Tesseract Text Extraction Batch Layout Boxes API

Free tier included · Artificial Intelligence/Machine Learning
Extract text from images with Tesseract OCR. Batch up to 10 images, get word/line/paragraph bounding boxes, crop regions, list languages. Offline, no storage, no watermark.

OCR API wraps Tesseract to pull text out of PNG, JPEG, WebP and BMP images (up to 10 MB each). It covers text extraction, language mixing, confidence scores, with no watermark and no per-character billing.

Four endpoints cover the real workflow. `POST /ocr` returns the flat recognized text plus char/word counts and mean word confidence. `POST /ocr/full` adds the full layout: every word with its pixel bounding box `[left, top, width, height]` and its own 0–100 confidence, plus merged line and paragraph boxes, page size and `coordinate_space`. `POST /ocr/region` crops a pixel rectangle (`x`, `y`, `w`, `h`) out of a larger screenshot and OCRs only that area — ideal when one image holds many fields and you only need a table cell or a caption. `POST /ocr/batch` processes 1–10 images in one multipart call, returning one compact result per image; a single broken or oversized file fails alone with `ok: false` and an `error` object while the rest still succeed. `GET /ocr/languages` lists every Tesseract language pack installed on the instance so you can pick `lang` codes (several joined with `+`, e.g. `eng+rus`) before uploading.

The service is offline and stateless: images are decoded in memory, fed to Tesseract, and never written to disk or logged. Tesseract runs with one thread per process (`OMP_THREAD_LIMIT=1`) and the gateway allows 2 concurrent decodes, so throughput is bounded by CPU, not by a remote service. Honest limits: max 10 MB per image and 25 MP per image (checked on the header before decoding); `psm` 0–13 and `min_conf` 0–100 are passed straight to Tesseract; coordinates for `/ocr/region` are clamped to the image and an `x`/`y` starting outside the image is a 422. Accuracy on clean renders is high (control-set English text extracted exactly, confidence ~93; Russian 82–96 depending on sharpness), but noisy scans and unusual fonts reduce quality.

Endpoints

MethodPathWhat it does
GET/API metadata: name, version, and paths to the interactive docs and health endpoint.
GET/healthLiveness probe; returns status "ok" while the process is up.
GET/ocr/languagesList the Tesseract language packs installed on this instance, plus the default eng. Any code from this list can be passed as lang to the OCR endpoints, and several codes can be joined with + (e.g. eng+rus).
POST/ocrExtract text from one image. Multipart form field file (PNG/JPEG/WebP/BMP, max 10 MB / 25 MP). Optional form field lang (default eng). Returns text, chars, words, confidence (mean word confidence 0–100) and error when present.
POST/ocr/fullLayout-aware OCR: recognized text plus every words[] entry with its pixel box bbox = [left, top, width, height] and its own confidence (0–100), plus lines[] and paragraphs[] with merged boxes, confidence and counts. mean_confidence, char_count, word_count and page size included. Query params: lang (default eng), psm (0–13, default 6), min_conf (0–100, default 0).
POST/ocr/regionCrop a pixel rectangle (x, y, w, h, origin top-left) out of the uploaded image and OCR only that area, returning the same layout payload as /ocr/full. Coordinates are clamped to the image; x/y starting outside the image is a 422. Word/line boxes are relative to the crop (coordinate_space: crop); page still reports the original image size. Query params: w (required), h (required), x (default 0), y (default 0), lang, psm, min_conf.
POST/ocr/batchOCR 1–10 images in a single multipart call (same field name files). Returns one compact result per image: text, chars, words, confidence. Each item is processed independently — a broken or oversized file fails alone with ok: false and an error object while the rest still succeed. Returns count, ok_count and results[] (index, filename, ok, …). Query param: lang (default eng).

Quick start

curl -X GET "https://ocr.p.rapidapi.com/ocr/languages" \
  -H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
  -H "X-RapidAPI-Host: ocr.p.rapidapi.com"

FAQ

What image formats and sizes are supported?

PNG, JPEG, WebP and BMP, up to 10 MB each and 25 MP per image. The pixel count is checked on the header before decoding, so oversized images are rejected early with a 422.

Does the API store my images or log my requests?

No. Images are decoded in memory, passed to Tesseract, and discarded. There are no databases and no request logs.

How accurate is the text extraction?

On clean renders (screenshots, generated images) accuracy is high — control-set English text is extracted exactly with confidence ~93, Russian 82–96 depending on sharpness. Noisy scans and unusual fonts reduce quality; cyrillic on synthetic renders may partially transliterate to latin glyphs.

Can I process multiple images at once?

Yes — `POST /ocr/batch` accepts 1–10 images in one multipart call. Each image is processed independently, so a single broken or oversized file fails alone (`ok: false`, with an `error` object) while the rest still succeed.

Try OCR Tesseract Text Extraction Batch Layout Boxes free

Free tier on every plan. Get an API key and start calling in under a minute.

Open on RapidAPI

Related APIs