Skip Navigation Bar
NLM logo


Please note: following the release of the new version of PubMed, the results returned by E-utilities queries of PubMed may differ slightly from those returned in the web version of PubMed. A new PubMed API is currently under development: more information will be announced when available.

As new Insider's Guide classes are no longer being offered, this site is not currently being updated. Please refer to NCBI's E-utilities documentation for more up-to-date information.

The epost command uses the EPost utility to post a list of unique identifiers (UIDs; i.e. PMIDs) to the History server, so they can be used by a later command.


One or more unique identifiers (UIDs; i.e. PMIDs). These UIDs can be specified in the -id argument (see below), can be listed in a file specified in the -input argument (see below), or can be piped in from a previous command using “|”. For more information on creating pipelines, see the “Making data pipelines with the History server” section of our EDirect overview.


A snippet of XML that includes a count of the number of UIDs posted:


In addition, epost posts the UIDs and the database they are associated with, and stores them on the History server, using the Web Environment and Query Key specified in the XML snippet.


The epost command allows the following arguments:

  • -db: The database which the UIDs you wish to post are associated with.
    • Example: -db pubmed
  • -id: One or more UIDs (PMIDs, if your -db argument is pubmed), separated by commas.
    • Example: -id 24102982,21171099,17150207
    • Example: -id 26287646
  • -input: A text file containing a list of UIDs (PMIDs, if your -db argument is pubmed), with one UID on each line. This could be a .csv file, a .txt file, or any other file plain text file format.
    • Example: -input pmids.csv
    • Example: -input pmids.txt


Post the PMID 25359968 to the History server:

epost -db pubmed -id 25359968

Post the PMIDs 24102982, 21171099, and 17150207 to the History server:

epost -db pubmed -id 24102982,21171099,17150207

Post the PMIDs listed in the file “pmids.csv” to the History server:

epost -db pubmed -input pmids.csv

Last Reviewed: August 9, 2021