---
title: "Extract Text from Image & PDF API"
slug: extract-text-from-image-pdf
url: https://apyhub.com/skavio/service/extract-text-from-image-pdf
provider: Skavio LLC
categories: [Ingestion Kit, Document Intelligence Kit, Media Kit]
tags: [ocr, text-extraction, document-digitization, image-to-text, pdf-ocr]
auth: api_key
version: 1.1.0
service_type: sync
endpoints: 1
atoms: 1600
mcp: true
---

# Extract Text from Image & PDF API

OCR API: send a scanned PDF or image and get the plain text back as JSON. Works with JPG, PNG, WEBP, TIFF and photos of documents. Free tier, no card.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/skavio/extract-text-from-image-pdf` | What it does Reads the text in a scanned PDF or image and returns it as plain text, with line break… | 1600 |

## Endpoint reference

### Extract Text from Image or PDF

`POST https://api.eu.apyhub.com/skavio/extract-text-from-image-pdf` · 1600 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file_name` | body | string | yes | File name with extension (pdf, png, jpg, jpeg, tif, tiff, webp, bmp, gif, txt). |
| `file_base64` | body | string | yes | Base64-encoded file (max 20 MB decoded). |

#### Quickstart

Read the text from a PNG image.

```bash
curl -X POST "https://api.eu.apyhub.com/skavio/extract-text-from-image-pdf" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "file_name": "scan.png",
    "file_base64": "iVBORw0KGgo..."
  }'
```

#### What you'll get back

A real response for an image with the text "Hello World 12345":

```json
{
  "text": "Hello World 12345",
  "pages": 1,
  "status": "completed",
  "usage": { "atoms": 800, "units": 1, "unit": "page" },
  "request_id": "4f19fa68-8586-440f-8d84-ed0656f305ac-8f54b458"
}
```

## About

## What it does

The OCR API reads text from scanned documents and images. Send the file as `file_base64` with its `file_name`, and get back the extracted `text` and the number of `pages`.

It handles photos and scans as well as clean images. In our tests it read rotated, blurred and low-quality JPG images correctly. Supported files are PDF, PNG, JPG, TIFF, WEBP, BMP and GIF, up to 20 MB. Each request can contain up to 2 pages, so split longer PDFs and send the parts separately. An image with no text returns an empty `text` field.

The response is plain text with line breaks kept, ready for search, classification or storage.

Teams use the OCR API to digitize scanned records and read text from uploaded photos and screenshots. It also feeds document pipelines that need text first.

To translate the text, use the [Text Translation API](https://apyhub.com/sharpapi/service/translate-text). To remove names and phone numbers before you store it, use the [Text Anonymization API](https://apyhub.com/apyhub/service/anonymize-text).

## 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/skavio/service/extract-text-from-image-pdf
