Download scientific paper PDFs by DOI.
Tries OA sources first (Unpaywall, Semantic Scholar, arXiv, PMC, bioRxiv, Publisher Direct), then auto-fallback to Sci-Hub.
- 6 OA sources priority: Unpaywall → Semantic Scholar → arXiv → PMC → bioRxiv → Publisher Direct
- Auto Sci-Hub fallback when OA sources fail
- Batch download support
- Structured JSON output for agents
git clone https://github.com/cypgg/dlsci.git
cd dlsci
pip install requests beautifulsoup4# Download a paper (OA + Sci-Hub auto fallback)
python scripts/dlsci.py "10.1038/nature12385"
# Download to specific directory
python scripts/dlsci.py "DOI" --out ./papers
# Disable Sci-Hub (OA sources only)
python scripts/dlsci.py "DOI" --no-scihub
# Batch download
python scripts/dlsci.py --batch dois.txt
# JSON output (for agents)
python scripts/dlsci.py "DOI" --json| Variable | Description |
|---|---|
UNPAYWALL_EMAIL |
Email for Unpaywall API (higher OA hit rate) |
SEMANTIC_SCHOLAR_API_KEY |
Semantic Scholar API key |
NCBI_API_KEY |
NCBI/PMC API key |
- Unpaywall - Legal OA via DOI lookup
- Semantic Scholar -
openAccessPdffield - arXiv - Preprint server
- PMC - PubMed Central
- bioRxiv/medRxiv - Preprints
- Publisher Direct - IOP, MDPI, Frontiers, PLOS
- Sci-Hub - Fallback (auto-enabled)
MIT