Prompt
OCR API with JSON output and bounding boxes
Latest observation
Oct 11, 2026
OpenAI APIWeb search: off
If you want an OCR API that returns JSON output with bounding boxes, the main options are:
Common OCR APIs
1. Google Cloud Vision OCR
- Returns text plus bounding boxes for pages, blocks, paragraphs, words, and symbols.
- Output is JSON via API response.
- Good for general-purpose OCR and document layout extraction.
2. Amazon Textract
- Strong for documents/forms/tables.
- Returns structured JSON with bounding boxes for words, lines, key-value pairs, and tables.
- Best if you need document analysis, not just plain OCR.
3. Azure AI Vision / Document Intelligence
- OCR with JSON response and bounding boxes.
- Good support for layout, forms, invoices, and multi-page documents.
4. Tesseract OCR
- Open-source engine.
- Can output bounding boxes and confidence values, but you typically wrap it yourself to produce JSON.
- Best if you want self-hosted and low cost, but less polished than cloud APIs.
5. Mindee / OCR.Space / Abbyy / Nanonets
- Various OCR APIs that provide JSON and bounding boxes.
- Often easier to integrate for specific document types.
What to look for
When choosing, check whether the API returns:
- Bounding box coordinates for each word/line/block
- Confidence scores
- Page number
- Reading order
- Structured elements like tables, key-value pairs, or paragraphs
Example JSON shape
A typical OCR response might look like:
{
"text": "Hello world",
"pages": [
{
"page": 1,
"width": 2480,
"height": 3508,
"blocks": [
{
"text": "Hello",
"confidence": 0.99,
"bbox": [100, 200, 180, 240]
},
{
"text": "world",
"confidence": 0.98,
"bbox": [190, 200, 280, 240]
}
]
}
]
}
Recommendation
- Need document parsing / forms / tables: Amazon Textract or Azure Document Intelligence
- Need generic OCR with boxes: Google Cloud Vision
- Need self-hosted/open-source: Tesseract + your own JSON wrapper
If you want, I can also give you:
- a comparison table,
- a sample request/response for one API, or
- a Python/Node example that calls an OCR API and parses bounding boxes.