# OCR legal document pages with citations

**Use case:** 

OCR legal document pages with citations. Reusable page-aware JSON example for RAG, search, and agent workflows.

## Input

```json
{
  "url": "https://raw.githubusercontent.com/EchoEmpireUtility-bot/ocr-benchmark-fixtures/main/ocr-test-scan.pdf",
  "chunkSize": 3000,
  "overlap": 300
}
```

## Output

```json
{
  "documentIndex": {
    "label": "Document index",
    "format": "integer"
  },
  "documentTitle": {
    "label": "Document title",
    "format": "string"
  },
  "pageStart": {
    "label": "Page start",
    "format": "integer"
  },
  "pageEnd": {
    "label": "Page end",
    "format": "integer"
  },
  "chunkIndex": {
    "label": "Chunk index",
    "format": "integer"
  },
  "pageChunkIndex": {
    "label": "Page chunk index",
    "format": "integer"
  },
  "chunkId": {
    "label": "Chunk ID",
    "format": "string"
  },
  "ocrConfidence": {
    "label": "OCR confidence",
    "format": "number"
  },
  "ocrQualityScore": {
    "label": "OCR quality score",
    "format": "number"
  },
  "ocrQualityTier": {
    "label": "OCR quality tier",
    "format": "string"
  },
  "ocrQualityFlags": {
    "label": "OCR quality flags",
    "format": "array"
  },
  "characterCount": {
    "label": "Character count",
    "format": "integer"
  },
  "estimatedTokens": {
    "label": "Estimated tokens",
    "format": "integer"
  },
  "text": {
    "label": "OCR text",
    "format": "string"
  },
  "sourceUrl": {
    "label": "Source URL",
    "format": "string"
  }
}
```

## About this Actor

This example demonstrates how to use [OCR Citation Chunker](https://apify.com/skilled_glee/ocr-citation-chunker.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/skilled_glee/ocr-citation-chunker.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/skilled_glee/ocr-citation-chunker.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
