---
title: "Get OCR word bounding boxes"
method: GET
path: "/vault/{id}/objects/{objectId}/ocr-words"
tags: ["Vaults"]
---

# Get OCR word bounding boxes

`GET /vault/{id}/objects/{objectId}/ocr-words`

Retrieves word-level OCR bounding box data for a processed PDF document. Each word includes its text, normalized bounding box coordinates (0-1 range), confidence score, and global word index. Use this data to highlight specific text ranges in a PDF viewer based on word indices from search results.

## Path parameters

- `id` string, required
- `objectId` string, required

## Query parameters

- `page` integer
- `wordStart` integer
- `wordEnd` integer

## Response `200`

Successfully retrieved OCR word data

- object
  - `objectId` string — The object ID
  - `pageCount` integer — Total number of pages in the document
  - `totalWords` integer — Total number of words extracted from the document
  - `pages` object[] — Per-page word data with bounding boxes
    - `page` integer — Page number (1-indexed)
    - `words` object[]
      - `text` string — The word text
      - `bbox` number[] — Bounding box [x0, y0, x1, y1] normalized to 0-1 range
      - `confidence` number, nullable — OCR confidence score (0-1)
      - `wordIndex` integer — Global word index across the entire document (0-based)
  - `createdAt` string, date-time — When the OCR data was extracted

## Other responses

- `400` — Bad request - missing parameters or object not processed yet
- `401` — Unauthorized - invalid API key
- `403` — Forbidden - API key lacks vault service access
- `404` — Object or vault not found, or no OCR word data available (non-PDF document)

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
