Skip to main content
GET
/
vault
/
{id}
/
objects
/
{objectId}
/
ocr-words
Get OCR word bounding boxes
curl --request GET \
  --url https://api.case.dev/vault/{id}/objects/{objectId}/ocr-words \
  --header 'Authorization: Bearer <token>'
{
  "objectId": "obj_abc123",
  "pageCount": 5,
  "totalWords": 2500,
  "pages": [
    {
      "page": 1,
      "words": [
        {
          "text": "The",
          "bbox": [
            0.12,
            0.71,
            0.15,
            0.75
          ],
          "confidence": 0.98,
          "wordIndex": 0
        },
        {
          "text": "witness",
          "bbox": [
            0.16,
            0.71,
            0.28,
            0.75
          ],
          "confidence": 0.99,
          "wordIndex": 1
        }
      ]
    }
  ],
  "createdAt": "2024-01-15T10:30:00Z"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

The vault ID

objectId
string
required

The object ID

Query Parameters

page
integer

Filter to a specific page number (1-indexed). If omitted, returns all pages.

wordStart
integer

Filter to words starting at this index (inclusive). Useful for retrieving words for a specific chunk.

wordEnd
integer

Filter to words ending at this index (inclusive). Useful for retrieving words for a specific chunk.

Response

Successfully retrieved OCR word data

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

createdAt
string<date-time>

When the OCR data was extracted