npx skills add ...
npx skills add google-deepmind/science-skills --skill literature-search-europepmc
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 skills add google-deepmind/science-skills --skill literature-search-europepmc
A skill for searching, downloading, and exploring open-access papers from Europe PMC — a comprehensive, free life-science literature database with over 43 million abstracts and 9 million full-text articles.
uv: Read the uv skill and follow its Setup instructions to ensure
uv is installed and on PATH.OPEN_ACCESS:y to every search query. Do
NOT remove or override this filter.--output to write results to a
file. Read the output file separately to avoid context overflow.All commands are subcommands of scripts/europepmc_api.py. Rate limiting and
retries are handled automatically.
search)Search Europe PMC by query. Supports DOI lookup, keyword search, author search, PMID lookup, and the full Europe PMC search syntax.
Arguments:
query (str, required) — search query using Europe PMC syntax--output (str, required) — output JSON file path--max_results (int, default 10) — maximum results per page (max 1000)--result_type (str, default core) — core (full metadata) or lite--cursor (str, default *) — cursor mark for pagination; pass the
nextCursorMark value from a previous response to get the next page--sort (str) — sort order, e.g. CITED desc, P_PDATE_D desc
(publication date descending), P_PDATE_D ascOutput: JSON file with three fields:
hitCount (int) — total number of matching articlesnextCursorMark (str) — cursor for next page; empty string if no more pagesresults (list) — array of article metadata objectsSearch Syntax Quick Reference:
DOI:10.xxxx/yyyy — look up by DOIEXT_ID:12345678 AND SRC:MED — look up by PMIDAUTH:surname initials — author searchTITLE:keyword — search in title onlyJOURNAL:name — search by journalPUB_YEAR:2024 or (FIRST_PDATE:[2023-01-01 TO 2023-12-31]) — date filterHAS_FT:y — restrict to articles with full text in Europe PMCAND, OR, NOTNote:
OPEN_ACCESS:yis automatically appended to all queries. You do not need to add it manually.
download_pdf)Download an open-access PDF from Europe PMC by PMCID.
Arguments:
pmcid (str, required) — PubMed Central ID (e.g., PMC8371605)--output (str, required) — filepath to save the PDFOutput: Saves the PDF to the specified file. Exits with an error if the PMCID is not found or the response is not a valid PDF. Whenever you download a PDF, check the pdf downloaded is not empty or corrupted.
get_fulltext)Retrieve the full text of an open-access article and save to a file. Returns
plain text (XML tags stripped) by default, or raw XML with --format xml.
Arguments:
pmcid (str, required) — PubMed Central ID--output (str, required) — output file path--format (str, default text) — text (plain text) or xml (raw JATS
XML)Output: Full text written to the specified file. Exits with an error if the article is not in the Europe PMC open-access subset.
Important: Only articles in the PMC Open Access Subset have full text available. If retrieval fails, use
searchto check theisOpenAccessfield and fall back to the abstract.
get_citations)Retrieve articles that cite a given paper.
Arguments:
source (str, required) — source database: MED (PubMed), PMC, PPR
(preprints), PAT (patents)article_id (str, required) — article ID in the source database--output (str, required) — output JSON file path--page (int, default 1) — page number--page_size (int, default 25) — results per pageOutput: JSON file with hitCount and citations array.
get_references)Retrieve the reference list (bibliography) of a given paper.
Arguments:
source (str, required) — source database: MED, PMC, PPR, PATarticle_id (str, required) — article ID in the source database--output (str, required) — output JSON file path--page (int, default 1) — page number--page_size (int, default 25) — results per pageOutput: JSON file with hitCount and references array.
uv run scripts/europepmc_api.py download_pdf PMC8371605 --output alphafold.pdf# 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.xml# Get citations for the AlphaFold paper (PMID 34265844)
uv run scripts/europepmc_api.py get_citations MED 34265844 \
--page_size 25 --output citations.json# Get references from the AlphaFold paper
uv run scripts/europepmc_api.py get_references MED 34265844 \
--page_size 100 --output references.json# 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