PyPaperRetriever: A Python Tool for Finding and Downloading Scientific Literature
PyPaperRetriever: A Python Tool for Finding and Downloading Scientific Literature - Published in JOSS (2025)
Science Score: 93.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README and JOSS metadata -
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
✓JOSS paper metadata
Published in Journal of Open Source Software
Repository
Basic Info
- Host: GitHub
- Owner: JosephIsaacTurner
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 15.6 MB
Statistics
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
PyPaperRetriever

👉 Full Documentation
👉 Start with the Quickstart
A python package for retrieving scientific papers from the web. Inspired by PyPaperBot (https://github.com/ferru97/PyPaperBot) but with improved flexibility and extensibility. Prefers open-access sources but users can opt to use Sci-Hub as a fallback depending on their ethical considerations and local laws.
Installation
bash
pip install git+https://github.com/josephisaacturner/pypaperretriever.git
Features
- Download papers using DOI or PubMed ID (PMID)
- Search PubMed programmatically with advanced query options
- Track citation networks (both upstream and downstream) for papers of interest
- Extract images from downloaded PDFs
- Find all available sources from Unpaywall and optional Sci-Hub integration
- Keep track of sources used via JSON sidecar files for each download
- Avoid duplicate downloads with intelligent checking
- BIDS-compatible file naming convention
- Both command-line and Python API interfaces
- Advanced search capabilities with customizable filters
- Citation network analysis tools
Ethical and legal note on Sci-Hub
Use of Sci-Hub is disabled by default and clearly labeled. Institutions and researchers differ in policy and legal context; PyPaperRetriever exposes an opt-in flag so users can comply with local rules while retaining a complete pipeline for contexts where such access is permitted. The authors of PyPaperRetriever do not endorse or encourage the use of Sci-Hub in violation of local laws or institutional policies. Users are responsible for ensuring compliance with all applicable laws and ethical guidelines when using this tool.
Usage Examples
For complete examples, see examples.ipynb in the repository.
1. Download Using DOI
```python from pypaperretriever import PaperRetriever
retriever = PaperRetriever( email="your.email@gmail.com", doi="10.7759/cureus.76081", download_directory='PDFs' ) retriever.download()
Command-line alternative
pypaperretriever --doi 10.7759/cureus.76081 --email your.email@gmail.com --dwn-dir PDFs ```
2. Download Using PubMed ID
```python from pypaperretriever import PaperRetriever
retriever = PaperRetriever( email="your.email@gmail.com", pmid="33813262", download_directory='PDFs' ) retriever.download()
Command-line alternative
pypaperretriever --pmid 33813262 --email your.email@gmail.com --dwn-dir PDFs ```
3. Control Sci-Hub Access
python
retriever = PaperRetriever(
email="your.email@gmail.com",
doi="10.1016/j.revmed.2011.10.009",
download_directory='PDFs',
allow_scihub=False # Set to True to enable Sci-Hub
)
retriever.download()
4. Extract Images from PDFs
```python from pypaperretriever import ImageExtractor
extractor = ImageExtractor('path/to/your/paper.pdf') extractor.extract_images() ```
5. Search PubMed Programmatically
```python from pypaperretriever import PubMedSearcher
search_query = """("brain lesions"[MeSH Terms] OR "brain lesion"[Title/Abstract] OR "cerebral lesion"[Title/Abstract]) AND (case reports[Publication Type])"""
searcher = PubMedSearcher(searchstring=searchquery, email="your.email@gmail.com")
results = searcher.search( count=10, orderby='relevance', # or 'chronological' onlyopenaccess=False, onlycase_reports=False )
Download found articles
searcher.downloadarticles(downloaddirectory='PDFs', allow_scihub=True)
Extract images from downloaded articles
searcher.extract_images() ```
6. Track Citation Networks
```python from pypaperretriever import PaperTracker
tracker = PaperTracker( email="your.email@gmail.com", doi='10.1097/RLU.0000000000001894', maxupstreamgenerations=1, # Papers referenced by your paper maxdownstreamgenerations=1 # Papers that cite your paper )
results = tracker.track_paper() ```
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License
Citation
If you use PyPaperRetriever in your research, please cite:
[Add citation information here later]
Owner
- Login: JosephIsaacTurner
- Kind: user
- Repositories: 1
- Profile: https://github.com/JosephIsaacTurner
JOSS Publication
PyPaperRetriever: A Python Tool for Finding and Downloading Scientific Literature
Authors
NYU Grossman School of Medicine, Center for Brain Circuit Therapeutics, Harvard Medical School
Department of Computer Science, Brigham Young University
Tags
scientific literature literature search PDF retrieval PubMedGitHub Events
Total
- Create event: 6
- Release event: 1
- Issues event: 1
- Watch event: 8
- Delete event: 1
- Issue comment event: 1
- Member event: 1
- Push event: 23
- Pull request event: 13
- Fork event: 4
Last Year
- Create event: 6
- Release event: 1
- Issues event: 1
- Watch event: 8
- Delete event: 1
- Issue comment event: 1
- Member event: 1
- Push event: 23
- Pull request event: 13
- Fork event: 4
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 1
- Total pull requests: 8
- Average time to close issues: 29 days
- Average time to close pull requests: about 1 hour
- Total issue authors: 1
- Total pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 8
- Average time to close issues: 29 days
- Average time to close pull requests: about 1 hour
- Issue authors: 1
- Pull request authors: 2
- Average comments per issue: 2.0
- Average comments per pull request: 0.0
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- PetrKorab (1)
Pull Request Authors
- JosephIsaacTurner (6)
- arfon (2)