> ## 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.

# Sections and blocks

> Every part of a record has an address. A section is a heading with everything under it, and a block is one unit of content, such as a paragraph, a table, or an image. A passage is cited by its block, its page, and its words.

The content of a record comes as one Markdown string by default, and inside it are sections and blocks, each with an id. These ids are the addresses that make a long source readable in parts and a passage citable.

## A section is a heading with everything under it

A section starts at a heading and runs to the next heading of the same level or a higher one. The outline of a record lists the sections, each with its id, its title, its level, and its size in characters. The size includes the sections under it.

The text before the first heading is a section too, with the id `s0`. On a source without headings, `s0` is the whole text.

Sections come from the source. On a web page they are the page's headings. In a document they are the document's own structure or, in a PDF without structure, the PDF's own outline. A scan, or a document with neither, gets one section for each page. The field `basis` on a section says which of these it is.

## A block is one unit of content

A block is the smallest part with an address, such as one paragraph, one heading, one table, or one image. A block has an id, a kind, the section it is in, and its size.

| Kind | What the block is |
| - | - |
| `text` | A paragraph, or a list with its items. |
| `heading` | A heading. |
| `table` | A table, with its rows, its merged cells, and its headings. |
| `image` | An image, with its address, its caption, and its size. |
| `code` | A code listing, with its language where the source states it. |
| `math` | A formula, as TeX. |
| `embed` | A frame from another site. |
| `media` | An audio or a video file. |
| `divider` | A rule between 2 parts of the content. |
| `interactive` | An interactive element of a page. |

These 3 blocks are from one scientific paper: a paragraph, the formula it introduces, and the code that computes it. Each block is cut to the fields that differ by kind.

```json 3 blocks of a paper theme={"theme":"css-variables"}
[
  {
    "kind": "text",
    "text": "Each run is scored with the **F1 measure**, the harmonic mean of precision and recall."
  },
  {
    "kind": "math",
    "text": "F_1 = \\frac{2PR}{P + R}"
  },
  {
    "kind": "code",
    "code_language": "python",
    "text": "def f1(precision, recall):\n    return 2 * precision * recall / (precision + recall)"
  }
]
```

Bold text in a paragraph comes as Markdown. The formula comes as TeX, and the code comes as one block with its language. None of the 3 is cut in the middle, because a block ends where the author ended it.

A paragraph that runs across a page break of a document is one block. A table that continues over several pages is one block too.

## A place has up to 5 parts

A highlight, a filled field, and a change in a comparison each come with a place.

| Part of the place | Where it applies |
| - | - |
| The section | Everywhere. |
| The block | Everywhere. |
| The page | On a document with pages. |
| The row and the column | Inside a table. |
| The words | Everywhere, as the source has them. |

A place is not a count of characters from the start of the text. Such a count changes with the format and with every mark that is added to the text. A block id does not.

The page has 2 fields. `page_number` is the position of the page in the file, and `page_label` is the label printed on the page, where the document declares one. A report cites "page iv" as the document prints it, and a program opens the 6th page of the file.

## Ids are the same on every read

The ids of a record's sections and blocks do not change, whatever the call and whoever makes it. Under one version and one configuration of getclean, a second fetch of the same source gives the same ids again.

Each view of a web page has its own ids. A block of the view `main` has another id in the view `whole_page`, so read a place in the view it was found in.


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