# Scanned PDF to Word - OCR PDF to DOCX, Document Photos (`tidytools/scanned-docs-to-word`) Actor

Scanned PDF to Word: convert public scanned PDF or document photo URLs into one editable Word DOCX per file, with headings, paragraphs and simple tables, plus one Dataset row per page. $0.003 per page with text; blank and failed pages are free.

- **URL**: https://apify.com/tidytools/scanned-docs-to-word.md
- **Developed by:** [Yukai Lin](https://apify.com/tidytools) (community)
- **Categories:** AI, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.40 / 1,000 image transcribeds

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

## Scanned PDF to Word — Scans & Document Photos to Editable DOCX

### What it does

Paste a public scanned PDF or document-photo URL. This Actor reads each page with the existing TidyTools OCR backend, builds **one editable Word file per source**, and returns one Dataset row per page. Headings, paragraphs, bullet lists and complete simple Markdown tables become Word elements. Each page is a Word section. The original visual layout, images and complex tables are not reconstructed.

### Handwritten notes

**Not recommended for handwriting that must be accurate.** This Actor is built for printed scans. In our test on public handwritten samples, neat whiteboard text was read correctly (100% of 12 words), everyday English cursive reached about 83% of words, a neat French letter 88%, and a 1906 German letter 34%. The errors read naturally and come with no warning: "Govt" became "God", and the German letter gained a line that is not on the page. A page is still charged when text comes back, right or wrong. If you try handwriting, treat the result as a rough draft and check it against the original.

For letters and notes, set `"mode": "handwriting"`. The model is then asked to write `[?]` for each word it cannot read instead of guessing, paragraphs and intentional line breaks (address, greeting, sign-off) are kept, every `[?]` is highlighted in yellow in the Word file, and each page row counts them in `uncertainWords`. A page with only `[?]` markers is blank and free. The price is the same. The figures above were measured before this mode existed; a model can still misread a word without marking it, so proofread the whole page, not only the `[?]` words.

### How to use — Try a CC0 sample

Use the [three-page scanned library report](https://filedone.ai/sample-files/sample-multi-page-scanned-pdf) ([direct PDF](https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf), CC0). It has three image-only pages and simple tables.

The sample is prefilled on the first Start. If you add another URL without removing it, the sample is skipped and SUMMARY.sampleSkipped is true.

#### Input example

```json
{"urls":["https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf"],"maxPages":50}
```

#### Output example

For a page with text, a Dataset row looks like:

```json
{"sourceUrl":"https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf","pageNumber":1,"pageCount":3,"text":"# Report","success":true,"charged":true,"documentKey":"DOCUMENT_001.docx","documentUrl":"https://api.apify.com/v2/key-value-stores/<store-id>/records/DOCUMENT_001.docx"}
```

Open **SUMMARY** after the run and follow `documents[0].documentUrl` to download `DOCUMENT_001.docx`. The Dataset contains one row per page. A successful row has `sourceUrl`, `sourceIndex`, `pageNumber`, `pageCount`, `text` (Markdown), `success`, `charged`, `documentKey` and `documentUrl`; in handwriting mode it also has `uncertainWords`, and SUMMARY has `mode` and `uncertainWords` totals. Failed and blank pages also have `errorType` and `error`. For an invalid, unreachable or oversized source, the Dataset has one free error row with only `input`, `success`, `charged`, `errorType` and `error` (plus `sourceUrl`/`sourceIndex` for a valid link; no `text` or `uncertainWords`), and SUMMARY records the failure. If a later page cannot be saved, SUMMARY still links the completed DOCX and records charges for earlier saved pages; the failed page gets one free error row with `input`, `sourceUrl`, `sourceIndex`, `pageNumber`, `pageCount`, `success`, `charged`, `documentKey`, `documentUrl`, `errorType` and `error` (no `text` or `uncertainWords`).

### Pricing and quality

Each page with text uses one existing `image-ocr` event: **$0.003 on Free and Bronze**; higher plans have volume discounts. Blank pages, failed pages, invalid links and files over 15 MB are free. DOCX assembly has **no separate event or start fee**. The maximum is 100 pages per PDF; the default is 50. A three-page report with text on all pages costs $0.009 on Free.

All PDF pages, and images on free-plan and preview runs, use the zero-marginal-cost Workers AI models. Images on paid-plan runs start with the same models and only fall back to pay-per-use models if those fail, so a paid plan is not a higher-accuracy mode. Actual accuracy depends on scan quality; the DOCX structure follows detected Markdown and may require edits.

### Limitations and FAQ

- Public PDF and image URLs are accepted. Private files require a public share link. An image is one page. PDF files must be 15 MB or less.
- **Does AI OCR guarantee a verbatim copy?** No. AI OCR does not guarantee 100% verbatim transcription. Check important numbers, names, formulas and dates against the original.
- **Will the Word file look exactly like the scan?** No. Text and simple tables are editable; visual placement, handwriting style, signatures and photos are not preserved.
- **Are blank pages charged?** No. A blank page has `success:false`, `charged:false` and `errorType:"no_text"`.
- **Can I set a language?** Yes. `language` is an optional hint for the OCR model.
- **What does `mode` change?** `"document"` (default) is for printed scans. `"handwriting"` is for letters and notes: `[?]` for words the model is unsure of (cursive or old manuscripts can still have unmarked misreadings), kept line breaks, highlighted markers in the DOCX. Both cost the same.

### Use with AI agents (MCP)

Connect [Apify's MCP server](https://mcp.apify.com?tools=tidytools/scanned-docs-to-word) to Claude, Cursor or another MCP client, then ask it to turn a public scan URL into a Word document. Use the JSON input above. Failed items carry `errorType` and are free.

### Support

Open the Actor's Issues tab with a public sample URL and page number. Do not post private documents.

# Actor input Schema

## `urls` (type: `array`):

Public PDF, JPEG or PNG URLs. PDFs up to 15 MB and at most 100 pages; oversized files and invalid links return a free error row.

## `mode` (type: `string`):

Handwriting keeps paragraphs and line breaks, writes \[?] for each word the model cannot read instead of guessing, and highlights \[?] in the Word file. Same price per page.

## `maxPages` (type: `integer`):

Only the first selected pages are read. Extra pages are skipped without charge.

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

For handwriting or multilingual pages, e.g. English, Spanish or Chinese.

## Actor input object example

```json
{
  "urls": [
    "https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf"
  ],
  "mode": "document",
  "maxPages": 50
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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 = {
    "urls": [
        "https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("tidytools/scanned-docs-to-word").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 = { "urls": ["https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf"] }

# Run the Actor and wait for it to finish
run = client.actor("tidytools/scanned-docs-to-word").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 '{
  "urls": [
    "https://filedone.ai/sample-files/sample-scanned-report-3-pages.pdf"
  ]
}' |
apify call tidytools/scanned-docs-to-word --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidytools/scanned-docs-to-word"
        }
    }
}
```

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/Jg0vSEdo9uaUlWXfK/builds/f35alSK3XrrJGOuTj/openapi.json
