efetch


This documentation reflects EDirect version 7.60, released on 11/14/2017.

We strive to keep this documentation up-to-date with the latest release. If you are looking for documentation on a more recent version of EDirect, or to find out more about new EDirect releases, please see the Release Notes of NCBI's EDirect documentation.


The efetch command uses the EFetch utility to download records from an NCBI database in a specified format.

Input

One or more unique identifiers (UIDs; when fetching from PubMed, PMIDs). These UIDs can be specified in the -id argument (see below), or can be retrieved from the History server.

Output

One or more records displayed in a chosen format:

  • A list of UIDs (i.e. PMIDs).
  • Abstract view, formatted in plain text.
  • MEDLINE view, including the field indicators.
  • The full XML of the record.

Arguments

The efetch command allows the following arguments:

  • -db: The database from which you wish to retrieve records.
    • 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
  • -format: Specifies the format in which you wish to display the records.
    • For PubMed, the valid formats include:
      • uid: displays a list of UIDs (i.e. PMIDs).
      • abstract: displays the Abstract view, formatted in plain text.
      • medline: displays the MEDLINE view, including the field indicators.
      • xml: displays the full PubMed XML.
    • Example: -format uid
    • Example: -format xml

Examples:

Retrieve the record for PMID 25359968 in MEDLINE format:

efetch -db pubmed -id 25359968 -format medline

Retrieve the record for PMID 26287646 in XML format:

efetch -db pubmed -id 26287646 -format xml

Retrieve the records for PMIDs 24102982, 21171099, and 17150207 in abstract view:

efetch -db pubmed -id 24102982,21171099,17150207 -format abstract