
Pubmed Database
Query PubMed and other Entrez databases programmatically via NCBI E-utilities with correct rate limits, API keys, and esearch/esummary/efetch patterns.
Overview
pubmed-database is an agent skill for the Idea phase that documents NCBI E-utilities for programmatic PubMed and Entrez database search.
Install
npx skills add https://github.com/davila7/claude-code-templates --skill pubmed-databaseWhat is this skill?
- Documents base URL https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ and mandatory api_key parameter behavior
- Rate limits: 3 req/s without key vs 10 req/s with NCBI API key (post-2018 policy)
- Core tools: ESearch (UID lists), with retmax/retstart, usehistory, sort, and field-scoped queries
- Requires User-Agent header on requests for compliant access
- Covers retmode, datetype, and PubMed-specific search parameters for large result sets
- 3 requests per second without API key; 10 requests per second with API key
- retmax default 20, maximum 10000 on ESearch
Adoption & trust: 630 installs on skills.sh; 27.8k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need PMID lists and PubMed queries in your agent or app but keep hitting rate limits or unclear E-utility parameters.
Who is it for?
Solo builders doing literature review, health or bio side projects, or RAG pipelines that start with PubMed UID discovery.
Skip if: Clinical decision systems that require curated corpora, licensing review, or bulk redistribution without NCBI policy checks.
When should I use this skill?
Building or researching PubMed/Entrez access with E-utilities and NCBI API key compliance.
What do I get? / Deliverables
You implement compliant esearch (and related) calls with API keys, User-Agent headers, and paging/history options aligned to NCBI rules.
- Working esearch (and related) request templates with paging
- Documented rate-limit and api_key usage for agent-generated clients
Recommended Skills
Journey fit
Idea/research is the canonical shelf because the skill is a PubMed E-utilities reference for literature and UID discovery before product commitments. Research subphase fits systematic paper search, PMID retrieval, and evidence gathering for health, bio, or general science side projects.
How it compares
Structured API reference skill—not a pre-built PubMed MCP server or paid literature database.
Common Questions / FAQ
Who is pubmed-database for?
Indie developers and researchers wiring Claude/Cursor agents to PubMed via E-utilities who want parameter and rate-limit clarity in one skill.
When should I use pubmed-database?
During Idea/research when scoping competitors and evidence, and during Build/integrations when coding esearch and Entrez fetch steps for a knowledge product.
Is pubmed-database safe to install?
Review the Security Audits panel on this page; storing NCBI API keys belongs in secrets management—never commit keys inside generated code without env vars.
SKILL.md
READMESKILL.md - Pubmed Database
# PubMed E-utilities API Reference ## Overview The NCBI E-utilities provide programmatic access to PubMed and other Entrez databases through a REST API. The base URL for all E-utilities is: ``` https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ ``` ## API Key Requirements As of December 1, 2018, NCBI enforces API key usage for E-utility calls. API keys increase rate limits from 3 requests/second to 10 requests/second. To obtain an API key, register for an NCBI account and generate a key from your account settings. Include the API key in requests using the `&api_key` parameter: ``` esearch.fcgi?db=pubmed&term=cancer&api_key=YOUR_API_KEY ``` ## Rate Limits - **Without API key**: 3 requests per second - **With API key**: 10 requests per second - Always include a User-Agent header in requests ## Core E-utility Tools ### 1. ESearch - Query Databases **Endpoint**: `esearch.fcgi` **Purpose**: Search an Entrez database and retrieve a list of UIDs (e.g., PMIDs for PubMed) **Required Parameters**: - `db` - Database to search (e.g., pubmed, gene, protein) - `term` - Search query **Optional Parameters**: - `retmax` - Maximum records to return (default: 20, max: 10000) - `retstart` - Index of first record to return (default: 0) - `usehistory=y` - Store results on history server for large result sets - `retmode` - Return format (xml, json) - `sort` - Sort order (relevance, pub_date, first_author, last_author, journal) - `field` - Limit search to specific field - `datetype` - Type of date to use for filtering (pdat for publication date) - `mindate` - Minimum date (YYYY/MM/DD format) - `maxdate` - Maximum date (YYYY/MM/DD format) **Example Request**: ``` esearch.fcgi?db=pubmed&term=breast+cancer&retmax=100&retmode=json&api_key=YOUR_API_KEY ``` **Response Elements**: - `Count` - Total number of records matching query - `RetMax` - Number of records returned in this response - `RetStart` - Index of first returned record - `IdList` - List of UIDs (PMIDs) - `WebEnv` - History server environment string (when usehistory=y) - `QueryKey` - Query key for history server (when usehistory=y) ### 2. EFetch - Download Records **Endpoint**: `efetch.fcgi` **Purpose**: Retrieve full records from a database in various formats **Required Parameters**: - `db` - Database name - `id` - Comma-separated list of UIDs, or use WebEnv/query_key from ESearch **Optional Parameters**: - `rettype` - Record type (abstract, medline, xml, uilist) - `retmode` - Return mode (text, xml) - `retstart` - Starting record index - `retmax` - Maximum records per request **Example Request**: ``` efetch.fcgi?db=pubmed&id=123456,234567&rettype=abstract&retmode=text&api_key=YOUR_API_KEY ``` **Common rettype Values for PubMed**: - `abstract` - Abstract text - `medline` - Full MEDLINE format - `xml` - PubMed XML format - `uilist` - List of UIDs only ### 3. ESummary - Retrieve Document Summaries **Endpoint**: `esummary.fcgi` **Purpose**: Get document summaries (DocSum) for a list of UIDs **Required Parameters**: - `db` - Database name - `id` - Comma-separated UIDs or WebEnv/query_key **Optional Parameters**: - `retmode` - Return format (xml, json) - `version` - DocSum version (1.0 or 2.0, default is 1.0) **Example Request**: ``` esummary.fcgi?db=pubmed&id=123456,234567&retmode=json&version=2.0&api_key=YOUR_API_KEY ``` **DocSum Fields** (vary by database, common PubMed fields): - Title - Authors - Source (journal) - PubDate - Volume, Issue, Pages - DOI - PmcRefCount (citations in PMC) ### 4. EPost - Upload UIDs **Endpoint**: `epost.fcgi` **Purpose**: Upload a list of UIDs to the history server for use in subsequent requests **Required Parameters**: - `db` - Database name - `id` - Comma-separated list of UIDs **Example Request**: ``` epost.fcgi?db=pubmed&id=123456,234567,345678&api_key=YOUR_API_KEY ``` **Response**: Returns WebEnv and QueryKey for use in subsequent requests ### 5. ELink - Find Related Data **Endpoint**: `elink.fcgi` **Purpose**: Find related rec