---
title: "Convert a scanned image into words with location"
method: POST
path: "/ocr/image/to/words-with-location"
tags: ["ImageOcr"]
---

# Convert a scanned image into words with location

`POST /ocr/image/to/words-with-location`

Converts an uploaded image in common formats such as JPEG, PNG into words/text with location information and other metdata via Optical Character Recognition.  This API is intended to be run on scanned documents.  If you want to OCR photos (e.g. taken with a smart phone camera), be sure to use the photo/toText API instead, as it is designed to unskew the image first.  Note: for free tier API keys, it is required to add a credit card to your account for security reasons, to use the free tier key with this API.

## Headers

- `language` string
- `preprocessing` string

## Response `200`

OK

- ImageToWordsWithLocationResult — Result of an image to words-with-location OCR operation
  - `Successful` boolean — True if successful, false otherwise
  - `Words` OcrWordElement[] — Word elements in the image
    - `WordText` string — Text of the word
    - `LineNumber` integer — Line number of the word
    - `WordNumber` integer — Index of the word in the line
    - `XLeft` integer — X location of the left edge of the word in pixels
    - `YTop` integer — Y location of the top edge of the word in pixels
    - `Width` integer — Width of the word in pixels
    - `Height` integer — Height of the word in pixels
    - `ConfidenceLevel` number, double — Confidence level of the machine learning result; possible values are 0.0 (lowest accuracy) - 1.0 (highest accuracy)
    - `BlockNumber` integer — Index of the containing block
    - `ParagraphNumber` integer — Index of the containing paragraph
    - `PageNumber` integer — Index of the containing page

---

[API](https://skmtc.net/cloudmersive/apis/ocrapi.md) · [All operations](https://skmtc.net/cloudmersive/apis/ocrapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudmersive/ocrapi/versions/809f1a173306/schema)
