PMCGrab
From PMCID to clean, section-aware JSON for your AI pipelines.
Home
-
5-minute setup Install PMCGrab and run a multi-paper demo in minutes.
-
User Guide Comprehensive guides covering every feature.
-
API Reference Auto-generated docs for every function and class.
-
Examples Real-world usage and advanced patterns.
Example Usage¶
from pmcgrab.application.processing import process_single_pmc
# Process a PMC article
data = process_single_pmc("7114487")
if data:
print(f"Title: {data['title']}")
print(f"Authors: {len(data['authors'])}")
print(f"Sections: {list(data['body'].keys())}")
Example Output¶
{
"pmc_id": "7114487",
"title": "Machine learning approaches in cancer research",
"abstract": "Recent advances in machine learning have revolutionized...",
"authors": [
{
"First_Name": "John",
"Last_Name": "Doe",
"Affiliation": "Cancer Research Institute"
}
],
"body": {
"Introduction": "Cancer research has evolved significantly...",
"Methods": "We implemented a deep learning framework...",
"Results": "Our model achieved 94.2% accuracy...",
"Discussion": "These findings demonstrate the potential..."
},
"journal": "Nature Medicine",
"figures": [...],
"tables": [...],
"references": [...]
}