---
title: Advanced Image OCR API
slug: ocr-image
url: https://apyhub.com/dosvak/service/ocr-image
provider: Dosvak LLC
categories: [Data Extraction, Image Processing]
tags: [ocr, image-text-extraction, document-digitization, word-bounding-boxes, text-recognition]
auth: api_key
---

# Advanced Image OCR API

Extract text from an image with word-level bounding boxes, confidence scores, and a word count. Built for OCR pipelines, search, and archives.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/dosvak/ocr-image` | What it does Extracts text from an uploaded image and returns the recognized full text, plus word-l… | 100 |

## Examples

### Extract text from an image with word-level bounding boxes and confidence scores

#### Quickstart

Upload an image file to extract its text using the default OCR language.

```bash
curl -X POST "https://api.eu.apyhub.com/dosvak/ocr-image" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.png" \
  -F "lang=eng"
```

#### What you'll get back

Returns a JSON object with `text` as a string, `words` as an array of word objects, and `word_count` as an integer.

Each word object can include `h`, `w`, `x`, `y`, `conf`, and `text`.

```json
{
  "text": "Hello world",
  "words": [
    {
      "h": 18,
      "w": 52,
      "x": 120,
      "y": 84,
      "conf": 98,
      "text": "Hello"
    }
  ],
  "word_count": 2
}
```

## About

## What it does
Image OCR extracts text from an image and returns both the plain text and word-level OCR details. Send a binary image file, optionally set `lang` to a Tesseract language code such as `eng`, `fra`, `deu`, or `spa`, and get structured text extraction back.

Use Image OCR when you need to turn screenshots, scans, photos of documents, or labels into machine-readable text. The response includes `text`, `word_count`, and a `words` array with each word's `text`, bounding box coordinates (`x`, `y`, `w`, `h`), and confidence score from 0 to 100. That makes it useful for indexing documents, highlighting detected words on an image, or feeding OCR output into downstream parsing and validation.

Because the output is word-level, you can keep the extracted text for search or storage while also preserving layout hints for UI overlays and quality checks. If you need multilingual OCR, switch the language code to match the image content and keep the same response shape.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dosvak/service/ocr-image
