pi-pubmed
Search PubMed and fetch article abstracts directly from Pi using NCBI E-utilities
Package details
Install pi-pubmed from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-pubmed- Package
pi-pubmed- Version
1.0.1- Published
- May 1, 2026
- Downloads
- not available
- Author
- dspachos
- License
- MIT
- Types
- extension, skill
- Size
- 16.4 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"skills": [
"./skills"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-pubmed
A Pi package for searching PubMed and fetching biomedical literature articles directly from your coding agent.
Features
- Search PubMed — Find articles using full PubMed query syntax (boolean operators, field tags, MeSH terms, date ranges)
- Fetch article details — Retrieve titles, authors, journals, publication dates, DOIs, and full abstracts
- Zero dependencies — Uses the NCBI E-utilities REST API directly
- Configurable — Optional API key support for higher rate limits
Installation
pi install npm:pi-pubmed
Or install from a local path:
pi install /path/to/pi-pubmed
Tools
pubmed_search
Search PubMed for articles matching a query.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | ✅ | PubMed search query (supports boolean operators, field tags, MeSH terms) |
max_results |
number | ❌ | Max results to return (1–100, default 10) |
sort_by |
string | ❌ | Sort: relevance, pub_date, Author, JournalName |
date_range |
string | ❌ | Date range as YYYY:YYYY or YYYY/MM:YYYY/MM |
pubmed_fetch
Fetch detailed article information for specific PubMed IDs.
| Parameter | Type | Required | Description |
|---|---|---|---|
pmids |
string[] | ✅ | List of PubMed IDs to fetch |
include_abstract |
boolean | ❌ | Include full abstract (default true) |
Usage Examples
Once installed, just ask Pi naturally:
Search PubMed for recent articles about CRISPR gene therapy
Find review articles about machine learning in drug discovery from the last 5 years
Fetch the abstract for PMID 38312345
Configuration (Optional)
Set environment variables for enhanced access:
| Variable | Description |
|---|---|
NCBI_API_KEY |
NCBI API key — increases rate limit to 10 req/s |
NCBI_EMAIL |
Your email — helps NCBI contact you if needed |
Get a free API key at: https://www.ncbi.nlm.nih.gov/account/settings/
Package Structure
pi-pubmed/
├── package.json # Package manifest with Pi configuration
├── extensions/
│ └── pubmed.ts # Extension with pubmed_search & pubmed_fetch tools
├── skills/
│ └── pubmed/
│ └── SKILL.md # Skill instructions for the agent
└── README.md
License
MIT