Skip to main content
The /cite endpoint allows you to find the exact location of text within a parsed document. Given a text string, it returns the bounding boxes where that text appears in the original document. This is useful for highlighting citations, building document viewers, or verifying extracted data against source locations.

Prerequisites

The document must be parsed with OCR data enabled:

Basic usage

Using a job ID

If you have a job ID from a previous parse operation, you can reference it directly:

Using a parse result directly

You can also pass the full parse result object:

Request format

Query object

Bounding box filter

When you want to search within a specific region of a page:

Response format

Text matching behavior

The endpoint normalizes text for matching:
  • Converts to lowercase
  • Removes punctuation
  • Collapses whitespace
This means a query for "Total Revenue" will match "total revenue", "Total Revenue", or "TOTAL REVENUE" in the document.

Multiple queries

You can search for multiple text strings in a single request. Results are returned in the same order as the queries:

Multi-line text

When the matched text spans multiple lines, the response includes separate bounding boxes for each line:

Error handling

Use cases

Highlighting extracted values

After extracting structured data, use /cite to highlight where each value appears in the original document:

Building document viewers

Use the bounding boxes to draw highlights or annotations on document pages in your application.

Data verification

Verify that extracted values actually appear in the expected locations within the source document.