The 9 E-utilities and Associated Parameters
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.
While all E-utilities URLs begin with the same base URL (https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ ), the E-utilities API actually includes nine different utilities, each of which allows you to formulate a different type of query. Which utility you choose to use will depend on the type of question you are asking. Additionally, each utility allows or requires a different set of parameters. Which parameters you use will define the details of your query. To learn more about combining the base URL, utility name, and parameters to create an E-utilites URL, please see the “How does E-utilities work?” page of our Insider’s Guide Overview.
This page provides information about each of the nine utilities, and provides explanations of many of the parameters E-utilities users should be aware of, especially those working primarily with PubMed data.
The 9 E-utilities
- Introductory Notes
- ESearch: Search a text query in a single Entrez database.
- ESummary: Retrieve document summaries for each UID.
- EFetch: Retrieve full records for each UID.
- EPost: Upload a list of UIDs for later use.
- ELink: Retrieve UIDs for related or linked records, or LinkOut URLs.
- EInfo: Retrieve information and statistics about a single database.
- ESpell: Retrieve spelling suggestions for a text query.
- ECitMatch: Search PubMed for a series of citation strings.
- EGQuery: Search a text query in all Entrez databases and return the number of results for the query in each database.
Introductory Notes
Usage Guidelines
To avoid overloading the E-utilities servers, NCBI asks that you follow a few guidelines when using E-utilities. Details of these guidelines can be found in NCBI’s “A General Introduction to E-utilities” in the Usage Guidelines and Requirements section. Most of these guidelines apply to using E-utilities programmatically, as part of an application or script. However, even ad hoc users should be aware of them. In short, these guidelines cover four general areas:
- Frequency: Please do not post more than three URL requests per second.
- Timing: Please try to limit large jobs to either weekends or between 9:00 PM and 5:00 AM Eastern time during weekdays.
- Identification: Especially for larger jobs or applications, we suggest that you use the
tool
andemail
parameters (see below) so NCBI can contact you should your application cause unintended issues. - Quantity: For some utilities (like ESearch, EFetch, and ESummary), there are limits to how many records can be retrieved with a single URL. For example, each ESearch URL can only retrieve up to 100,000 UIDs. If you wish to exceed these limits, you can use the
retstart
/retmax
parameters, or the NCBI History server.
To enable NCBI to contact you in the event of problems with your use of E-utilties, the tool
and email
parameters are allowed (and encouraged) on any E-utilities URL:
tool
: Name of the application making the E-utility call (no spaces allowed).email
: Your E-mail address. NCBI will use this to contact you if your application is causing unintended issues to the server.
Parameters and the History server
The E-utilities API is at its most powerful when you combine multiple E-utilities queries together in sequence. One way to accomplish this is by storing the results of an E-utilities query on NCBI’s History server. It is then possible to retrieve these stored results and incorporate them in a later E-utilities query.
For the sake of simplicity, we have left these parameters off this page, but you can find out much more about the History server and the relevant parameters on our “E-utilities and the History server” page.
ESearch
ESearch (esearch.fcgi) searches a database and returns a list of unique identifiers (UIDs) for records in that database which meet the search criteria. You can specify the search query, sort results, filter results by date, or combine multiple searches with Boolean AND/OR/NOT by adjusting the parameters. Remember, ESearch only returns UIDs, not full records. To retrieve the full records for each of the UIDs in your result set, consider using the EFetch utility.
ESearch Parameters
ESearch Required Parameters
db
(required): Which database you wish to search. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
term
(required): The text query you wish to search for, similar to the search string you would put into an Entrez database’s web interface. All special characters must be URL encoded (a.k.a “percent encoded”); for more information on URL encoding, see W3Schools’ URL Encoding Reference page. Spaces may be replaced by ‘+’ signs. See the PubMed Help for information about search field descriptions and tags in PubMed.
ESearch Formatting Parameters
retstart
(optional): Setting this parameter helps limit which of the unique identifiers (UIDs) in the results set will be shown in the output, as it determines whether the output begins at the first retrieved UID, or with a UID that is later in the results set. For example, ifretstart
is set to10
, the first ten UIDs in the results set will be skipped, and the output will begin with the eleventh UID. The default of this parameter is0
, corresponding to the first record in the entire set. This parameter can be used in conjunction withretmax
to download an arbitrary subset of UIDs retrieved from a search.retmax
(optional): Total number of unique identifiers (UIDs) from the retrieved set to be shown in the output (default=20). Increasingretmax
allows more of the retrieved UIDs to be included in the output, up to a maximum of 100,000 UIDs. If you need to retrieve more than 100,000 UIDs, you can submit multiple ESearch requests, and increase theretstart
parameter each time. For example:- https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer&retmax=100: This URL will return results 1 through 100 of a search for “Cancer”.
- https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer&retstart=100&retmax=100: This URL will return results 101 through 200 of the same search for “Cancer”.
rettype
(optional): Retrieval type. There are two supported values:uilist
(default): Displays the standard XML output, including a list of unique identifiers (UIDs), the total number of results, and the query translation for the search.count
: Displays only the total number of results, without the list of UIDs or query translation.
retmode
(optional): Determines the format of the returned output. The default value isxml
, butjson
is also supported.
ESearch Date Filter Parameters
datetype
(optional): If you are limiting your search by date, this parameter determines which date field you wish to limit by. Available date types vary by database. For PubMed, validdatetype
values include:crdt
: Create Date (For records added after December 18, 2008, this is the date the citation was first added to PubMed. For more details, see the entry for “Create Date” in MEDLINE/PubMed Data Element (Field) Descriptions.)edat
: Entrez Date (For records added after October 9, 2008, this is the date the citation was added to PubMed, except for records added more than twelve months after the date of publication. For more details, see the entry for “Entrez Date” in MEDLINE/PubMed Data Element (Field) Descriptions.)pdat
: Publication Date (The article’s publication date.)mhda
: MeSH Date (The date the citation was indexed with MeSH. If the citation has not yet been indexed, this will be the same as the Entrez Date.)
For more information on date types, see Searching by date in the PubMed Help.
reldate
(optional): Limit your search to only those items with a date within the last n days. This parameter uses the date field you specified in thedatetype
parameter.mindate
,maxdate
(optional): Limit your search to a specific range of dates. You must include both amindate
and amaxdate
to specify a date range. Dates can be formatted in the following options:- YYYY/MM/DD
- YYYY/MM
- YYYY
ESearch Other Parameters
sort
(optional): Specifies the sort order for the resulting list of unique identifiers (UIDs). The default sort order varies by database (for PubMed, it ismost+recent
), as do the options for sort order. For PubMed, validsort
values include:journal
: Records are sorted alphabetically by journal title, and then by publication date.pub+date
: Records are sorted chronologically by publication date (with most recent first), and then alphabetically by journal title.most+recent
: Records are sorted chronologically by date added to PubMed (with the most recent additions first).relevance
: Records are sorted based on relevance to your search. For more information about PubMed’s relevance ranking, see the PubMed Help section on Computation of Weighted Relevance Order in PubMed.title
: Records are sorted alphabetically by article title.author
: Records are sorted alphabetically by author name, and then by publication date.
field
(optional): Limit your search to a specific field. If used, your entireterm
search query will be searched only within the specified field. This can also be accomplished by including the tag in yourterm
parameter, as if you were tagging a search in the PubMed web interface. For a list of search PubMed search fields, see Search Field Descriptions and Tags in the PubMed Help.
ESearch Examples
- Search PubMed for “cancer”, retrieving only records that were added to PubMed in the last 60 days, and return the first 100 PMIDs.
- Search PubMed for articles in volume 97 of the journal “Proceedings of the National Academy of Sciences” (abbreviated “PNAS”), and return the seventh through 13th PMIDS in the results set.
- Search PubMed for articles about breast cancer which were published in the journal “Science” in 2008.
- Search PubMed for articles about H1N1 and asthma, and return the first 1000 PMIDs in the results set (or all the PMIDs, if there are fewer than 1000).
ESummary
ESummary (esummary.fcgi) returns document summaries for a list of unique identifiers (UIDs). The list of input UIDs is either provided in the parameters, or is retrieved from the History server.
ESummary Parameters
ESummary Required Parameters
db
(required): Database containing the unique identifiers (UIDs) for which you wish to retrieve document summaries. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
id
(required): Either a single unique identifier (UID) or a comma-delimited list of UIDs. All of the UIDs must be from the database specified by thedb
parameter.
ESummary Optional Parameters
retstart
(optional): Setting this parameter helps limit which document summaries will be shown in the output, as it determines whether the document summary for the first input unique identifier (UID) is retrieved, or whether to skip to a later UID in the input list. For example, ifretstart
is set to10
, the output will begin with the document summary for the tenth UID. The default of this parameter is1
, corresponding to the first UID in the input list. This parameter can be used in conjunction withretmax
to download an arbitrary subset of document summaries.retmax
(optional): Total number of document summaries from the retrieved set to be shown in the output, up to a maximum of 10,000. If the set of document summaries you are trying to retrieve is larger than 10,000, you can submit multiple ESummary requests, and increase theretstart
parameter each time.retmode
(optional): Determines the format of the returned output. The default value isxml
, butjson
is also supported.version
(optional): If your summaries are being returned in XML (seeretmode
), this parameter determines which XML schema to use. If this parameter is not used, the generic DocSum (document summary) schema will be used, which applies to all Entrez databases. However, if you set this parameter to2.0
, the 2.0 DocSum XML schema will be used. This schema uses different fields for each Entrez database, and often provides more (and more specific) information than the default schema.
ESummary Examples
- Retrieve document summaries for two PMIDs, using the default DocSum XML schema.
- Retrieve document summaries for two PMIDs, using the 2.0 DocSum XML schema.
EFetch
EFetch (efetch.fcgi) returns full data records for a list of unique identifiers (UIDs) in a format specified in the parameters. The list of UIDs is either provided in the parameters, or is retrieved from the History server.
EFetch Parameters
EFetch Required Parameters
db
(required): Database containing the unique identifiers (UIDs) for which you wish to retrieve records. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
id
(required): Either a single unique identifier (UID) or a comma-delimited list of UIDs. All of the UIDs must be from the database specified by thedb
parameter.
EFetch Optional Parameters
retstart
(optional): Setting this parameter helps limit which records will be shown in the output, as it determines whether the record for the first input unique identifier (UID) is retrieved, or whether to skip to a later UID in the input list. For example, ifretstart
is set to10
, the output will begin with the record for the eleventh UID. The default of this parameter is0
, corresponding to the first UID in the input list. This parameter can be used in conjunction withretmax
to download an arbitrary subset of records.retmax
(optional): Total number of records to be shown in the output, up to a maximum of 10,000. If the set of records you are trying to retrieve is larger than 10,000, you can submit multiple EFetch requests, and increase theretstart
parameter each time.retmode
/rettype
: These two parameters determine how your results will be displayed.retmode
determines the data format your records will be returned in (e.g. XML, plain text, etc.).rettype
determines the specific view your records will be returned in (e.g. MEDLINE, Abstract, list of PMIDs, etc.). Different databases have different allowable data formats and record views, and not allretmode
data formats are compatible with allrettype
record views, and vice versa.The table below shows the allowable combinations of
retmode
andrettype
for some of the databases. Boldretmode
values are the default data format for the specified database. Boldrettype
parameters are the default record view for the specified data format and database.Databases Record Type retmode
rettype
All Document Summary xml docsum All List of UIDs in XML xml uilist All List of UIDs in plain text text uilist MeSH Full record in plain text text full NLM Catalog Full record in plain text text NLM Catalog XML xml PubMed ASN.1 (text) asn.1 PubMed PubMed XML xml PubMed MEDLINE (text) text medline PubMed PMID list (text) text uilist PubMed Abstract (text) text abstract PubMed Summary (text) text docsum Other Entrez databases allow other combinations of
retmode
andrettype
. For details, see NCBI’s “Table of valid values of &retmode and &rettype for EFetch.”
EFetch Examples
- Retrieve the abstract view (text format) of two PubMed records.
- Retrieve two PubMed records in XML format.
EPost
EPost (epost.fcgi) uploads a list of unique identifiers (UIDs) to the History server. There is more information about using the History server to combine multiple searches on our “E-utilities and the History server” page.
EPost Parameters
db
(required): Database containing the unique identifiers (UIDs) you wish to upload. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
id
(required): Either a single unique identifier (UID) or a comma-delimited list of UIDs. All of the UIDs must be from the database specified by thedb
parameter.WebEnv
: If provided this parameter specifies the Web Environment that you wish to upload the UIDs to. You can think of a Web Environment as your current “session”; if you wish to use multiple posted or saved UID lists together, they must all be in the same Web Environment. IfWebEnv
is omitted, EPost will create a new Web Environment, and will post your list of UIDs with thequery_key
value “1”. For more information on Web Environments and query keys, see E-utilities and the History server
EPost Examples
- Post two PMIDs to the history server
ELink
ELink (elink.fcgi) is a very flexible and powerful utility that takes a list of unique identifiers (UIDs) from one database and returns, for each of the listed UIDs:
- a list of UIDs for similar, related or otherwise connected records in the same database,
- a list of UIDs for linked records in a different Entrez database, or
- a list of LinkOut URLs and attributes for related non-Entrez resources.
Because this utility is so powerful and flexible, and because it involves links between databases (and between databases and external resources), it can be challenging to use some of its more advanced features. New users are advised to have patience.
ELink Parameters
ELink Required Parameters
dbfrom
: The database containing your input unique identifiers (UIDs). This is the origin database of your link.db
: The database from which you wish to retrieve linked unique identifiers (UIDs). This is the destination database of your link. Ifdb
anddbfrom
are the same database, then ELink will return computational neighbors (i.e. similar or related records) within that database. Note: thedb
parameter may be omitted if you are using ELink to find LinkOut information instead of similar, related or linked records in an Entrez database.id
: Either a single unique identifier (UID) or a comma-delimited list of UIDs. All of the UIDs must be from the database specified by thedbfrom
parameter.cmd
: This specifies the “command mode” to use with ELink, and determines what type of links or information will be output. Some command modes help identify similar or related records in the same database, others identify linked records in a different Entrez database, and still others identify LinkOut information. The default value forcmd
isneighbor
, but the other options include:neighbor
: Returns a set of UIDs in thedb
database linked to the input UIDs in thedbfrom
database.neighbor_score
: Returns a set of UIDs in a database that are similar or related to the input UIDs, along with the the computed similarity scores. Note thatneighbor_score
returns UIDs from the same database as the input UIDs, and assumes that thedb
anddbfrom
databases are the same.neighbor_history
: Functions similarly toneighbor
, but stores the results to the NCBI History server and returns a Web environment string and query keys for each set of resulting UIDs, so you can use them in future queries. For more information about using the History server to store and combine query results sets, see our “E-utilities and the History server” page.acheck
: Returns a list of all of the available links for the input UIDs. If you specify adb
parameter, only links to that database will be shown. Otherwise, links to all databases will be shown.ncheck
: Checks for the existence of links between your input UIDs and other UIDs in the same database.lcheck
: Checks for the existence of external links (LinkOuts) for your set of input UIDs.llinks
: Checks for the existence of external links (LinkOuts) for your set of input UIDs, and returns LinkOut URLs and provider attributes for all non-library providers.llinkslib
: Checks for the existence of external links (LinkOuts) for your set of input UIDs, and returns LinkOut URLs and provider attributes for all providers (including library providers).prlinks
: Returns the primary LinkOut provider for each input UID. If you input a single UID and use set theretmode
parameter toref
, an ELink URL using theprlinks
command mode will also redirect to the primary LinkOut provider’s website (using the LinkOut URL).
ELink Limiting Parameters
linkname
: Records can be linked or related to other records (in either the same or a different database) in a number of ways. Each different type of link can be identified by specifying 1) the database you are linking from, 2) the database you are linking to, and 3) the name of the specific type of link you wish to use, following the naming convention dbfrom_db_subset. (Note that some link names do not include a subset identifier.) The value of thelinkname
parameter specifies which specific type of link you would like to use.The table below shows a selection of different Entrez links for some of the Entrez databases. For a complete list of links for all Entrez databases, see the Entrez Link Descriptions.
Link Name Link From DB Link To DB Description pmc_pubmed PubMed Central PubMed Finds PubMed citations for specified PMC articles pubmed_pmc PubMed PubMed Central Finds free full-text versions in PMC of specified articles cited in PubMed pubmed_pmc_refs PubMed PubMed Central Finds free full-text articles in PMC that cite the specified PubMed articles pubmed_pubmed PubMed PubMed Finds Similar Articles in PubMed to the specified PubMed articles pubmed_pubmed_alsoviewed PubMed PubMed Finds PubMed articles frequently viewed together with the specified PubMed articles pubmed_pubmed_pmh_cited PubMed PubMed Finds PubMed Health systematic reviews that cite specified PubMed articles term
: Text query used to limit the set of unique identifiers (UIDs) returned, similar to the search string you would put into an Entrez database’s web interface. The linked UIDs will be checked against the results of this search, and only the UIDs for records which match the query will be returned. In essence, the set of UIDs that results from the link will be combined with theterm
query with a Boolean AND. This is especially useful for filtering the results of a link by a given criteria (e.g. date, publication type, etc.). All special characters must be URL encoded (a.k.a “percent encoded”); for more information on URL encoding, see W3Schools’ URL Encoding Reference page. Spaces may be replaced by ‘+’ signs. See the PubMed Help for information about search field descriptions and tags in PubMed.holding
: Name of a LinkOut provider. Only URLs for the LinkOut provider specified will be returned. The value you use forholding
should be the LinkOut provider’s name abbreviation, found in the<NameAbbr>
tag of the ELink XML output. Note that theholding
parameter is only permitted when using command modellinks
orllinkslib
.
ELink Date Filter Parameters
datetype
(optional): If you wish to limit your retrieved links by date, this parameter determines which date field you wish to limit by. Available date types vary by output database (i.e. by which database you have specified in yourdb
parameter). For PubMed, validdatetype
values include:crdt
: Create Date (For records added after December 18, 2008, this is the date the citation was first added to PubMed. For more details, see the entry for “Create Date” in MEDLINE/PubMed Data Element (Field) Descriptions.)edat
: Entrez Date (For records added after October 9, 2008, this is the date the citation was added to PubMed, except for records added more than twelve months after the date of publication. For more details, see the entry for “Entrez Date” in MEDLINE/PubMed Data Element (Field) Descriptions.)pdat
: Publication Date (The article’s publication date.)mhda
: MeSH Date (The date the citation was indexed with MeSH. If the citation has not yet been indexed, this will be the same as the Entrez Date.)
For more information on date types, see the Searching by date in the PubMed Help.
reldate
(optional): Limit your retrieved links to only those items with a date within the last n days. This parameter uses the date field you specified in thedatetype
parameter.mindate
,maxdate
(optional): Limit your retrieved links to a specific range of dates. You must include both amindate
and amaxdate
to specify a date range. Dates can be formatted in the following options:- YYYY/MM/DD
- YYYY/MM
- YYYY
ELink Examples
- Find PubMed records for articles similar to the PubMed record with PMID 20210808:
- Find PubMed records frequently viewed together with the PubMed record with PMID 26966072:
- Find all PubMed records related to the PubMed record with PMID 20226291:
- List all LinkOut URLs for two PubMed records with specified PMIDs:
- Find links to full-text providers for two PubMed records with specified PMIDs:
- Link directly to the full-text for a PubMed record at the provider’s web site:
EInfo
EInfo (einfo.fcgi) provides statistics for a single database including lists of indexing fields and available link names. EInfo can also provide a list of all Entrez databases.
EInfo Parameters
db
: Which database you wish to retrieve statistics for. If thedb
parameter is omitted, EInfo will return a list of all of the Entrez databases. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
version
: EInfo returns statistics in two different XML schemas. If you omit theversion
parameter, the default schema is used. If you include theversion
parameter, the only supported value is2.0
. The 2.0 EInfo XML includes two extra fields:<IsTruncatable>
: Fields that are truncatable allow the wildcard character ‘*’ in terms. The wildcard character will expand to match any set of characters up to a limit of 600 unique expansions.<IsRangeable>
: Fields that are rangeable allow the range operator ‘:’ to be placed between a lower and upper limit for the desired range (e.g. 2008:2010[pdat]).
retmode
: Determines the format of the returned output. The default value isxml
, butjson
is also supported.
EInfo Examples
- Retrieve a list of NCBI’s Entrez databases:
- Retrieve database statistics for PubMed, using the 2.0 XML schema.
ESpell
ESpell (espell.fcgi) provides spelling suggestions for terms within a single text query in a given database.
ESpell Parameters
db
(required): Which database your search is intended for. Each database provides different spelling suggestions, so you should use the database which you plan to search. You can see NCBI’s table of Entrez Unique Identifiers (UIDs) for a complete list of allowable database names, but some example values include:pubmed
: PubMedpmc
: PubMed Centralnlmcatalog
: NLM Catalog
term
(required): The text query you wish to spellcheck, similar to the search string you would put into an Entrez database’s web interface. All special characters must be URL encoded (a.k.a “percent encoded”); for more information on URL encoding, see W3Schools’ URL Encoding Reference page. Spaces may be replaced by ‘+’ signs. See the PubMed Help for information about search field descriptions and tags in PubMed.
ESpell Examples
- Provide spelling suggestions for the PubMed search “asthmaa OR alergies”:
- Provide spelling suggestions for the PubMed search “deoxyribonulceic acid”:
ECitMatch
ECitMatch (ecitmatch.cgi) retrieves PubMed IDs (PMIDs) that correspond to a set of input citation strings. This is E-utilities version of the PubMed Batch Citation Matcher, and uses the same input format.
ECitMatch Parameters
db
(required): Which database you wish to search. The only supported value is ‘pubmed’.bdata
(required): The citation strings for which you are attempting to retrieve PMIDs. Each citation you are trying to match must be listed in the following format:journal_title|year|volume|first_page|author_name|your_key|
Multiple citation strings should be separated by a carriage return character (
%0D
). Theyour_key
value is an arbitrary label that you can use to keep track of which citation is which, and will be included in the output. Be aware that all spaces must be replaced by ‘+’ symbols and that citation strings should end with a final vertical bar ‘|’.For more information on how to format these input strings, see the Batch Citation Matcher Help.
email
: This parameter is recommended for all E-utilities URLs, but is especially useful with ECitMatch. If you specify anemail
but omit theretmode
parameter, your results will be sent to the specified e-mail address, rather than displayed on the screen.
ECitMatch Examples
- Retrieve PMIDs for two citations, given the specified information.
EGQuery
EGQuery (egquery.fcgi) allows you to search all Entrez databases for a single text query, and return the number of results that match that query in each database. Note: EGQuery does not return the matching UIDs from each database, only the number of results that match.
EGQuery Parameters
term
(required): The text query you wish to search for, similar to the search string you would put into an Entrez database’s web interface. All special characters must be URL encoded (a.k.a “percent encoded”); for more information on URL encoding, see W3Schools’ URL Encoding Reference page. Spaces may be replaced by ‘+’ signs.
EGQuery Examples
- Search all NCBI Entrez databases for the search string “asthma”:
- Search all NCBI Entrez databases for the search string “breast cancer”: