Scroll to navigation

EFETCH(1) NCBI Entrez Direct User's Manual EFETCH(1)


efetch, esummary - retrieve results from an NCBI Entrez search


efetch (edirect -fetch) [-help] [-format fmt] [-mode mode] [-style style] [-db name] [-id ID] [-input filename] [-seq_start N] [-seq_stop N] [-strand N] [-forward] [-revcomp] [-chr_start N] [-chr_stop N] [-complexity N] [-extend N] [-extrafeat N] [-showgaps] [-start N] [-stop N] [-raw] [-json] [-examples]

esummary (edirect -summary) [-help] [-mode mode] [-style style] [-db name] [-id ID] [-input filename] [-seq_start N] [-seq_stop N] [-strand N] [-forward] [-revcomp] [-chr_start N] [-chr_stop N] [-complexity N] [-extend N] [-extrafeat N] [-showgaps] [-start N] [-stop N] [-raw] [-json] [-examples]


efetch and esummary retrieve results from either an edirect(1) pipeline or an immediate lookup (via -db and -id or -input). esummary is equivalent to efetch -format docsum.

Both have two implementations: a shell implementation on top of nquire(1) and a historical Perl implementation that amounts to running edirect -fetch or edirect -summary, enabled by setting the environment variable USE_NEW_EDIRECT to a false value as described in the ENVIRONMENT section. Some options are implementation-specific, as detailed below.

efetch is also the name of an AceDB tool for consulting local sequence databases. To resolve this ambiguity, Debian systems with both AceDB tools and Entrez Direct installed arrange for AceDB's executable to have the name efetch.acedb(1) and for efetch to be a wrapper script that examines its usage and proceeds to run whichever of edirect -fetch or efetch.acedb(1) looks like a better fit.


Format Selection

Format of record or report. (See -help output for examples.)
text, xml, asn.1, or json.
master (shell implementation only), withparts (Perl implementation only), or conwithfeat.

Direct Record Selection

Entrez database name for immediate lookups.
Unique identifier or accession for immediate lookups.
Read identifer(s) from file instead of standard input.

Sequence Range

First sequence position to retrieve (1-based).
Last sequence position to retrieve (1-based).
Strand of DNA to retrieve: 1 for forward (plus), 2 for reverse complement (minus).
Shortcut for -strand 1.
Shortcut for -strand 2.

Gene Range

First sequence position to retrieve (0-based).
Last sequence position to retrieve (0-based).

Sequence Flags

How much context to fetch:
Nuc-prot set
Extend sequence retrieval by N residues in both directions.
Bit flag specifying extra features.
Propagate component gaps.

Subset Retrieval

First record to fetch.
Last record to fetch.


Skip database-specific XML modifications.
Convert adjusted XML output to JSON.
Print usage information, complete with examples of notable -db/-format/-mode combinations.

Accession Mapping

Print esummary examples with accessions in the -id field.


Whether to use the current shell implementation or revert to the historical Perl implementation. Canonical true values are 1, on (case-insensitive), true (case-insensitive), and yes (case-insensitive); canonical false values are 0, off (case-insensitive), false (case-insensitive), and no (case-insensitive).


eblast(1), edirect(1), efetch.acedb(1), esample(1), esearch(1), exclude-uid-lists(1), intersect-uid-lists(1), nquire(1), rchive(1), transmute(1), xml2tbl(1), xtract(1).

2021-01-24 NCBI