---
title: "Extract Text from Bulk Images & Scanned PDFs API"
slug: extract-text-from-bulk-images-and-pdfs
url: https://apyhub.com/martin10291/service/extract-text-from-bulk-images-and-pdfs
provider: Martin Petrov
categories: [Ingestion Kit, Document Intelligence Kit, Media Kit]
tags: [ocr, pdf-ocr, document-digitization, text-extraction, bounding-boxes, scanned-documents]
auth: api_key
version: 1.0
service_type: sync
endpoints: 1
atoms: 100
mcp: true
---

# Extract Text from Bulk Images & Scanned PDFs API

Extract line or word OCR from public image links and PDFs. Returns count and items, with optional per-page OCR, languages, and page limits.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/martin10291/extract-text-from-bulk-images-and-pdfs` | What it does Reads text from one or more public image or PDF URLs and returns one result per image… | 100 |

## Endpoint reference

### Image to Text OCR - Scanned PDF OCR

`POST https://api.eu.apyhub.com/martin10291/extract-text-from-bulk-images-and-pdfs` · 100 atoms · accepts `application/json` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `urls` | body | array of string | yes | Direct public links to images (png, jpg, webp, tiff, bmp, gif) or PDF files. One result per image and per PDF page. Max 100 items; private and local addresses are rejected. Example: `["https://www.w3… |
| `forceOcr` | body | boolean | no | Run OCR on every PDF page, even pages that already have a text layer. Default: `false`. Example: `false`. |
| `languages` | body | array of string | no | Languages of the text, used only for pages read by OCR. Send several for mixed text. Default: `["eng"]`. Example: `["eng"]`. |
| `outputMode` | body | string | no | lines: every text line with confidence and bounding box. words: every word with confidence and bounding box (OCR pages only). One of: lines, words. Default: `lines`. Example: `lines`. |
| `maxPagesPerPdf` | body | integer | no | Read at most this many pages from each PDF, from page 1. Omit to read all pages. Example: `20`. |

#### Quickstart

Send one public image or PDF URL to get its text back line by line.

```bash
curl -X POST "https://api.eu.apyhub.com/<provider-slug>/image-to-text-ocr-scanned-pdf-ocr-per-line" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls":["https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"],"forceOcr":true}'
```

#### What you'll get back

Returns a JSON object with `billed`, `count` and an `items` array. Each item holds the text of one image or PDF page, how it was read (`ocr` or `text-layer`), a mean confidence score, and the `lines` (or `words`) with their own confidence and bounding box.

```json
{
  "billed": 1,
  "count": 1,
  "items": [
    {
      "sourceUrl": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
      "page": 1,
      "method": "ocr",
      "text": "Dummy PDF file",
      "meanConfidence": 95.3,
      "width": 1653,
      "height": 2339,
      "lines": [
        {
          "text": "Dummy PDF file",
          "confidence": 95.3,
          "bbox": [161, 200, 338, 43]
        }
      ]
    }
  ]
}
```

## About

## What it does
The Scanned PDF OCR API turns images and PDFs into machine-readable text. Send up to 100 public file links in `urls` (PNG, JPG, WEBP, TIFF, BMP, GIF or PDF) and get back a JSON object with a `count`, a `billed` page total and an `items` array holding one result per image or PDF page, in the order you sent them.

Choose `outputMode` `lines` for text lines or `words` for single words, each with a confidence score and a bounding box. PDF pages that already contain a text layer are read directly, which is exact and fast; set `forceOcr` to `true` to run OCR on every page instead. Use `languages` to pick the OCR language (English, German, French, Spanish, Italian, Portuguese, Bulgarian, Russian, or a mix), and `maxPagesPerPdf` to cap how many pages are read from each PDF.

Use it to digitise scanned contracts, archived forms, receipts and exported reports, or to feed document text into search, review and RAG pipelines. You pay per page read; blank pages and files that cannot be read are not charged.

## 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/martin10291/service/extract-text-from-bulk-images-and-pdfs
