PMC Harvest
by @angusthefuzz
Fetch and retrieve full-text or abstracts of open-access articles from PubMed Central by journal, year, or PMCID using NCBI's public APIs without an API key.
clawhub install pmc-harvestπ About This Skill
name: pmc-harvest description: Fetch articles from PubMed Central using NCBI APIs. Search journals, retrieve full text via OAI-PMH, batch harvest for RAG pipelines. No API key required. version: 1.0.0 author: Ania metadata: clawdbot: emoji: "π" requires: bins: ["node"]
PMC Harvest
Fetch full-text articles from PubMed Central using official NCBI APIs.
Features
Usage
# Search a journal
node {baseDir}/scripts/pmc-harvest.js --search "J Stroke[journal]" --year 2025Fetch full text for a specific article
node {baseDir}/scripts/pmc-harvest.js --fetch PMC12345678Batch harvest from multiple journals
node {baseDir}/scripts/pmc-harvest.js --harvest journals.json --year 2025Test with known journals
node {baseDir}/scripts/pmc-harvest.js --test
Options
| Flag | Description |
|------|-------------|
| --search | PMC search query (use journal[name] format) |
| --year | Filter by publication year |
| --max | Max results (default: 100) |
| --fetch | Fetch full text for specific PMCID |
| --harvest | Batch harvest from JSON journal list |
| --test | Run test with sample journals |
Programmatic API
const pmc = require('{baseDir}/lib/api.js');// Search
const { count, pmcids } = await pmc.searchJournal('"J Stroke"[journal]', { year: 2025 });
// Get summaries
const summaries = await pmc.getSummaries(pmcids);
// Fetch full text
const { available, xml, reason } = await pmc.fetchFullText('PMC12345678');
// Parse JATS XML
const { title, abstract, body } = pmc.parseJATS(xml);
// Fetch abstract only (lightweight)
const { title, abstract } = await pmc.fetchAbstract('PMC12345678');
Journal Query Examples
const queries = {
'Stroke': '"Stroke"[journal]',
'Journal of Stroke': '"J Stroke"[journal]',
'Stroke & Vascular Neurology': '"Stroke Vasc Neurol"[journal]',
'European Stroke Journal': '"Eur Stroke J"[journal]',
'BMC Neurology': '"BMC Neurol"[journal]'
};
Limitations
API Reference
This skill wraps NCBI's official APIs:
https://eutils.ncbi.nlm.nih.gov/entrez/eutilsesearch.fcgi β Search PMC
- esummary.fcgi β Get article metadata
https://pmc.ncbi.nlm.nih.gov/api/oai/v1/mhGetRecord β Fetch full text XMLFull docs: https://www.ncbi.nlm.nih.gov/books/NBK25501/
π‘ Examples
# Search a journal
node {baseDir}/scripts/pmc-harvest.js --search "J Stroke[journal]" --year 2025Fetch full text for a specific article
node {baseDir}/scripts/pmc-harvest.js --fetch PMC12345678Batch harvest from multiple journals
node {baseDir}/scripts/pmc-harvest.js --harvest journals.json --year 2025Test with known journals
node {baseDir}/scripts/pmc-harvest.js --test
βοΈ Configuration
| Flag | Description |
|------|-------------|
| --search | PMC search query (use journal[name] format) |
| --year | Filter by publication year |
| --max | Max results (default: 100) |
| --fetch | Fetch full text for specific PMCID |
| --harvest | Batch harvest from JSON journal list |
| --test | Run test with sample journals |