# Japanese OCR: Image, PDF, Receipt & Invoice to Text (`mirumiru_miru17/image-pdf-ocr-japanese`) Actor

- **URL**: https://apify.com/mirumiru_miru17/image-pdf-ocr-japanese.md
- **Developed by:** [Miyuu Nishida](https://apify.com/mirumiru_miru17) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 page processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Japanese OCR: Image, PDF, Receipt & Invoice to Text

Japanese OCR for images, scanned PDFs, receipts and invoices. Turn them into text. Paste direct links to your files and get the **full text**, **text per page** and an **OCR confidence score** for each file, plus a ready-to-download TXT file.

Built for **Japanese documents** (invoices, receipts, business cards, contracts, forms, vertical text) and works with English, Chinese, Korean, German, French and Spanish too.

No API key, no setup. **Pay only per page.**

### What it does

- **Images**: PNG, JPG, WEBP, TIFF, BMP. Photos and screenshots are cleaned up (noise removal, contrast, upscaling of small images) before OCR.
- **PDFs**: in **Auto** mode, pages that already contain text are read exactly from the PDF (fast, no OCR errors). Scanned pages are rendered at 300 DPI and OCR'd.
- **Japanese**: horizontal and **vertical (縦書き)** text. Removes the extra spaces OCR engines put between Japanese characters and fixes `15.000円` → `15,000円`.
- **Confidence score** per page, so you can flag pages that need a human check.

### Use cases

- Invoices and receipts → text for bookkeeping and data entry
- Scanned contracts and forms → searchable text
- Business cards, flyers and screenshots → copyable text
- Bulk OCR of many files in one run, or as a tool for AI agents through the Apify MCP server

### Input

| Field | Description |
| --- | --- |
| `fileUrls` | Direct links to images or PDFs, up to 100 MB each. |
| `language` | `jpn+eng` (default), `jpn`, `eng`, `jpn_vert+jpn` (vertical Japanese), `chi_sim+eng`, `chi_tra+eng`, `kor+eng`, `deu+eng`, `fra+eng`, `spa+eng`. |
| `pdfMode` | `auto` (default) or `ocr` to OCR every page. |
| `maxPagesPerFile` | Pages beyond this are skipped and **not charged** (default 50). |
| `maxFiles` | Safety limit (default 50). |

### Output

One dataset item per file:

```json
{
  "url": "https://example.com/invoice.pdf",
  "type": "pdf",
  "pageCount": 1,
  "averageConfidence": 91.6,
  "text": "請求書\n株式会社さくら商事御中\n請求日 : 2026年11月8日\n...\n合計金額  148,500円",
  "pages": [{ "page": 1, "method": "ocr", "confidence": 91.6, "text": "..." }]
}
```

Each file's text is also saved as `TEXT-1.txt`, `TEXT-2.txt`… in the key-value store.

### Pricing

Pay per page that returns text. Blank pages, skipped pages and files that fail to download are not charged. The Actor respects your maximum cost per run.

### Notes

- Uses Tesseract OCR 5. Accuracy depends on scan quality: clear, straight, 200–300 DPI scans work best. Handwriting is not supported.
- Only process documents you have the right to use.

### More tools from the same author

- [SEO Audit & AI Search Readiness Checker](https://apify.com/mirumiru_miru17/seo-ai-readiness-audit): full-site SEO audit, AI search readiness score and llms.txt generator
- [Bulk PageSpeed & Core Web Vitals Checker](https://apify.com/mirumiru_miru17/page-speed-core-web-vitals): Lighthouse scores, LCP/CLS/TBT and top fixes for a list of URLs
- [Audio & Video to Text Transcriber (Whisper)](https://apify.com/mirumiru_miru17/audio-video-transcriber): transcripts and SRT subtitles in Japanese and 90+ languages

***

### 日本語

画像やスキャンしたPDFから文字を読み取ってテキストにします。請求書・領収書・名刺・契約書などの日本語の書類に強く、縦書きにも対応しています。文字が埋め込まれたPDFはそのまま正確に読み取り、スキャンしたページだけをOCRします。ページごとのテキストと読み取りの信頼度、TXTファイルを出力します。APIキーは不要で、料金は1ページごとの従量課金です。

# Actor input Schema

## `fileUrls` (type: `array`):

Direct links to images (PNG, JPG, WEBP, TIFF, BMP) or PDFs. Up to 100 MB each.

## `language` (type: `string`):

Language of the text in your documents.

## `pdfMode` (type: `string`):

Auto is faster and exact for digital PDFs.

## `maxPagesPerFile` (type: `integer`):

Pages beyond this are skipped and not charged.

## `maxFiles` (type: `integer`):

Safety limit on files per run.

## Actor input object example

```json
{
  "fileUrls": [
    "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/scanned-invoice-ja.pdf",
    "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/receipt-en.png"
  ],
  "language": "jpn+eng",
  "pdfMode": "auto",
  "maxPagesPerFile": 50,
  "maxFiles": 50
}
```

# Actor output Schema

## `results` (type: `string`):

Full text, per-page text, method and confidence for each file.

## `textFiles` (type: `string`):

One TXT file per input file (TEXT-1.txt, ...).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "fileUrls": [
        "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/scanned-invoice-ja.pdf",
        "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/receipt-en.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mirumiru_miru17/image-pdf-ocr-japanese").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "fileUrls": [
        "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/scanned-invoice-ja.pdf",
        "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/receipt-en.png",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("mirumiru_miru17/image-pdf-ocr-japanese").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "fileUrls": [
    "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/scanned-invoice-ja.pdf",
    "https://raw.githubusercontent.com/myunsd0417-creator/seo-ai-readiness-audit/main/samples/receipt-en.png"
  ]
}' |
apify call mirumiru_miru17/image-pdf-ocr-japanese --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mirumiru_miru17/image-pdf-ocr-japanese"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/D0uyNHUjgTbHUyzCM/builds/3dKDcETEEVtA93lJN/openapi.json
