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

# Full text in the API

> How the Consensus API uses full text to find papers, and how to get the passages inside each paper that answer your query.

Abstracts leave out most of what you need: doses, methods, measured values, limitations. The Consensus API uses full text in two places — to find the right papers, and to return the passages inside them that answer your query.

|               | What it does                                                                                                                                                                                  | Availability                              |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
| **Retrieval** | Queries are matched against titles, abstracts, and full text where available, so a paper can rank on what's in its methods or results. See [how search works](/get-started/how-search-works). | Every request                             |
| **Excerpts**  | With `include_full_text_chunks=true`, each eligible result carries the passages from its body most relevant to your query.                                                                    | Paid plans (Pro, Deep, Teams, Enterprise) |

## Request excerpts

Add `include_full_text_chunks=true` to any search. Nothing else about the request changes.

<CodeGroup>
  ```bash cURL theme={null}
  curl -G "https://api.consensus.app/v1/search" -H "x-api-key: $CONSENSUS_API_KEY" \
    --data-urlencode "query=what dose of creatine improves working memory" \
    --data-urlencode "include_full_text_chunks=true"
  ```

  ```python Python theme={null}
  import os, requests

  resp = requests.get(
      "https://api.consensus.app/v1/search",
      headers={"x-api-key": os.environ["CONSENSUS_API_KEY"]},
      params={"query": "what dose of creatine improves working memory", "include_full_text_chunks": True},
      timeout=30,
  )
  resp.raise_for_status()

  for paper in resp.json()["results"]:
      for chunk in paper.get("full_text_chunks") or []:
          section, _, passage = chunk.partition(" | ")
          print(paper["doi"], "·", section.removeprefix("Section: "), "·", passage[:120])
  ```
</CodeGroup>

A real response, trimmed to one result with shortened excerpts:

```json wrap theme={null}
{
  "results": [
    {
      "title": "Creatine and improvement in cognitive function: Evaluation of a health claim pursuant to article 13(5) of regulation (EC) No 1924/2006",
      "journal_name": "EFSA Journal",
      "publish_year": 2024,
      "doi": "10.2903/j.efsa.2024.9100",
      "url": "https://consensus.app/papers/creatine-and-improvement-in-cognitive-function-turck-bohn/7e703e828b815257b31687a25eceac9d/",
      "takeaway": "Creatine supplementation has not been established as a cause-and-effect relationship for improving cognitive function in one or more domains.",
      "full_text_chunks": [
        "Section: Human intervention studies in healthy individuals conducted under normal conditions | Two studies had an initial loading phase of 20 g/day of creatine for 5 days, followed by 5 g/day … A significant improvement in working memory, as measured by the Backwards Digit Span test, was observed only in the study of shorter duration …",
        "Section: Weighing of the evidence | … the acute effect of creatine on working memory reported in some studies at doses of 20 g/day given for 5-7 days … was not observed at lower creatine doses, ranging from 2.2 to 14 g/day …"
      ]
    }
  ]
}
```

The `takeaway` gives you the paper's conclusion. The excerpts give you the doses and study designs behind it, which the abstract doesn't.

## What comes back

<AccordionGroup>
  <Accordion title="Format" icon="brackets">
    `full_text_chunks` is a list of strings. Each one starts with the section of the paper it came from, then the passage: `Section: <heading> | <passage>`. Split on the first `|` to separate them.
  </Accordion>

  <Accordion title="How many excerpts" icon="layers">
    Up to **3 excerpts per paper**, and up to **60 per request**. Excerpts are the passages most relevant to your query across the whole page of results, so on a large page some eligible papers may carry fewer than 3, or none.
  </Accordion>

  <Accordion title="When a paper has none" icon="circle-slash">
    `full_text_chunks` is `null` when a paper isn't eligible or no passage matched your query. Fall back to `abstract` and `takeaway` for those papers.
  </Accordion>
</AccordionGroup>

## Which papers have excerpts

Excerpts come from papers with an **open-access PDF**. Retracted papers never carry them.

<Note>
  Consensus also reads paywalled full text from its [publisher partners](/get-started/full-text-access) to power analysis inside the Consensus app. That text improves what the app can do, but it isn't returned as excerpts through the API.
</Note>

When excerpts matter more than coverage, add `open_access=true` so your results are limited to open-access papers.

## Plan availability

Excerpts are available on all paid plans: Pro, Deep, Teams, and Enterprise. On a Free plan, a request with `include_full_text_chunks=true` returns `403` with the code `feature_not_allowed`. Retrieval over full text works on every plan.

The [MCP server](/consensus-mcp)'s `search` tool accepts the same option on paid plans, so an assistant can quote passages when you ask for excerpts from the full text.

## Get the most out of excerpts

* **Phrase the query as the thing you want to find.** Excerpts are chosen against your query, so "what dose of creatine improves working memory" returns dosing passages where "creatine" returns general ones.
* **Keep each excerpt with its paper.** Store the `doi` and `url` alongside every passage so an answer built on it stays citable.
* **Say which evidence you used.** When `full_text_chunks` is `null` and you fall back to the abstract, tell the reader.
* **Read the paper for anything high-stakes.** Excerpts are passages, not whole papers. Follow `url` to the paper.

## Related

<CardGroup cols={2}>
  <Card title="Extract numbers from full-text papers" icon="table" href="/use-cases/extract-values-from-full-text">
    A worked example that pulls values and their conditions out of excerpts.
  </Card>

  <Card title="Full text access" icon="book-open" href="/get-started/full-text-access">
    Where Consensus's full text comes from, and how the app uses it.
  </Card>

  <Card title="Search endpoint reference" icon="code" href="/api-reference/query-for-relevant-papers">
    Every parameter and response field.
  </Card>

  <Card title="What you can build" icon="compass" href="/use-cases">
    Internal tools, scientific agents, and research systems built on the API.
  </Card>
</CardGroup>
