OCR.space MCP by usefulapi

v1.2.1
io.usefulapi/ocr-space Checked 3 days ago Published 1 day ago

Read text and tables from images and PDFs, and make searchable PDFs, in OCR.space.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ocrspace_ocr_url OCR an image or PDF from a URL

Extract text from an image or PDF at a public https URL with OCR.space (POST /parse/image). Returns the text per page (a PDF gives one entry per page; the free plan reads the first 3 pages and files up to 1 MB). Uses one request of your OCR.space quota (free key: 25,000 requests per month and 500 requests per day). Options: language, engine (1-3), is_table (line-by-line text for tables, receipts, invoices), detect_orientation, scale (upscale low-resolution scans), include_overlay (word coordinates; slower).

ParameterTypeDescription
url *stringPublic https URL of the image or PDF (the file must be reachable without login and served with an image/* or application/pdf content type).
detect_orientationbooleanAuto-rotate the image; the page's text_orientation reports the rotation.
engineintegerOCR engine 1, 2 or 3. Default 2 (best all-round). 3 = highest accuracy, handwriting, tables as Markdown, 200+ languages, slower, and has its own smaller quota. 1 = fastest but deprecated.
filetypestringForce the file type when the URL's content type is wrong (default: detected).
include_overlaybooleanAlso return word coordinates (left/top/width/height in pixels), capped at 1000 words.
is_tablebooleanReturn text line by line, best for tables, receipts and invoices.
languagestringDocument language, a 3-letter code such as eng, ger, fre, spa, chs (see ocrspace_list_languages). Default eng. 'auto' works with engine 2 and 3 only.
scalebooleanUpscale internally; helps low-resolution PDF scans.

ocrspace_ocr_base64 OCR a base64-encoded image or PDF

Extract text from a small file passed as base64 (POST /parse/image with base64Image). Up to 1,400,000 base64 characters (about 1 MB, the free plan's file limit); use ocrspace_ocr_url for bigger files. Pass either a full data URI (data:image/png;base64,...) or the raw base64 plus mime_type. Uses one request of your OCR.space quota (free key: 25,000 requests per month and 500 requests per day). Options as in ocrspace_ocr_url.

ParameterTypeDescription
image_base64 *stringThe file as base64 (a data: URI, or raw base64 together with mime_type). Whitespace and newlines are removed.
detect_orientationbooleanAuto-rotate the image; the page's text_orientation reports the rotation.
engineintegerOCR engine 1, 2 or 3. Default 2 (best all-round). 3 = highest accuracy, handwriting, tables as Markdown, 200+ languages, slower, and has its own smaller quota. 1 = fastest but deprecated.
filetypestringForce the file type when the URL's content type is wrong (default: detected).
include_overlaybooleanAlso return word coordinates, capped at 1000 words.
is_tablebooleanReturn text line by line, best for tables, receipts and invoices.
languagestringDocument language, a 3-letter code such as eng, ger, fre, spa, chs (see ocrspace_list_languages). Default eng. 'auto' works with engine 2 and 3 only.
mime_typestringMIME type of the file; required when image_base64 has no data: prefix.
scalebooleanUpscale internally; helps low-resolution PDF scans.

ocrspace_create_searchable_pdf Create a searchable PDF from a URL

Run OCR on a public https image/PDF URL and have OCR.space build a searchable PDF (a copy of the file with a text layer). Returns searchable_pdf_url, a download link that expires after one hour, plus the recognized text. The free plan adds a 'Generated by OCR.space' watermark. Engine 3 cannot make searchable PDFs, so only engine 1 or 2 is accepted (default 2). Uses one request of your OCR.space quota (free key: 25,000 requests per month and 500 requests per day).

ParameterTypeDescription
url *stringPublic https URL of the image or PDF.
engineintegerOCR engine 1 or 2 (default 2); engine 3 does not create searchable PDFs.
filetypestringForce the file type when the URL's content type is wrong (default: detected).
hide_text_layerbooleanHide the text layer (default false = visible text layer). The text layer exists either way.
languagestringDocument language, a 3-letter code such as eng, ger, fre, spa, chs (see ocrspace_list_languages). Default eng. 'auto' works with engine 2 and 3 only.

ocrspace_list_languages List OCR languages, engines and limits

Reference (no request to OCR.space, no quota used): the documented language codes for the language option, what OCR engines 1, 2 and 3 do, and the free-plan limits.