> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getclean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> getclean's own MCP server is at https://mcp.getclean.ai/mcp. The /mcp path of this docs site is Mintlify's search over these pages, not getclean.
> Every answer of the API opens with outcome. A page that could not be read is a record whose outcome says why, never an HTTP error; read outcome before anything else.
> The API's contract is the OpenAPI 3.1 file at https://docs.getclean.ai/openapi.yaml; the SDKs are generated from it.
> The product's name is written getclean, in lower case.

# Scanned public records, searched with the page as proof

> Upload a release of scanned records and find a name on every page that has it. Each place comes with its page number, a number for how sure the reading is, and a picture of the page to check it against.

A newsroom gets 1,400 scanned pages in 9 files after a records request: minutes, invoices, letters, some with stamps across the text. A reporter needs every page that names one contractor before the story runs on Friday. A plain search of recognized text finds 11 pages and gives no sign of the pages on which the name was read wrongly. This page builds a search of scans in which each place has its page, its confidence, and a picture to check it against.

## The run in 4 steps

### Upload each file as a job

Send each file once. A long scan is read as a job, page by page, and the record follows when the job is done. A scan has no headings, so its outline has one row for each page.

### Search every record for the names

Send the names against each record as strings to find. One call takes 5 strings, so send the name as the records can spell it: in full, in its short form, and the surname of its director. The last string here is a question.

```json Request body of highlight_contents theme={"theme":"css-variables"}
{
  "highlights": [
    "CONTRACTOR_NAME",
    "CONTRACTOR_SHORT_NAME",
    "DIRECTOR_SURNAME",
    "CONTRACT_NUMBER",
    "Who approved the payment?"
  ],
  "max_characters": 0
}
```

Replace the 4 placeholders with the names and the number as the records can have them.

A name is matched word for word, and a difference in upper and lower case is passed over. The question is given to a model, which picks the passages that bear on it.

### Read each place with its confidence

Each place comes with its page and with a number from 0 to 1 for how sure the recognition of those words was. These 2 places are from one file, cut to the fields that this step explains.

```json Part of the response theme={"theme":"css-variables"}
{
  "highlights": [
    { "query_index": 0, "basis": "exact", "page_number": 212, "confidence": 0.97 },
    { "query_index": 3, "basis": "exact", "page_number": 388, "confidence": 0.64 }
  ]
}
```

The name on page 212 was read with a confidence of 0.97. The contract number on page 388 was read with 0.64, so the reporter looks at that page before it is quoted.

### Check a page against its picture

Each scanned page comes with a picture of it, for as long as the record is stored. The reporter opens the picture of page 388 beside the recognized words, and the story quotes what the paper says.

A page that was recognized with a low confidence as a whole is named in a notice. Those pages are the ones on which a name can be present and not found, and a person reads them.

## What the editor can check

| The editor asks | What the search has |
| - | - |
| On which page is that? | The file and the page of each place. |
| Is that what the paper says? | The picture of the page, beside the words as recognized. |
| Could a page have been missed? | The pages that failed, and the pages read with a low confidence. |
| Did a model choose this passage? | Each place says `exact`, `near`, or `judged`. |

## Know the limits

A match does not pass over an error of the recognition. A name that was read as another word is not found, which is why the pages with a low confidence go to a person.

Handwriting comes as flat text or not at all, and no notice says so. A blacked-out part of a page is not reported as such.

A file can have at most 100 MiB. A record is stored for 48 hours after its last use and for at most 30 days, so download the pictures of the pages that the story rests on.

For the calls, see [Turn PDFs, Office files, and scans into evidence you can cite by page](https://docs.getclean.ai/read/pdfs-scans-and-documents.md) and [Highlight the evidence for each question](https://docs.getclean.ai/read/highlight-passages-and-answers.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.