Description
Citation export now uniformly uses prepare_export. The most common approach is to search first, then use pmids="last" to export the previous search results; if you only want to export specific articles, pass the PMID list directly.
Quick Decision Tree
需要匯出引用?
├── EndNote / Zotero / Mendeley → prepare_export(pmids="last", format="ris")
├── LaTeX / Overleaf → prepare_export(pmids="last", format="bibtex", source="local")
├── Excel / 分析 → prepare_export(pmids="last", format="csv", source="local")
└── 程式處理 → prepare_export(pmids="last", format="csl")
Core Tools
prepare_export(
pmids="last",
format="ris",
include_abstract=True,
source="official"
)
pmids accepts
"last""12345678,87654321"["12345678", "87654321"]"PMID:12345678"
Sources and Formats
| source | Supported Formats | When to Use |
|---|---|---|
official |
ris, medline, csl |
Default first choice, best quality |
local |
ris, bibtex, csv, medline, json |
When you need BibTeX, CSV, or an offline alternative |
Common Formats
| Purpose | How to Call |
|---|---|
| EndNote / Zotero / Mendeley | prepare_export(pmids="last", format="ris") |
| LaTeX / Overleaf | prepare_export(pmids="last", format="bibtex", source="local") |
| Excel / data analysis | prepare_export(pmids="last", format="csv", source="local") |
| Programmatic processing | prepare_export(pmids="last", format="csl") |
| MEDLINE / NBIB exchange | prepare_export(pmids="last", format="medline") |
Common Workflows
1. Export directly after searching
unified_search(query="remimazolam ICU sedation", limit=30)
prepare_export(pmids="last", format="ris")
2. Export specified PMIDs
prepare_export(
pmids="30217674,28523456,35678901",
format="ris"
)
3. Export BibTeX for LaTeX
prepare_export(
pmids="last",
format="bibtex",
source="local"
)
4. Output two formats at once for the same batch of results
prepare_export(pmids="last", format="ris")
prepare_export(pmids="last", format="csv", source="local")
Recommended Companion Tools
First confirm which PMIDs are in the previous search results
get_session_pmids()
When you want to review article details before deciding whether to export
fetch_article_details(pmids="12345678,87654321")
What to Look For in the Returned Results
statusarticle_countformatsourceexport_text
For larger exports, the return may also include downloadable file paths or file information.
Practical Advice
- When unsure, first use
format="ris",source="official" - Only BibTeX requires
source="local" - If you want to keep abstracts, maintain
include_abstract=True - If you only want a few key articles, do not directly export the entire
last, instead pass an explicit PMID list