Raw schema
{
"type": "object",
"properties": {
"pmcids": {
"description": "PMC IDs to fetch (e.g. [\"PMC9575052\"]). Provide exactly one of `pmcids`, `pmids`, or `dois`. PMC IDs with no retrievable full text fall through to Europe PMC, then to Unpaywall on the DOI the chain resolves for them.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^(?:PMC)?\\d+$"
}
},
"pmids": {
"description": "PubMed IDs. Provide exactly one of `pmcids`, `pmids`, or `dois`. Articles in PMC are returned as structured JATS; articles not in PMC fall through to Europe PMC (when EPMC has a `fullTextXML`), then to Unpaywall when `UNPAYWALL_EMAIL` is set and a DOI is available.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^\\d+$"
}
},
"dois": {
"description": "DOIs to resolve (e.g. [\"10.21203/rs.3.rs-9010375/v1\"]), one per element. Provide exactly one of `pmcids`, `pmids`, or `dois`. Resolved to a PMCID via the PMC ID Converter and returned as structured JATS when the article is in PMC; DOIs with no PMC counterpart (preprints, EPMC-only OA) fall through to Europe PMC, then Unpaywall, when those layers are enabled.",
"minItems": 1,
"maxItems": 10,
"type": "array",
"items": {
"type": "string",
"pattern": "^10\\.[^\\s,]+\\/[^\\s,]+$"
}
},
"includeReferences": {
"default": false,
"description": "Include reference list. Applies to `source=pmc` results only.",
"type": "boolean"
},
"includeTables": {
"default": true,
"description": "Include the article's tables โ cells, captions, labels and footnotes. On by default because a dropped table takes its numbers with it. Table-dense articles pay for it: rendered tables typically add 12โ17% to an article record and can more than double it. Set false to omit them, or cap the cost with `maxCharacters`, which drops tables it cannot fit whole. Applies to `source=pmc` results only.",
"type": "boolean"
},
"includeAssets": {
"default": true,
"description": "Include the article's figures and supplementary material โ `assets[]`, each with its label, caption, enclosing section and deposit pointer. On by default because it is cheaper than tables: a median asset-bearing article grows about 10%, and the body prose already refers to these by label. Set false to omit them, which also removes the `[Figure: โฆ]` / `[Supplementary: โฆ]` markers from the section text, since without the array they point at nothing. Prose-shaped blocks โ lists, definition lists, block quotes, boxed text, preformatted blocks, displayed formulae โ are section text rather than assets and this switch never affects them. Applies to `source=pmc` results only.",
"type": "boolean"
},
"maxSections": {
"description": "Maximum top-level body sections. Applies to `source=pmc` results only.",
"type": "integer",
"minimum": 1,
"maximum": 50
},
"sections": {
"description": "Filter to specific sections by title (e.g. [\"Introduction\", \"Methods\", \"Results\", \"Discussion\"]). A term matches a section or subsection title at any nesting depth, case-insensitively, as a substring โ \"resul\" matches \"Results\". A section whose own title matches is returned whole; one kept only because a nested subsection matched keeps its heading as a breadcrumb, with its own text cleared and only the matching branch beneath it. Tables and assets narrow with the filter: one whose section did not survive, or that names no section, is dropped. Applies to `source=pmc` results only.",
"type": "array",
"items": {
"type": "string"
}
},
"maxCharacters": {
"description": "Per-article budget for body text, in characters. Counts `source=pmc` section and subsection text โ which carries the inline blocks the parser renders in place, such as lists, definition lists, block quotes, boxed text, preformatted blocks and displayed formulae โ plus table label, caption, cell and footnote text and asset label, caption and `href` text; or the `source=unpaywall` `content` body. Titles, abstracts, identifiers, and references are never counted or shortened. The counted unit is that text alone โ the Markdown grid `content[]` renders around the cells (pipes, padding, the divider row, headings) is scaffolding this budget does not measure, so a table renders longer than it costs here. Sections are served first, then tables, then assets, each spending what is left, in document order โ admission stops at the first entry that does not fit, and every entry from there on is dropped whole rather than cut mid-row or returned with a shortened caption, counted in `truncation.omittedTables` / `truncation.omittedAssets` and named in `truncation.articles[].omittedTableNames` / `omittedAssetNames`. Applied after `sections`, `maxSections`, `includeReferences`, `includeTables`, and `includeAssets`, so semantic filtering is unaffected. This knob alone bounds only bodies: the response-wide ceiling it implies is this value times the number of articles returned, plus every uncounted field. Use `maxResponseCharacters` for a true whole-response ceiling. Omit for the full body.",
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"maxCharactersPerSection": {
"description": "Budget for a single top-level body section, in characters, counting the section text plus its subsections. Combine with `maxCharacters` to cap both one section and the article; the tighter of the two wins. Applies to `source=pmc` results only.",
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"maxResponseCharacters": {
"description": "Opt-in ceiling for the whole response, in characters โ the true response-wide counterpart to the per-article `maxCharacters`. Each article is measured as the JSON record it is returned as, after every filter and the per-article body budget: title, abstract, body sections, references, identifiers, license and source metadata โ every field it carries. One ledger covers all tiers, so PMC-, Europe PMC-, and Unpaywall-served articles spend the same budget. Articles are kept in response order until the next one would cross the ceiling; that article and the rest are deferred whole (never partially populated) and listed in `deferred.ids`. Response envelope fields โ counts, `unavailable`, `truncation`, `deferred` itself โ are not counted. Omit to return every resolved article.",
"type": "integer",
"minimum": 1,
"maximum": 1000000
},
"overflowMode": {
"default": "truncate",
"description": "How to spend `maxCharacters` across an article that exceeds it. truncate: fill sections in document order, so early sections stay whole and sections past the budget are dropped (counted in `truncation.omittedSections`). outline: split the budget evenly so every section keeps its heading, and an excerpt as far as the budget reaches โ use it to survey what an article contains before requesting specific `sections`. Ignored when no budget is set, and identical for `source=unpaywall` bodies, which have no headings to preserve.",
"type": "string",
"enum": [
"truncate",
"outline"
]
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}