Image & Document OCR — Chinese-First Text Extraction avatar

Image & Document OCR — Chinese-First Text Extraction

Pricing

Pay per usage

Go to Apify Store
Image & Document OCR — Chinese-First Text Extraction

Image & Document OCR — Chinese-First Text Extraction

OCR images and scanned PDFs into plain text or Markdown. Strong on Simplified/Traditional Chinese and mixed CN/EN pages. One dataset item per page with warnings for low-confidence blocks.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Tang

Tang

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

12 days ago

Last modified

Features

Limited permissions

Share

OCR to Text — images to text (Chinese first)

OCR images (screenshots, scans, invoices, receipts) into structured text using PaddleOCR PP-OCRv4 + ONNX (@gutenye/ocr-node). No API keys, no external OCR service — the model runs inside the Actor container.

Output (one dataset record per image)

{
"source": "https://example.com/scan.png",
"text": "发票号码 12345678\n开票日期 2026年11月10日 ...",
"lines": [
{ "text": "发票号码 12345678", "confidence": 0.98, "box": [[10,20],[300,20],[300,48],[10,48]] }
],
"lang": "ch",
"elapsedMs": 1840
}
  • outputMode: "markdown" adds a markdown field (heading + plain text) for direct reading.
  • Failed images push { source, error } and the run continues with the next image.
  • No lines detections (blank image) still returns a record with text: "".

Input

FieldTypeDefaultDescription
imageUrlsarray of strings—Public http(s) image URLs
imagesBase64array of strings—Raw base64 or data:image/...;base64,... (max 15 MB each)
langstringchOCR language (ch first; en etc. if supported by the model)
outputModetext / markdowntextAdd Markdown rendering or not

Example

{
"imageUrls": ["https://example.com/scan.png"],
"lang": "ch",
"outputMode": "text"
}

Limitations

  • Printed text first — Chinese/English printed screenshots and scans work best.
  • Handwriting is poor — handwritten invoices/notes are not reliable; expect low confidence or misses.
  • Chinese-first — default model targets Chinese; other languages depend on the package's available models.
  • Rotated/skewed photos and very low-resolution images degrade accuracy; pre-crop if possible.
  • Models are heavy (~300 MB) — the first cloud build may take 6–10 minutes and cold start downloads/loads models.
  • No PDF input (convert PDF pages to images first).

Build / deploy notes

  • .actor/actor.json: actorSpecification: 1, version: "0.0", input/readme copied inside .actor/.
  • Dockerfile: node:22-slim + libgomp1 (onnxruntime requirement) + npm ci --omit=dev + CMD node src/main.js.
  • Dependencies are installed in the cloud build, not on the local machine.
  • When creating the Actor, pass source file contents as plain text, not base64.
  • No local npm install was performed for verification; only static checks (node --check, JSON schema validity) locally. Real verification happens on the Apify build+run.