Tesseract 5 with automatic pre-processing (deskew-free grayscale normalisation and upscaling of small scans). Also produces a searchable PDF with an invisible text layer.
Click one to see its parameters and a ready-to-paste curl call.
Read the text in an image
Returns: json
| Parameter | Type | Description |
|---|---|---|
file |
file |
Image to read. |
url |
string |
Public URL instead of an upload. |
lang |
string |
eng, fra, deu, spa, ita, por, nld. Combine with "+". Default: eng |
words |
boolean |
Also return per-word bounding boxes and confidence. Default: false |
psm |
integer |
Tesseract page segmentation mode, 0-13. Default: 3 |
curl -X POST "https://173-249-18-142.sslip.io/v1/ocr/image" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.jpg" \
-F "lang=eng" \
-F "words=false" \
-F "psm=3"
Uses the embedded text layer when there is a usable one, and only falls back to OCR when the pages are images.
Returns: json
| Parameter | Type | Description |
|---|---|---|
file |
file |
PDF to read. |
lang |
string |
OCR language. Default: eng |
first |
integer |
First page, 1-based. Default: 1 |
last |
integer |
Last page. At most 20 pages per call. |
force |
boolean |
OCR even when a text layer exists. Default: false |
curl -X POST "https://173-249-18-142.sslip.io/v1/ocr/pdf" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.pdf" \
-F "lang=eng" \
-F "first=1" \
-F "force=false"
Takes an image or a scanned PDF and returns a PDF you can search and copy from.
Returns: binary pdf
| Parameter | Type | Description |
|---|---|---|
file |
file |
Image or PDF to process. |
lang |
string |
OCR language. Default: eng |
curl -X POST "https://173-249-18-142.sslip.io/v1/ocr/searchable-pdf" \
-H "X-API-Key: $SMALLAPIS_KEY" \
-F "file=@input.pdf" \
-F "lang=eng" \
--output result.bin
List the installed OCR languages
Returns: json
No parameters.
curl -H "X-API-Key: $SMALLAPIS_KEY" \
"https://173-249-18-142.sslip.io/v1/ocr/languages" --output out.bin