# OCR a photo of a receipt or document to text

**Use case:** 

The sample is a bundled receipt photo. Replace sample:receipt-photo with a public link to your own JPEG, PNG, TIFF or WebP image. The Documents view shows the status, page count and confidence; the row holds the reading-order text and Markdown.

## Input

```json
{
  "urls": [
    "sample:receipt-photo"
  ],
  "urlField": "url",
  "datasetOffset": 0,
  "ocrLanguage": "en",
  "extractTables": false,
  "includePages": true,
  "renderDpi": 200,
  "adaptiveDpi": true,
  "maxPagesPerDocument": 100,
  "maxFileSizeMb": 50,
  "maxConcurrency": 2
}
```

## Output

```json
{
  "input_index": {
    "label": "Input index",
    "format": "integer"
  },
  "filename": {
    "label": "File name",
    "format": "string"
  },
  "status": {
    "label": "Document status",
    "format": "string"
  },
  "failure_reason": {
    "label": "Failure reason",
    "format": "string"
  },
  "page_count": {
    "label": "Pages in file",
    "format": "integer"
  },
  "pages_processed": {
    "label": "Pages processed",
    "format": "integer"
  },
  "tables": {
    "label": "Tables",
    "format": "array"
  },
  "char_count": {
    "label": "Characters",
    "format": "integer"
  },
  "mean_ocr_confidence": {
    "label": "Mean OCR confidence",
    "format": "number"
  },
  "source_url": {
    "label": "Source URL",
    "format": "string"
  },
  "failure_detail": {
    "label": "Failure detail",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Scanned PDF & Image OCR - Tables to JSON Actor is ready to run with the inputs already set for "OCR a photo of a receipt or document to text". [Sign up or log in](https://console.apify.com/create-task-from-example/BjhPItO1GcJ7SoF0n) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "OCR a photo of a receipt or document to text" task

The Scanned PDF & Image OCR - Tables to JSON Actor will start running based on the input automatically. You can also change all the input fields, like document urls, URL field in Dataset, and more, to match your specific use case.

### 3. Receive the "OCR a photo of a receipt or document to text" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as input index, file name, document status, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "OCR a photo of a receipt or document to text" task via API](https://apify.com/automa-flow/scanned-document-ocr-table-extractor.md).

## About this Actor

This example demonstrates how to use [Scanned PDF & Image OCR - Tables to JSON](https://apify.com/automa-flow/scanned-document-ocr-table-extractor.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/automa-flow/scanned-document-ocr-table-extractor.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/automa-flow/scanned-document-ocr-table-extractor.md

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`).
