Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Search biomedical literature and retrieve records via PubMed E-utilities
.claude/skills/brycewang-stanford-pubmed-api/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 181% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-04 | ✗→✓ | ▲ Improved | -10% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-12 | ✓→✓ | = Same ✓ | 110% | 0% |
PubMed is the premier biomedical literature database maintained by the National Center for Biotechnology Information (NCBI) at the US National Library of Medicine. It indexes over 36 million citations and abstracts from MEDLINE, life science journals, and online books. The Entrez Programming Utilities (E-utilities) provide programmatic access to the entire PubMed database and other NCBI databases.
E-utilities consist of a suite of server-side programs that accept URL-based requests and return structured data. These tools are essential for biomedical researchers, systematic reviewers, and developers building health informatics applications. The API supports complex search queries using MeSH (Medical Subject Headings) terms, boolean operators, and field-specific searches.
The API is free and does not require authentication for basic usage. Registering for an NCBI API key raises the rate limit from 3 to 10 requests per second, which is recommended for any automated workflow.
No authentication required for basic usage (3 requests/second). For higher rate limits (10 requests/second), register for a free API key at https://www.ncbi.nlm.nih.gov/account/ and include it in requests:
&api_key=YOUR_API_KEYIncluding tool and email parameters in requests helps NCBI contact you if there are issues with your application.
GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi| Param | Type | Required | Description | |-------|------|----------|-------------| | db | string | Yes | Database name (e.g., pubmed, pmc) | | term | string | Yes | Search query (supports boolean operators and field tags) | | retmax | integer | No | Maximum number of IDs returned (default: 20, max: 10000) | | retstart | integer | No | Index of first ID to retrieve (for pagination) | | retmode | string | No | Response format: xml (default) or json | | sort | string | No | Sort order: relevance, pub_date, author, journal | | datetype | string | No | Date type for range filter: pdat, mdat, edat | | mindate | string | No | Start date (YYYY/MM/DD) | | maxdate | string | No | End date (YYYY/MM/DD) | | usehistory | string | No | Set to "y" to store results on server for subsequent retrieval |
bash curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=CRISPR+AND+cancer[Title]&retmax=10&retmode=json&sort=pub_date"
esearchresult containing count (total hits), idlist (array of PMIDs), and optionally webenv and querykey for history server.GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi| Param | Type | Required | Description | |-------|------|----------|-------------| | db | string | Yes | Database name | | id | string | Yes | Comma-separated list of PMIDs (or use WebEnv/query_key) | | rettype | string | No | Return type: abstract, medline, full, xml | | retmode | string | No | Format: xml, text | | WebEnv | string | No | Web environment from ESearch with usehistory=y | | query_key | string | No | Query key from ESearch |
bash curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=33116299,34735795&rettype=abstract&retmode=xml"
MedlineCitation with Article (title, abstract, authors, journal), MeSHHeadingList, and PubmedData (DOI, publication status).GET https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi| Param | Type | Required | Description | |-------|------|----------|-------------| | db | string | Yes | Database name | | id | string | Yes | Comma-separated PMIDs | | retmode | string | No | Response format: xml or json | | version | string | No | Set to "2.0" for enhanced XML format |
bash curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=33116299&retmode=json&version=2.0"
uid, title, authors, source (journal), pubdate, doi, and pmcid.Without API key: 3 requests per second. With API key: 10 requests per second. Exceeding limits results in temporary IP blocking. For large-scale data mining, use the NCBI FTP site for bulk downloads. Always include a delay of at least 334ms (or 100ms with API key) between requests. Weekend and evening hours (US Eastern time) are less congested.
Perform a structured search using MeSH terms and field qualifiers:
bash# Search for clinical trials on diabetes treatment from the last 2 years curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=diabetes[MeSH]+AND+treatment[Title]+AND+clinical+trial[Publication+Type]&mindate=2024/01/01&maxdate=2026/03/09&datetype=pdat&retmax=100&retmode=json"
Use the history server to efficiently search and then retrieve records:
bash# Step 1: Search and store results curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=machine+learning+AND+radiology&retmax=0&usehistory=y&retmode=json" # Step 2: Fetch records using WebEnv and query_key from step 1 curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&WebEnv=WEBENV_VALUE&query_key=1&retmax=50&rettype=abstract&retmode=xml"
Get JSON summaries for a batch of known PMIDs:
bashcurl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=33116299,34735795,35363452&retmode=json&version=2.0"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-12 | pass→pass | 5,592 | 3,233 | -42% | 1 | 1 | 0% | 1,090 | 2,284 | +110% | 0 | 0 | — |
case-01 | fail→pass | 6,898 | 8,030 | +16% | 1 | 1 | 0% | 1,074 | 3,014 | +181% | 0 | 0 | — |
case-02 | fail→pass | 10,603 | 4,846 | -54% | 1 | 1 | 0% | 1,834 | 2,741 | +49% | 0 | 0 | — |
case-03 | pass→pass | 10,020 | 5,170 | -48% | 1 | 1 | 0% | 1,604 | 2,855 | +78% | 0 | 0 | — |
case-04 | fail→pass | 17,503 | 4,485 | -74% | 1 | 1 | 0% | 2,649 | 2,388 | -10% | 0 | 0 | — |
case-05 | pass→pass | 3,518 | 2,647 | -25% | 1 | 1 | 0% | 514 | 2,302 | +348% | 0 | 0 | — |
case-06 | pass→pass | 4,089 | 3,452 | -16% | 1 | 1 | 0% | 722 | 2,524 | +250% | 0 | 0 | — |
case-07 | pass→pass | 8,044 | 6,300 | -22% | 1 | 1 | 0% | 1,195 | 2,784 | +133% | 0 | 0 | — |
case-08 | pass→pass | 5,875 | 4,815 | -18% | 1 | 1 | 0% | 906 | 2,561 | +183% | 0 | 0 | — |
case-09 | pass→pass | 5,001 | 2,710 | -46% | 1 | 1 | 0% | 736 | 2,217 | +201% | 0 | 0 | — |
case-10 | pass→pass | 7,284 | 4,999 | -31% | 1 | 1 | 0% | 1,316 | 2,723 | +107% | 0 | 0 | — |
case-11 | pass→pass | 3,511 | 3,617 | +3% | 1 | 1 | 0% | 456 | 2,285 | +401% | 0 | 0 | — |
case-13 | pass→pass | 4,070 | 2,113 | -48% | 1 | 1 | 0% | 734 | 2,194 | +199% | 0 | 0 | — |
case-14 | pass→pass | 5,726 | 5,389 | -6% | 1 | 1 | 0% | 814 | 2,663 | +227% | 0 | 0 | — |
case-15 | pass→pass | 6,263 | 3,188 | -49% | 1 | 1 | 0% | 922 | 2,279 | +147% | 0 | 0 | — |
case-16 | pass→pass | 3,765 | 2,762 | -27% | 1 | 1 | 0% | 491 | 2,353 | +379% | 0 | 0 | — |
case-17 | pass→pass | 3,652 | 2,667 | -27% | 1 | 1 | 0% | 509 | 2,287 | +349% | 0 | 0 | — |
case-18 | pass→pass | 8,265 | 5,379 | -35% | 1 | 1 | 0% | 1,380 | 2,808 | +103% | 0 | 0 | — |
case-19 | fail→pass | 17,864 | 17,394 | -3% | 1 | 1 | 0% | 3,059 | 4,458 | +46% | 0 | 0 | — |
case-20 | pass→pass | 23,746 | 12,442 | -48% | 1 | 1 | 0% | 2,474 | 3,716 | +50% | 0 | 0 | — |
case-21 | pass→pass | 13,713 | 12,818 | -7% | 1 | 1 | 0% | 1,979 | 3,714 | +88% | 0 | 0 | — |
case-22 | pass→pass | 11,005 | 6,670 | -39% | 1 | 1 | 0% | 1,787 | 2,848 | +59% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.