Loading...
Loading...
Search Europe PMC for scientific literature and download open-access full texts and PDFs. Retrieve full-text XML/plain text by PMCID, get citation lists and bibliography.
npx skill4agent add google-deepmind/science-skills literature-search-europepmcuvuvuvOPEN_ACCESS:y--outputscripts/europepmc_api.pysearch# Look up a paper by DOI
uv run scripts/europepmc_api.py search "DOI:10.1038/s41586-021-03819-2" --output result.json
# Keyword search
uv run scripts/europepmc_api.py search "CRISPR cancer" --max_results 5 --output results.json
# Author search
uv run scripts/europepmc_api.py search "AUTH:Jumper J" --max_results 10 --output results.json
# PMID lookup
uv run scripts/europepmc_api.py search "EXT_ID:34265844 AND SRC:MED" --output result.json
# Sorted by citations
uv run scripts/europepmc_api.py search "machine learning" \
--sort "CITED desc" --max_results 20 --output results.jsonquery--output--max_results--result_typecorecorelite--cursor*nextCursorMark--sortCITED descP_PDATE_D descP_PDATE_D aschitCountnextCursorMarkresultsDOI:10.xxxx/yyyyEXT_ID:12345678 AND SRC:MEDAUTH:surname initialsTITLE:keywordJOURNAL:namePUB_YEAR:2024(FIRST_PDATE:[2023-01-01 TO 2023-12-31])HAS_FT:yANDORNOTNote:is automatically appended to all queries. You do not need to add it manually.OPEN_ACCESS:y
download_pdfuv run scripts/europepmc_api.py download_pdf PMC8371605 --output alphafold.pdfpmcidPMC8371605--outputget_fulltext--format xml# Get plain text (default)
uv run scripts/europepmc_api.py get_fulltext PMC8371605 --output fulltext.txt
# Get raw XML
uv run scripts/europepmc_api.py get_fulltext PMC8371605 --format xml --output fulltext.xmlpmcid--output--formattexttextxmlImportant: Only articles in the PMC Open Access Subset have full text available. If retrieval fails, useto check thesearchfield and fall back to the abstract.isOpenAccess
get_citations# Get citations for the AlphaFold paper (PMID 34265844)
uv run scripts/europepmc_api.py get_citations MED 34265844 \
--page_size 25 --output citations.jsonsourceMEDPMCPPRPATarticle_id--output--page--page_sizehitCountcitationsget_references# Get references from the AlphaFold paper
uv run scripts/europepmc_api.py get_references MED 34265844 \
--page_size 100 --output references.jsonsourceMEDPMCPPRPATarticle_id--output--page--page_sizehitCountreferences# Step 1: Search for the PMCID
uv run scripts/europepmc_api.py search "DOI:10.1038/s41586-021-03819-2" --output result.json
PMCID=$(jq -r '.results[0].pmcid // empty' result.json)
# Step 2: Download the PDF
uv run scripts/europepmc_api.py download_pdf "$PMCID" --output paper.pdf# Step 1: Find the PMCID from a PMID
uv run scripts/europepmc_api.py search "EXT_ID:34265844 AND SRC:MED" --output result.json
PMCID=$(jq -r '.results[0].pmcid // empty' result.json)
# Step 2: Get the full text
uv run scripts/europepmc_api.py get_fulltext "$PMCID" --output fulltext.txt# Find what papers cite a landmark study, then check their references
uv run scripts/europepmc_api.py get_citations MED 34265844 --page_size 50 --output citing.json
# Parse a cited paper's PMID and explore its references
uv run scripts/europepmc_api.py get_references MED <CITING_PMID> --output refs.json# First page
uv run scripts/europepmc_api.py search "CRISPR" --max_results 100 --output page1.json
# Extract cursor for next page
CURSOR=$(jq -r '.nextCursorMark // empty' page1.json)
# Next page
uv run scripts/europepmc_api.py search "CRISPR" --max_results 100 --cursor "$CURSOR" --output page2.json