Pubmed Fetch Fulltext
pubmed_fetch_fulltextFetch full-text articles from PubMed Central with structured sections and references. Falls back to Europe PMC and Unpaywall for articles not in PMC.
Instructions
Fetch full-text articles from PubMed Central with structured sections and references. When PMC misses, transparently falls back to Europe PMC fullTextXML (structured JATS for records with a PMC counterpart), then to Unpaywall — publisher-hosted or institutional open-access copies as HTML-as-Markdown or PDF-as-text. Provide exactly one of pmcids (PMC IDs directly), pmids (PubMed IDs, auto-resolved), or dois (preprints and EPMC-only OA records that lack PMID/PMCID).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pmcids | No | PMC IDs to fetch (e.g. ["PMC9575052"]). Provide exactly one of `pmcids`, `pmids`, or `dois`. | |
| pmids | No | 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. | |
| dois | No | DOIs to resolve (e.g. ["10.21203/rs.3.rs-9010375/v1"]). Provide exactly one of `pmcids`, `pmids`, or `dois`. Covers preprints and EPMC-only OA records that lack PMID/PMCID. Chain: Europe PMC search-by-DOI → fullTextXML → Unpaywall. | |
| includeReferences | No | Include reference list. Applies to `source=pmc` results only. | |
| maxSections | No | Maximum top-level body sections. Applies to `source=pmc` results only. | |
| sections | No | Filter to specific sections by title, case-insensitive (e.g. ["Introduction", "Methods", "Results", "Discussion"]). Applies to `source=pmc` results only. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| articles | Yes | Full-text articles | |
| totalReturned | Yes | Number of articles returned | |
| unavailable | No | Per-identifier explanations for any requested PMIDs, PMCIDs, or DOIs with no returnable full text. `idType` discriminates which branch the id came from. |