pubmed_batch_fetch
Fetch PubMed records in batches from long PMID lists or NCBI Entrez History, chunking requests up to batch size for complete retrieval.
Instructions
Batch fetch PubMed records in chunks supporting long PMID lists (>200) or NCBI Entrez History.
Supports two retrieval modes:
Direct PMID batching: Accepts an arbitrary list of PMIDs, chunking them into batch_size (max 200).
Entrez History batching: Accepts webenv and query_key from a prior pubmed_search(..., use_history=True), iterating retstart up to total_records in chunks of batch_size.
Args: pmids: Optional list of PMIDs (arbitrary length; chunked into batch_size). webenv: Optional NCBI WebEnv token from a prior pubmed_search(..., use_history=True). query_key: Optional NCBI QueryKey token from a prior pubmed_search. retstart: Starting offset for pagination (default 0). total_records: Total records to retrieve in Entrez History mode (if omitted, queries history count). batch_size: Number of records per chunk (1-200, default 200).
Returns: Comprehensive batch execution report, per-batch results, per-record statuses ('status': 'success'), not_found PMIDs, and audit provenance.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pmids | No | ||
| webenv | No | ||
| retstart | No | ||
| query_key | No | ||
| batch_size | No | ||
| total_records | No |