Get Preprint Full Text
biorxiv_get_fulltextRetrieve a preprint's full text as best-effort Markdown, extracted from its rendered HTML article page. Resolves the latest version via the details API, then fetches and extracts the body — abstract, sections, and references. bioRxiv and medRxiv share the 10.1101/ DOI prefix, so server="both" (the default) resolves the DOI against both in parallel and the response reports which server answered. This is HTML-to-Markdown extraction, not structured JATS: section structure is approximate and not guaranteed. Long articles exceed a single response, so use offset and limit to page through them (the response reports totalChars, remainingChars, and hasMore); paging is cheap because the extracted article is cached per version for an hour after the first read, so only the first chunk pays for a fetch. Not every preprint has an extractable HTML page — some are PDF-only and some origins block programmatic access — in which case a fulltext_unavailable error routes you to biorxiv_get_preprint for the title, abstract, and metadata. For a preprint that has been published in a journal, the journal's version may have richer full text elsewhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doi | Yes | Preprint DOI (e.g. 10.1101/2024.05.28.596311 or 10.64898/2026.05.07.723463). The latest version is resolved automatically. | |
| limit | No | Maximum number of characters to return in this chunk. Default 20,000; increase toward 50,000 for large context windows. Check the length field for the actual count returned. | |
| offset | No | Character offset into the full extracted text at which to start reading. 0 returns the beginning. To read the next chunk, use offset = prior_offset + prior_length (the length field from the previous response). | |
| server | No | Server the preprint was posted on. "both" (default) checks bioRxiv and medRxiv in parallel to resolve the DOI — the full-text fetch itself only ever targets whichever server resolved, and the output server field names it. | both |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | The limit (max characters) applied to this chunk. | |
| doi | No | The resolved preprint DOI. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Characters returned in this chunk. | |
| title | No | Article title detected during extraction. Absent when the page exposed none. | |
| length | No | Number of characters returned in this chunk. | |
| notice | No | Paging guidance when the content was truncated — how to fetch the next chunk. | |
| offset | No | Character offset into the full extracted text where this chunk begins. | |
| server | No | Server the preprint was resolved on. | |
| content | No | The requested chunk of full text as best-effort Markdown extracted from the rendered HTML page. Section structure is approximate — this is not JATS. | |
| hasMore | No | True when more text follows this chunk. When true, call again with offset = offset + length. | |
| version | No | Preprint version whose full text was retrieved (the latest revision). | |
| sourceUrl | No | The full-text HTML page the content was extracted from. | |
| truncated | No | True when this chunk was capped by limit and more text remains. | |
| wordCount | No | Approximate word count of the FULL extracted article as reported by the extractor (not just the returned chunk). Absent when the extractor reported none. | |
| totalChars | No | Total characters in the full extracted text. Use with offset and length to page through long articles. | |
| contentFormat | No | How content was produced: Markdown extracted from the rendered HTML article page (constant). | |
| remainingChars | No | Characters remaining after this chunk (totalChars - offset - length). 0 means this chunk reaches the end. |