pubmed-database
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePubMed Database
PubMed 数据库
Use this skill when a task needs biomedical literature from PubMed rather than
general web search.
当任务需要的是PubMed中的生物医学文献,而非一般网络搜索时,使用此技能。
When to Use
使用时机
- Searching MEDLINE or life-sciences literature.
- Building PubMed queries with MeSH terms, field tags, dates, or article types.
- Looking up PMIDs, abstracts, publication metadata, or related citations.
- Running systematic-review search passes that need repeatable search strings.
- Using NCBI E-utilities directly from Python, shell, or another HTTP client.
- 搜索MEDLINE或生命科学文献。
- 使用MeSH术语、字段标签、日期或文章类型构建PubMed查询。
- 查找PMID、摘要、发表元数据或相关引文。
- 运行需要可重复搜索字符串的系统性综述检索。
- 直接从Python、shell或其他HTTP客户端使用NCBI E-utilities。
Query Construction
查询构建
Start with the research question, split it into concepts, then combine concepts
with Boolean operators.
text
concept_1 AND concept_2 AND filter
synonym_a OR synonym_b
NOT exclusion_termUseful PubMed field tags:
- : title
[ti] - : abstract
[ab] - : title or abstract
[tiab] - : author
[au] - : journal title abbreviation
[ta] - : MeSH term
[mh] - : major MeSH topic
[majr] - : publication type
[pt] - : date of publication
[dp] - : language
[la]
Examples:
text
diabetes mellitus[mh] AND treatment[tiab] AND systematic review[pt] AND 2023:2026[dp]
(metformin[nm] OR insulin[nm]) AND diabetes mellitus, type 2[mh] AND randomized controlled trial[pt]
smith ja[au] AND cancer[tiab] AND 2026[dp] AND english[la]从研究问题开始,将其拆分为概念,然后用布尔运算符组合概念。
text
concept_1 AND concept_2 AND filter
synonym_a OR synonym_b
NOT exclusion_term有用的PubMed字段标签:
- :标题
[ti] - :摘要
[ab] - :标题或摘要
[tiab] - :作者
[au] - :期刊标题缩写
[ta] - :MeSH术语
[mh] - :主要MeSH主题
[majr] - :发表类型
[pt] - :发表日期
[dp] - :语言
[la]
示例:
text
diabetes mellitus[mh] AND treatment[tiab] AND systematic review[pt] AND 2023:2026[dp]
(metformin[nm] OR insulin[nm]) AND diabetes mellitus, type 2[mh] AND randomized controlled trial[pt]
smith ja[au] AND cancer[tiab] AND 2026[dp] AND english[la]MeSH and Subheadings
MeSH和副标题
Prefer MeSH when the concept has a stable controlled-vocabulary term. Combine
MeSH with title/abstract terms when the topic is new or terminology varies.
Correct subheading syntax puts the subheading before the field tag:
text
diabetes mellitus, type 2/drug therapy[mh]
cardiovascular diseases/prevention & control[mh]Use only when the topic must be central to the paper. It can improve
precision but may miss relevant work.
[majr]当概念具有稳定的受控词汇术语时,优先使用MeSH。当主题较新或术语多样时,将MeSH与标题/摘要术语结合使用。
正确的副标题语法将副标题放在字段标签之前:
text
diabetes mellitus, type 2/drug therapy[mh]
cardiovascular diseases/prevention & control[mh]仅当主题必须是论文核心时使用。它可以提高精确度,但可能会遗漏相关工作。
[majr]Filters
过滤器
Publication types:
clinical trial[pt]meta-analysis[pt]randomized controlled trial[pt]review[pt]systematic review[pt]guideline[pt]
Date filters:
text
2026[dp]
2020:2026[dp]
2026/03/15[dp]Availability filters:
text
free full text[sb]
hasabstract[text]发表类型:
clinical trial[pt]meta-analysis[pt]randomized controlled trial[pt]review[pt]systematic review[pt]guideline[pt]
日期过滤器:
text
2026[dp]
2020:2026[dp]
2026/03/15[dp]可用性过滤器:
text
free full text[sb]
hasabstract[text]E-utilities Workflow
E-utilities工作流
NCBI E-utilities supports repeatable API workflows:
- : search and return PMIDs.
esearch.fcgi - : return lightweight article metadata.
esummary.fcgi - : fetch abstracts or full records in XML, MEDLINE, or text.
efetch.fcgi - : find related articles and linked resources.
elink.fcgi
Use an email and API key for production scripts. Store API keys in environment
variables, never in committed files or command history.
python
import os
import time
import requests
BASE = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils"
def esearch(query: str, retmax: int = 20) -> list[str]:
params = {
"db": "pubmed",
"term": query,
"retmode": "json",
"retmax": retmax,
"tool": "ecc-pubmed-search",
"email": os.environ.get("NCBI_EMAIL", ""),
}
api_key = os.environ.get("NCBI_API_KEY")
if api_key:
params["api_key"] = api_key
response = requests.get(f"{BASE}/esearch.fcgi", params=params, timeout=30)
response.raise_for_status()
time.sleep(0.35)
return response.json()["esearchresult"]["idlist"]
pmids = esearch("hypertension[mh] AND randomized controlled trial[pt] AND 2024:2026[dp]")
print(pmids)For batches, prefer NCBI history server parameters (,
, ) instead of passing very long PMID lists through URLs.
usehistory=yWebEnvquery_keyNCBI E-utilities支持可重复的API工作流:
- :搜索并返回PMID。
esearch.fcgi - :返回轻量级文章元数据。
esummary.fcgi - :以XML、MEDLINE或文本格式获取摘要或完整记录。
efetch.fcgi - :查找相关文章和链接资源。
elink.fcgi
生产脚本应使用邮箱和API密钥。API密钥存储在环境变量中,切勿写入提交的文件或命令历史。
python
import os
import time
import requests
BASE = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils"
def esearch(query: str, retmax: int = 20) -> list[str]:
params = {
"db": "pubmed",
"term": query,
"retmode": "json",
"retmax": retmax,
"tool": "ecc-pubmed-search",
"email": os.environ.get("NCBI_EMAIL", ""),
}
api_key = os.environ.get("NCBI_API_KEY")
if api_key:
params["api_key"] = api_key
response = requests.get(f"{BASE}/esearch.fcgi", params=params, timeout=30)
response.raise_for_status()
time.sleep(0.35)
return response.json()["esearchresult"]["idlist"]
pmids = esearch("hypertension[mh] AND randomized controlled trial[pt] AND 2024:2026[dp]")
print(pmids)对于批量操作,优先使用NCBI历史服务器参数(、、),而不是通过URL传递很长的PMID列表。
usehistory=yWebEnvquery_keyOutput Discipline
输出纪律
For each search pass, record:
- exact search string
- database searched
- date searched
- filters used
- result count
- export format
- any manual exclusions
Example:
markdown
| Database | Date searched | Query | Filters | Results |
| --- | --- | --- | --- | ---: |
| PubMed | 2026-05-11 | `sickle cell disease[mh] AND CRISPR[tiab]` | 2020:2026[dp], English | 42 |对于每次搜索,记录:
- 确切的搜索字符串
- 搜索的数据库
- 搜索日期
- 使用的过滤器
- 结果数量
- 导出格式
- 任何手动排除项
示例:
markdown
| 数据库 | 搜索日期 | 查询 | 过滤器 | 结果 |
| --- | --- | --- | --- | ---: |
| PubMed | 2026-05-11 | `sickle cell disease[mh] AND CRISPR[tiab]` | 2020:2026[dp], English | 42 |Review Checklist
审查清单
- Are field tags valid PubMed tags?
- Are MeSH terms paired with free-text synonyms for newer topics?
- Is the date range explicit and appropriate?
- Does the search log include enough detail to reproduce the query?
- Are API keys loaded from the environment?
- Does HTTP code call or otherwise handle non-200 responses before parsing?
raise_for_status() - Are rate limits respected?
- 字段标签是否为有效的PubMed标签?
- 对于较新的主题,MeSH术语是否与自由文本同义词配对?
- 日期范围是否明确且适当?
- 搜索日志是否包含足够的细节以重现查询?
- API密钥是否从环境变量加载?
- HTTP代码是否在解析前调用或处理非200响应?
raise_for_status() - 是否遵守速率限制?
References
参考
- PubMed help
- NCBI E-utilities documentation
- NCBI API key guidance
- NCBI support: eutilities@ncbi.nlm.nih.gov
- PubMed帮助
- NCBI E-utilities文档
- NCBI API密钥指南
- NCBI支持:eutilities@ncbi.nlm.nih.gov