fulltext-article-downloader
fulltext-article-downloader is a Python package for programmatically downloading the full text of research articles from a DOI, arXiv id, PubMed Central id or OpenReview id. It chains together publisher APIs, open-access indexes and repositories in a fallback sequence, checks that what came back is really the requested article, and can be used from Python, from the command line, or by an AI agent through an MCP server or a Claude Code skill.
Video tutorial: https://youtu.be/fTtc4QWMYzE
Features
- Multiple retrieval methods – Elsevier, Wiley and Springer Nature APIs, CrossRef TDM links, Unpaywall, Europe PMC, OSTI (accepted manuscripts of DOE-funded articles), Semantic Scholar's open-access index, arXiv, ChemRxiv, bioRxiv/medRxiv, Zenodo, MDPI's CDN, and direct scraping for publishers that lack easy APIs (PLOS, eLife, Cambridge, APS).
- Automatic fallback logic – The package selects the best method based on the DOI's publisher; if one fails, the next is tried automatically.
- Verification – Every PDF is checked against the article's title, and supporting-information files and abstract-only records are rejected, so a returned file is the paper you asked for.
- Honest results – Each download reports which route produced the file and carries a note when it is a preprint or accepted manuscript rather than the publisher's version of record.
- Configurable tool order – Per-publisher method sequences are configurable; defaults cover most major publishers and preprint servers.
- Batch downloads – Concurrent downloads with publisher rate limits enforced, a
tqdm progress bar, and file logs that record which tool succeeded or why an identifier failed.
- Easy API-key management – Store credentials via environment variables or the interactive
fulltext-config script.
- Four entry points, one engine – Python API,
fulltext-download CLI, fulltext-mcp server for any MCP client, and a Claude Code plugin with a ready-made skill.
1. Installation
pip install fulltext-article-downloader
Optional extras enable additional routes and the MCP server:
| Extra | Adds |
|---|
mcp | the fulltext-mcp server (fastmcp) |
tls | a Chrome TLS fingerprint fallback for hosts that reject plain HTTPS clients (curl-cffi) |
springer | the Springer Nature open-access XML route (sprynger) |
preprints | bioRxiv/medRxiv downloads through paperscraper |
aps | the APS route that reuses your browser's login cookies (browser-cookie3) |
all | everything above |
tls and aps both work by making a request look more like your own browser than a script: tls matches Chrome's TLS fingerprint for hosts that turn away plain HTTPS clients, and aps reuses the APS session cookie you are already signed in with. Neither opens anything you are not licensed for, but both go a step beyond a plain API client, so they are worth checking against your institution's agreements before you enable them. A default install has neither; all includes them.
pip install "fulltext-article-downloader[mcp,tls]"
For development, clone the repository and run pip install -e ".[dev,all]". Make sure to configure your installation afterwards (see next section).
2. Configuration (API keys & email)
All credentials are optional; each one unlocks a route. Without keys, and off campus, expect open-access papers, preprints and DOE-funded manuscripts to work and most paywalled articles to fail.
UNPAYWALL_EMAIL is sent only to Unpaywall and Crossref, which ask API users for a contact address; Crossref serves requests that carry one from its faster "polite" pool. Keys and the email stay on your machine.
Set these environment variables or run the interactive helper:
fulltext-config
The script stores keys in ~/.fulltext_keys, which are loaded automatically on import. If a required key is missing, the corresponding tool is skipped and the downloader falls back to other methods. Publisher keys return paywalled content only when the key or the network is entitled; the package detects truncated or abstract-only responses and moves on.