Docs / Transformers / Extract Text (OCR)

# Extract Text (OCR)

Run Apple's Vision OCR on an image and output the recognized text. Runs 100% on-device — no network, no AI provider required.

Because recognition happens entirely on your Mac with Apple's Vision framework, no image or text ever leaves the machine — it fits the local-first model. Extract Text (OCR) pairs naturally with the Photo Added trigger, but works on any image file path in the incoming payload.

## Ports

Inlet
Input (image)
Outlet
Output (any)

## Configuration

Parameter | Type | Default | Description
--- | --- | --- | ---
`imagePath` | variable picker | `{{filePath}}` | The image to read. Defaults to `{{filePath}}` from the upstream node.
`recognitionLevel` | dropdown | `Accurate` | Choose `Accurate` or `Fast`. Accurate is slower but reads more reliably.
`languageCorrection` | toggle | true | Applies dictionary-based correction. Turn off for codes, SKUs, or serial numbers where correction hurts.
`outputKey` | text | `"extractedText"` | The payload key where the recognized text is stored.

## Output Payload

These keys are merged onto the incoming payload — upstream keys such as `assetIdentifier` and `filePath` are preserved, so a later node can still act on the photo.

`extractedText` The recognized text (or the key name configured via `outputKey`).
`ocrConfidence` A number indicating the recognition confidence.
`ocrLineCount` The number of text lines recognized in the image.

## Example

← Map Keys Transformers →