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

# Values from a paper's tables, not its abstract

> Find a paper by its DOI and take its results from the table they are printed in, cell by cell, with the formula of its method as TeX. Each value in your comparison names its table, its row, and its page.

An agent that compares 40 trials reads their abstracts, because abstracts are short. The abstract says that the treatment "significantly reduced events". The numbers that a meta-analysis needs, the events and the size of each group, are in Table 2 on page 6. This page builds a run that takes each value from the table it is printed in, and the formula from the method.

## The run in 5 steps

### Find the paper by its DOI

A title finds several versions of a paper and the articles that cite it. A DOI finds the paper. This search has no words at all, and fetches the paper in the same call.

```json Request body of search theme={"theme":"css-variables"}
{
  "subject_identifiers": [{"scheme": "doi", "value": "PAPER_DOI"}],
  "contents": { "top": 1, "max_characters": 0},
  "deterministic_only": true
}
```

Replace `PAPER_DOI` with the DOI of the paper.

With `max_characters` set to `0`, the paper comes back as its outline: one row for each section, with its size. Your agent sees "Methods" and "Results" with their sizes before it reads a word.

A DOI can resolve to a page that has only the abstract. The full text is then a file that the page links to. List the links of the record that have the kind `file`, and fetch the PDF.

### Check which version you have

A result can have `declared`, which is what the datasource states about the item. This part of the result is cut to 4 of its fields.

```json Part of the result theme={"theme":"css-variables"}
{
  "declared": {
    "item_type": "journal-article",
    "version_label": "Version of Record",
    "open_access_status": "gold",
    "license": "CC BY 4.0"
  }
}
```

A preprint and the published article can differ in their numbers. `version_label` says which of them this is, in the datasource's own words. `status` says what the datasource states about the item's standing, for example that it was retracted, where the datasource states that.

### Take the results from the table

Ask the record for its tables. This response is cut to the table of one block.

```json Part of the response theme={"theme":"css-variables"}
{
  "kind": "table",
  "page_number": 6,
  "table": {
    "caption": "Table 2. Primary and secondary outcomes",
    "rows": [
      ["", "Treatment", "Treatment", "Placebo", "Placebo"],
      ["Outcome", "Events", "Patients", "Events", "Patients"],
      ["Primary endpoint", "31", "263", "58", "266"]
    ],
    "spans": [
      { "row": 0, "column": 1, "row_span": 1, "column_span": 2 },
      { "row": 0, "column": 3, "row_span": 1, "column_span": 2 }
    ],
    "header_rows": [0, 1],
    "header_columns": [0],
    "basis": "structure"
  }
}
```

The table has 2 merged headings, and the text of each is in both slots it covers. So the number `31` is read with its 3 headings: primary endpoint, treatment, events. As plain text the same row is "31 263 58 266", and nothing says which number is which.

### Take the formula from the method

Ask for the blocks of the kinds `math` and `code`. A formula comes as TeX, and a code listing comes with its language.

```json Part of the response theme={"theme":"css-variables"}
{
  "kind": "math",
  "page_number": 4,
  "text": "RR = \\frac{a / n_1}{c / n_2}"
}
```

Your agent now has the formula and its 4 inputs, and can compute the relative risk itself: 31 of 263 against 58 of 266 is 0.54. If the paper prints another value, that is a finding. The arithmetic of a paper is not checked for you, and the cells are there so that your code can check it.

### Cite each value by its cell

Each row of your comparison then names where its values come from.

```json What your agent stores for one value theme={"theme":"css-variables"}
{
  "value": 31,
  "source": "Table 2, row Primary endpoint, column Treatment, Events, page 6",
  "doi": "PAPER_DOI",
  "contents_id": "CONTENTS_ID",
  "block_id": "BLOCK_ID"
}
```

`CONTENTS_ID` and `BLOCK_ID` are the ids of the record and of the table's block, as the responses return them.

## What the statistician can check

| The statistician asks | What the run has |
| - | - |
| Where is this number from? | The table, the row, the column, and the page. |
| Is it the published version? | The version, as the datasource states it. |
| How was the effect computed? | The formula of the method, as TeX. |
| Do the numbers agree with the paper's own result? | The cells, so the result can be computed again. |

## Know the limits

A table comes cell by cell where the file says what its rows and columns are. The tables of a scan and of a PDF without structure come as text, and `basis` on a table says which it is.

A formula is a `math` block where the file has the structure of the formula. A formula that is only a picture comes as flat text or not at all. Text inside a figure is not read on a paper that has text of its own.

A paper behind a paywall is not fetched. The result says that the page asks for payment or a sign-in, and a person with access can upload the PDF.

For the calls, see [Get every table, cell by cell](https://docs.getclean.ai/read/tables-and-blocks.md) and [Find the exact paper, case, or company by its identifier](https://docs.getclean.ai/find/identifiers.md).


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