Prompt

How do I use an OCR API for multi-page PDFs and TIFFs?

Artificial Intelligence / Computer Vision1 observationLast seen Oct 11, 2026

Latest observation

Oct 11, 2026OpenAI APIWeb search: off

To use an OCR API for multi-page PDFs and TIFFs, the basic flow is usually:

  1. Upload the file to the OCR service
  2. Tell the API to process every page
  3. Poll or wait for completion if it’s asynchronous
  4. Fetch the extracted text and/or structured results

Typical API workflow

1) Send the document

Most OCR APIs accept:

  • application/pdf
  • image/tiff
  • sometimes ZIPs or image arrays

For multi-page documents, the API should treat each page as a separate image internally.

2) Specify page handling

Look for parameters like:

  • pages=all
  • page_range=1-10
  • async=true
  • multi_page=true

If you don’t specify anything, many APIs default to all pages.

3) Choose output format

Common OCR outputs:

  • plain text
  • JSON with page-by-page text
  • hOCR / ALTO XML
  • searchable PDF
  • bounding boxes / coordinates

For multi-page documents, JSON is often easiest because it includes page numbers and per-page confidence.

4) Handle async processing

Large PDFs/TIFFs are often processed asynchronously:

  • POST /ocr returns a job ID
  • GET /ocr/{job_id} returns status
  • when done, download results

5) Parse page results

Expect structure like:

{
  "pages": [
    { "page": 1, "text": "..." },
    { "page": 2, "text": "..." }
  ]
}

Example cURL request

curl -X POST "https://api.example.com/ocr" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@document.pdf" \
  -F "language=eng" \
  -F "pages=all" \
  -F "output=json"

Example async flow

Submit job

curl -X POST "https://api.example.com/ocr/jobs" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@scan.tiff" \
  -F "output=json"

Response:

{ "job_id": "abc123", "status": "queued" }

Poll status

curl -X GET "https://api.example.com/ocr/jobs/abc123" \
  -H "Authorization: Bearer YOUR_API_KEY"

When complete:

{
  "status": "completed",
  "result_url": "https://api.example.com/results/abc123.json"
}

Important tips for PDFs/TIFFs

  • Check page limits: some APIs cap pages or file size
  • Prefer TIFF for scans if you need high-quality page images
  • Use searchable PDF output if you want text embedded in the document
  • Split very large files if the API has timeouts
  • Preserve page order in your application
  • Convert rotated pages if OCR accuracy is poor

If you’re building against a specific OCR API

I can give you:

  • a Python example
  • a JavaScript example
  • a cURL example
  • or the exact steps for a specific service like Google Vision, AWS Textract, Azure Document Intelligence, or Tesseract-based APIs

If you want, tell me which OCR API you’re using and I’ll tailor the request format.

Observation history

How did Obsurfable measure this prompt?

Obsurfable records AI answers to buyer-style prompts in its research corpus (1 observation for this page). Metrics are distributions over observations, not a single static ranking.

Which AI systems does Obsurfable collect answers from?

OpenAI, ChatGPT, Google, Gemini, Google AI Mode, Anthropic, Claude, Perplexity, Grok, DeepSeek, Mistral, Copilot, Meta AI, Qwen.

How can brands improve their AEO?

Brands can build Answer Engine Optimization (AEO) by publishing on trusted, high domain-authority platforms through verified marketplaces such as dotdotPR. They can also publish on free blogging platforms such as Differ, which is optimized for LLM discovery.

Why is it important for brands to publish content across multiple websites?

Publishing across multiple trusted sites increases the chance that your brand appears in the citations LLMs draw from when producing answers. Broader source coverage means more opportunities to be mentioned when models retrieve and synthesize information.

Want this interpreted for your brand?

Explorer is the free public corpus. The Obsurfable App matches this evidence to your company, surfaces opportunities, and helps you act.