Download open access PDFs from PubMed Central — no scraping, no captcha, no API key.
- Sci-Hub (Primary): Tries to query
sci-hub.frfirst for faster downloads directly via the provided PMCID. - NCBI OA FTP (Secondary): Queries the NCBI OA API with the given PMCID and downloads directly from
ftp.ncbi.nlm.nih.gov. - Wayback + Europe PMC (Tertiary): Falls back to retrieving the filename via Wayback Machine and downloading it from the Europe PMC API as a last resort.
uv run main.py <PMCID>Example:
uv run main.py PMC7265004You can use the batch.py script to asynchronously download multiple PMCID formats either from a .txt file (one PMCID per line) or a JSONL file containing "PMCID": "..." objects.
uv run batch.py <file.jsonl|file.txt>Example (input.jsonl):
uv run batch.py input.jsonl