nih-gov/www.ncbi.nlm.nih.gov/books/NBK25500/index.html?report=printable
2025-03-17 02:05:34 +00:00

192 lines
No EOL
60 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- AppResources meta begin -->
<meta name="paf-app-resources" content="" />
<script type="text/javascript">var ncbi_startTime = new Date();</script>
<!-- AppResources meta end -->
<!-- TemplateResources meta begin -->
<meta name="paf_template" content="" />
<!-- TemplateResources meta end -->
<!-- Logger begin -->
<meta name="ncbi_db" content="books" /><meta name="ncbi_pdid" content="book-part" /><meta name="ncbi_acc" content="NBK25500" /><meta name="ncbi_domain" content="helpeutils" /><meta name="ncbi_report" content="printable" /><meta name="ncbi_type" content="fulltext" /><meta name="ncbi_objectid" content="" /><meta name="ncbi_pcid" content="/NBK25500/?report=printable" /><meta name="ncbi_app" content="bookshelf" />
<!-- Logger end -->
<title>E-utilities Quick Start - Entrez Programming Utilities Help - NCBI Bookshelf</title>
<!-- AppResources external_resources begin -->
<link rel="stylesheet" href="/core/jig/1.15.2/css/jig.min.css" /><script type="text/javascript" src="/core/jig/1.15.2/js/jig.min.js"></script>
<!-- AppResources external_resources end -->
<!-- Page meta begin -->
<meta name="robots" content="INDEX,FOLLOW,NOARCHIVE" /><meta name="citation_inbook_title" content="Entrez Programming Utilities Help [Internet]" /><meta name="citation_title" content="E-utilities Quick Start" /><meta name="citation_publisher" content="National Center for Biotechnology Information (US)" /><meta name="citation_date" content="2018/10/24" /><meta name="citation_author" content="Eric Sayers" /><meta name="citation_fulltext_html_url" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><link rel="schema.DC" href="http://purl.org/DC/elements/1.0/" /><meta name="DC.Title" content="E-utilities Quick Start" /><meta name="DC.Type" content="Text" /><meta name="DC.Publisher" content="National Center for Biotechnology Information (US)" /><meta name="DC.Contributor" content="Eric Sayers" /><meta name="DC.Date" content="2018/10/24" /><meta name="DC.Identifier" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><meta name="description" content="Please see our Release Notes for details on recent changes and updates." /><meta name="og:title" content="E-utilities Quick Start" /><meta name="og:type" content="book" /><meta name="og:description" content="Please see our Release Notes for details on recent changes and updates." /><meta name="og:url" content="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><meta name="og:site_name" content="NCBI Bookshelf" /><meta name="og:image" content="https://www.ncbi.nlm.nih.gov/corehtml/pmc/pmcgifs/bookshelf/thumbs/th-helpeutils-lrg.png" /><meta name="twitter:card" content="summary" /><meta name="twitter:site" content="@ncbibooks" /><meta name="bk-non-canon-loc" content="/books/n/helpeutils/chapter1/" /><link rel="canonical" href="https://www.ncbi.nlm.nih.gov/books/NBK25500/" /><link rel="stylesheet" href="/corehtml/pmc/css/figpopup.css" type="text/css" media="screen" /><link rel="stylesheet" href="/corehtml/pmc/css/bookshelf/2.26/css/books.min.css" type="text/css" /><link rel="stylesheet" href="/corehtml/pmc/css/bookshelf/2.26/css/books_print.min.css" type="text/css" /><style type="text/css">p a.figpopup{display:inline !important} .bk_tt {font-family: monospace} .first-line-outdent .bk_ref {display: inline} </style><script type="text/javascript" src="/corehtml/pmc/js/jquery.hoverIntent.min.js"> </script><script type="text/javascript" src="/corehtml/pmc/js/common.min.js?_=3.18"> </script><script type="text/javascript">window.name="mainwindow";</script><script type="text/javascript" src="/corehtml/pmc/js/bookshelf/2.26/book-toc.min.js"> </script><script type="text/javascript" src="/corehtml/pmc/js/bookshelf/2.26/books.min.js"> </script>
<!-- Page meta end -->
<link rel="shortcut icon" href="//www.ncbi.nlm.nih.gov/favicon.ico" /><meta name="ncbi_phid" content="CE8B4AA87C805E610000000000EC00AB.m_5" />
<meta name='referrer' content='origin-when-cross-origin'/><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/css/3852956/3985586/3808861/4121862/3974050/3917732/251717/4216701/14534/45193/4113719/3849091/3984811/3751656/4033350/3840896/3577051/3852958/3984801/12930/3964959.css" /><link type="text/css" rel="stylesheet" href="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/css/3411343/3882866.css" media="print" /></head>
<body class="book-part">
<div class="grid no_max_width">
<div class="col twelve_col nomargin shadow">
<!-- System messages like service outage or JS required; this is handled by the TemplateResources portlet -->
<div class="sysmessages">
<noscript>
<p class="nojs">
<strong>Warning:</strong>
The NCBI web site requires JavaScript to function.
<a href="/guide/browsers/#enablejs" title="Learn how to enable JavaScript" target="_blank">more...</a>
</p>
</noscript>
</div>
<!--/.sysmessage-->
<div class="wrap">
<div class="page">
<div class="top">
<div class="header">
</div>
<!--<component id="Page" label="headcontent"/>-->
</div>
<div class="content">
<!-- site messages -->
<div class="container content">
<div class="document">
<div class="pre-content"><div><div class="bk_prnt"><p class="small">NCBI Bookshelf. A service of the National Library of Medicine, National Institutes of Health.</p><p>Entrez Programming Utilities Help [Internet]. Bethesda (MD): National Center for Biotechnology Information (US); 2010-. </p></div></div></div>
<div class="main-content lit-style" itemscope="itemscope" itemtype="http://schema.org/CreativeWork"><div class="meta-content fm-sec"><h1 id="_NBK25500_"><span class="title" itemprop="name">E-utilities Quick Start</span></h1><p class="contrib-group"><h4>Authors</h4><span itemprop="author">Eric Sayers</span>, PhD<sup><img src="/corehtml/pmc/pmcgifs/corrauth.gif" alt="corresponding author" /></sup><sup>1</sup>.</p><h4>Affiliations</h4><div class="affiliation"><sup>1</sup> NCBI<div><span class="email-label">Email: </span><a href="mailto:dev@null" data-email="vog.hin.mln.ibcn@sreyas" class="oemail">vog.hin.mln.ibcn@sreyas</a></div></div><div><sup><img src="/corehtml/pmc/pmcgifs/corrauth.gif" alt="corresponding author" /></sup>Corresponding author.</div><p class="small">Created: <span itemprop="datePublished">December 12, 2008</span>; Last Update: <span itemprop="dateModified">October 24, 2018</span>.</p><p><em>Estimated reading time: 10 minutes</em></p></div><div class="body-content whole_rhythm" itemprop="text"><div id="chapter1.Release_Notes"><h2 id="_chapter1_Release_Notes_">Release Notes</h2><p>Please see our <a href="/books/n/helpeutils/chapter4/#chapter4.Release_Notes">Release Notes</a> for details on recent changes and updates.</p></div><div id="chapter1.Announcement"><h2 id="_chapter1_Announcement_">Announcement</h2><p>On December 1, 2018, NCBI will begin enforcing the use of new API keys for E-utility calls. Please see <a href="/books/n/helpeutils/chapter2/">Chapter 2</a> for more details about this important change.</p></div><div id="chapter1.Introduction"><h2 id="_chapter1_Introduction_">Introduction</h2><p>This chapter provides a brief overview of basic E-utility functions along with examples of URL calls. Please see <a href="/books/n/helpeutils/chapter2/">Chapter 2</a> for a general introduction to these utilities and <a href="/books/n/helpeutils/chapter4/">Chapter 4</a> for a detailed discussion of syntax and parameters.</p><p><i>Examples</i> include live URLs that provide sample outputs.</p><p>All E-utility calls share the same base URL:</p><pre>https://eutils.ncbi.nlm.nih.gov/entrez/eutils/</pre></div><div id="chapter1.Searching_a_Database"><h2 id="_chapter1_Searching_a_Database_">Searching a Database</h2><div id="chapter1.Basic_Searching"><h3>Basic Searching</h3><pre>esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query&#x0003e;</pre><p>Input: Entrez database (&#x00026;db); Any Entrez text query (&#x00026;term)</p><p>Output: List of UIDs matching the Entrez query</p><p>
<i>Example: Get the PubMed IDs (PMIDs) for articles about breast cancer published in Science in 2008</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#x00026;term=science%5bjournal%5d+AND+breast+cancer+AND+2008%5bpdat%5d" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#x00026;term=science[journal]+AND+breast+cancer+AND+2008[pdat]</a>
</span>
</p></div><div id="chapter1.Storing_Search_Results"><h3>Storing Search Results</h3><pre>esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query&#x0003e;&#x00026;usehistory=y</pre><p>Input: Any Entrez text query (&#x00026;term); Entrez database (&#x00026;db); &#x00026;usehistory=y</p><p>Output: Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) parameters specifying the location on the Entrez history server of the list of UIDs matching the Entrez query</p><p>
<i>Example: Get the PubMed IDs (PMIDs) for articles about breast cancer published in Science in 2008, and store them on the Entrez history server for later use</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#x00026;term=science%5bjournal%5d+AND+breast+cancer+AND+2008%5bpdat%5d&#x00026;usehistory=y" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&#x00026;term=science[journal]+AND+breast+cancer+AND+2008[pdat]&#x00026;usehistory=y</a>
</span>
</p></div><div id="chapter1.Associating_Search_Results_with"><h3>Associating Search Results with Existing Search Results</h3><pre>esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query1&#x0003e;&#x00026;usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1) <br /><br />esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query2&#x0003e;&#x00026;usehistory=y&#x00026;WebEnv=$web1<br /><br /># esearch produces WebEnv value ($web2) that contains the results <br />of both searches ($key1 and $key2)</pre><p>Input: Any Entrez text query (&#x00026;term); Entrez database (&#x00026;db); &#x00026;usehistory=y; Existing web environment (&#x00026;WebEnv) from a prior E-utility call</p><p>Output: Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) parameters specifying the location on the Entrez history server of the list of UIDs matching the Entrez query</p></div><div id="chapter1.For_More_Information"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ESearch">ESearch In-Depth</a> for a full description of ESearch.</p></div><div id="chapter1.Sample_ESearch_Output"><h3>Sample ESearch Output</h3><pre>&#x0003c;?xml version="1.0" ?&#x0003e;<br />&#x0003c;!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD eSearchResult, 11 May 2002//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSearch_020511.dtd"&#x0003e;<br />&#x0003c;eSearchResult&#x0003e;<br />&#x0003c;Count&#x0003e;255147&#x0003c;/Count&#x0003e; # total number of records matching query<br />&#x0003c;RetMax&#x0003e;20&#x0003c;/RetMax&#x0003e;# number of UIDs returned in this XML; default=20<br />&#x0003c;RetStart&#x0003e;0&#x0003c;/RetStart&#x0003e;# index of first record returned; default=0<br />&#x0003c;QueryKey&#x0003e;1&#x0003c;/QueryKey&#x0003e;# QueryKey, only present if &#x00026;usehistory=y<br />&#x0003c;WebEnv&#x0003e;0l93yIkBjmM60UBXuvBvPfBIq8-9nIsldXuMP0hhuMH-<br />8GjCz7F_Dz1XL6z@397033B29A81FB01_0038SID&#x0003c;/WebEnv&#x0003e; <br /> # WebEnv; only present if &#x00026;usehistory=y<br /> &#x0003c;IdList&#x0003e;<br />&#x0003c;Id&#x0003e;229486465&#x0003c;/Id&#x0003e; # list of UIDs returned<br />&#x0003c;Id&#x0003e;229486321&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229485738&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229470359&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463047&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463037&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463022&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463019&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463007&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463002&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229463000&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462974&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462961&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462956&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462921&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462905&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462899&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462873&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462863&#x0003c;/Id&#x0003e;<br />&#x0003c;Id&#x0003e;229462862&#x0003c;/Id&#x0003e;<br />&#x0003c;/IdList&#x0003e;<br />&#x0003c;TranslationSet&#x0003e; # details of how Entrez translated the query<br /> &#x0003c;Translation&#x0003e;<br /> &#x0003c;From&#x0003e;mouse[orgn]&#x0003c;/From&#x0003e;<br /> &#x0003c;To&#x0003e;"Mus musculus"[Organism]&#x0003c;/To&#x0003e;<br /> &#x0003c;/Translation&#x0003e;<br />&#x0003c;/TranslationSet&#x0003e;<br />&#x0003c;TranslationStack&#x0003e;<br /> &#x0003c;TermSet&#x0003e;<br /> &#x0003c;Term&#x0003e;"Mus musculus"[Organism]&#x0003c;/Term&#x0003e;<br /> &#x0003c;Field&#x0003e;Organism&#x0003c;/Field&#x0003e;<br /> &#x0003c;Count&#x0003e;255147&#x0003c;/Count&#x0003e;<br /> &#x0003c;Explode&#x0003e;Y&#x0003c;/Explode&#x0003e;<br /> &#x0003c;/TermSet&#x0003e;<br /> &#x0003c;OP&#x0003e;GROUP&#x0003c;/OP&#x0003e;<br />&#x0003c;/TranslationStack&#x0003e;<br />&#x0003c;QueryTranslation&#x0003e;"Mus musculus"[Organism]&#x0003c;/QueryTranslation&#x0003e;<br />&#x0003c;/eSearchResult&#x0003e;</pre></div><div id="chapter1.Searching_PubMed_with_Citation"><h3>Searching PubMed with Citation Data</h3><pre>ecitmatch.cgi?db=pubmed&#x00026;rettype=xml&#x00026;bdata=&#x0003c;citations&#x0003e;</pre><p>Input: List of citation strings separated by a carriage return (%0D), where each citation string has the following format:</p><p>journal_title|year|volume|first_page|author_name|your_key|</p><p>
<i>Output: A list of citation strings with the corresponding PubMed ID (PMID) appended.</i>
</p><p>
<i>Example: Search PubMed for the following ciations:</i>
</p><p>Art1: Mann, BJ. (1991) <i>Proc. Natl. Acad. Sci. USA.</i> 88:3248</p><p>Art2: Palmenberg, AC. (1987) <i>Science</i> 235:182</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ecitmatch.cgi?db=pubmed&#x00026;retmode=xml&#x00026;bdata=proc+natl+acad+sci+u+s+a|1991|88|3248|mann+bj|Art1|%0Dscience|1987|235|182|palmenberg+ac|Art2|" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/ecitmatch.cgi?db=pubmed&#x00026;retmode=xml&#x00026;bdata=proc+natl+acad+sci+u+s+a|1991|88|3248|mann+bj|Art1|%0Dscience|1987|235|182|palmenberg+ac|Art2|</a>
</span>
</p><p>Sample Output (the PMIDs appear in the rightmost field):</p><pre>proc natl acad sci u s a|1991|88|3248|mann bj|Art1|2014248<br />science|1987|235|182|palmenberg ac|Art2|3026048</pre><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ECitMatch">ECitMatch In-Depth</a> for a full description of ECitMatch.</p></div></div><div id="chapter1.Uploading_UIDs_to_Entrez"><h2 id="_chapter1_Uploading_UIDs_to_Entrez_">Uploading UIDs to Entrez</h2><div id="chapter1.Basic_Uploading"><h3>Basic Uploading</h3><pre>epost.fcgi?db=&#x0003c;database&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;</pre><p>Input: List of UIDs (&#x00026;id); Entrez database (&#x00026;db)</p><p>Output: Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) parameters specifying the location on the Entrez history server of the list of uploaded UIDs</p><p>
<i>Example: Upload five Gene IDs (7173,22018,54314,403521,525013) for later processing.</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/epost.fcgi?db=gene&#x00026;id=7173,22018,54314,403521,525013" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/epost.fcgi?db=gene&#x00026;id=7173,22018,54314,403521,525013</a>
</span>
</p></div><div id="chapter1.Associating_a_Set_of_UIDs_with"><h3>Associating a Set of UIDs with Previously Posted Sets</h3><pre>epost.fcgi?db=&#x0003c;database1&#x0003e;&#x00026;id=&#x0003c;uid_list1&#x0003e;<br /><br /># epost produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />epost.fcgi?db=&#x0003c;database2&#x0003e;&#x00026;id=&#x0003c;uid_list2&#x0003e;&#x00026;WebEnv=$web1<br /><br /># epost produces WebEnv value ($web2) that contains the results of both <br />posts ($key1 and $key2)</pre><p>Input: List of UIDs (&#x00026;id); Entrez database (&#x00026;db); Existing web environment (&#x00026;WebEnv)</p><p>Output: Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) parameters specifying the location on the Entrez history server of the list of uploaded UIDs</p></div><div id="chapter1.For_More_Information_1"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EPost">EPost In-Depth</a> for a full description of EPost.</p></div><div id="chapter1.Sample_EPost_Output"><h3>Sample EPost Output</h3><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE ePostResult PUBLIC "-//NLM//DTD ePostResult, 11 May 2002//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/ePost_020511.dtd"&#x0003e;<br />&#x0003c;ePostResult&#x0003e;<br />&#x0003c;QueryKey&#x0003e;1&#x0003c;/QueryKey&#x0003e;<br />&#x0003c;WebEnv&#x0003e;NCID_01_268116914_130.14.18.47_9001_1241798628&#x0003c;/WebEnv&#x0003e;<br />&#x0003c;/ePostResult&#x0003e;</pre></div></div><div id="chapter1.Downloading_Document_Summaries"><h2 id="_chapter1_Downloading_Document_Summaries_">Downloading Document Summaries</h2><div id="chapter1.Basic_Downloading"><h3>Basic Downloading</h3><pre>esummary.fcgi?db=&#x0003c;database&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;</pre><p>Input: List of UIDs (&#x00026;id); Entrez database (&#x00026;db)</p><p>Output: XML DocSums</p><p>
<i>Example: Download DocSums for these protein GIs: 6678417,9507199,28558982,28558984,28558988,28558990</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&#x00026;id=6678417,9507199,28558982,28558984,28558988,28558990" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=protein&#x00026;id=6678417,9507199,28558982,28558984,28558988,28558990</a>
</span>
</p></div><div id="chapter1.Downloading_Data_From_a_Previou"><h3>Downloading Data From a Previous Search</h3><pre>esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query&#x0003e;&#x00026;usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />esummary.fcgi?db=&#x0003c;database&#x0003e;&#x00026;query_key=$key1&#x00026;WebEnv=$web1</pre><p>Input: Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) representing a set of Entrez UIDs on the Entrez history server</p><p>Output: XML DocSums</p></div><div id="chapter1.Sample_ESummary_Output"><h3>Sample ESummary Output</h3><p>The output of ESummary is a series of XML &#x0201c;DocSums&#x0201d; (Document Summaries), the format of which depends on the database. Below is an example DocSum for Entrez Protein.</p><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult, 29 October<br /> 2004//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummary_<br />041029.dtd"&#x0003e;<br />&#x0003c;eSummaryResult&#x0003e;<br />&#x0003c;DocSum&#x0003e;<br />&#x0003c;Id&#x0003e;15718680&#x0003c;/Id&#x0003e;<br />&#x0003c;Item Name="Caption" Type="String"&#x0003e;<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537</a>&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Title" Type="String"&#x0003e;IL2-inducible T-cell kinase [Homo<br /> sapiens]&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Extra" <br />Type="String"&#x0003e;gi|15718680|ref|<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537.3</a>|[15718680]&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Gi" Type="Integer"&#x0003e;15718680&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="CreateDate" Type="String"&#x0003e;1999/06/09&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="UpdateDate" Type="String"&#x0003e;2009/04/05&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Flags" Type="Integer"&#x0003e;512&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="TaxId" Type="Integer"&#x0003e;9606&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Length" Type="Integer"&#x0003e;620&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Status" Type="String"&#x0003e;live&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="ReplacedBy" Type="String"&#x0003e;&#x0003c;/Item&#x0003e;<br />&#x0003c;Item Name="Comment" Type="String"&#x0003e;&#x0003c;![CDATA[ ]]&#x0003e;&#x0003c;/Item&#x0003e;<br />&#x0003c;/DocSum&#x0003e;<br />&#x0003c;/eSummaryResult&#x0003e;</pre></div><div id="chapter1.Sample_ESummary_version_2_0_Out"><h3>Sample ESummary version 2.0 Output</h3><p>Version 2.0 of ESummary is an alternate XML presentation of Entrez DocSums. To retrieve version 2.0 DocSums, the URL should contain the &#x00026;version parameter with an assigned value of &#x02018;2.0&#x02019;. Each Entrez database provides its own unique DTD for version 2.0 DocSums, and a link to the relevant DTD is provided in the header of the version 2.0 XML.</p><pre>esummary.fcgi?db=&#x0003c;database&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;&#x00026;version=2.0</pre><p>Below is an example version 2.0 DocSum from Entrez Protein (the same record as shown above in the default DocSum XML).</p><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE eSummaryResult PUBLIC "-//NLM//DTD eSummaryResult//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSummaryDTD/eSummary_protein.dtd"&#x0003e;<br />&#x0003c;eSummaryResult&#x0003e;<br /> &#x0003c;DocumentSummarySet status="OK"&#x0003e;<br /> &#x0003c;DocumentSummary uid="15718680"&#x0003e;<br /> &#x0003c;Caption&#x0003e;<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537</a>&#x0003c;/Caption&#x0003e;<br /> &#x0003c;Title&#x0003e;tyrosine-protein kinase ITK/TSK [Homo sapiens]&#x0003c;/Title&#x0003e;<br /> &#x0003c;Extra&#x0003e;gi|15718680|ref|<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537.3</a>|&#x0003c;/Extra&#x0003e;<br /> &#x0003c;Gi&#x0003e;15718680&#x0003c;/Gi&#x0003e;<br /><br /> &#x0003c;CreateDate&#x0003e;1999/06/09&#x0003c;/CreateDate&#x0003e;<br /> &#x0003c;UpdateDate&#x0003e;2011/10/09&#x0003c;/UpdateDate&#x0003e;<br /> &#x0003c;Flags&#x0003e;512&#x0003c;/Flags&#x0003e;<br /> &#x0003c;TaxId&#x0003e;9606&#x0003c;/TaxId&#x0003e;<br /> &#x0003c;Slen&#x0003e;620&#x0003c;/Slen&#x0003e;<br /><br /> &#x0003c;Biomol/&#x0003e;<br /><br /> &#x0003c;MolType&#x0003e;aa&#x0003c;/MolType&#x0003e;<br /> &#x0003c;Topology&#x0003e;linear&#x0003c;/Topology&#x0003e;<br /> &#x0003c;SourceDb&#x0003e;refseq&#x0003c;/SourceDb&#x0003e;<br /> &#x0003c;SegSetSize&#x0003e;0&#x0003c;/SegSetSize&#x0003e;<br /> &#x0003c;ProjectId&#x0003e;0&#x0003c;/ProjectId&#x0003e;<br /> &#x0003c;Genome&#x0003e;genomic&#x0003c;/Genome&#x0003e;<br /><br /> &#x0003c;SubType&#x0003e;chromosome|map&#x0003c;/SubType&#x0003e;<br /> &#x0003c;SubName&#x0003e;5|5q31-q32&#x0003c;/SubName&#x0003e;<br /> &#x0003c;AssemblyGi&#x0003e;399658&#x0003c;/AssemblyGi&#x0003e;<br /> &#x0003c;AssemblyAcc&#x0003e;<a href="/nuccore/399657" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=nuccore">D13720.1</a>&#x0003c;/AssemblyAcc&#x0003e;<br /> &#x0003c;Tech/&#x0003e;<br /> &#x0003c;Completeness/&#x0003e;<br /> &#x0003c;GeneticCode&#x0003e;1&#x0003c;/GeneticCode&#x0003e;<br /><br /> &#x0003c;Strand/&#x0003e;<br /> &#x0003c;Organism&#x0003e;Homo sapiens&#x0003c;/Organism&#x0003e;<br /> &#x0003c;Statistics&#x0003e;<br /> &#x0003c;Stat type="all" count="8"/&#x0003e;<br /> &#x0003c;Stat type="blob_size" count="16154"/&#x0003e;<br /> &#x0003c;Stat type="cdregion" count="1"/&#x0003e;<br /> &#x0003c;Stat type="cdregion" subtype="CDS" count="1"/&#x0003e;<br /> &#x0003c;Stat type="gene" count="1"/&#x0003e;<br /> &#x0003c;Stat type="gene" subtype="Gene" count="1"/&#x0003e;<br /> &#x0003c;Stat type="org" count="1"/&#x0003e;<br /> &#x0003c;Stat type="prot" count="1"/&#x0003e;<br /> &#x0003c;Stat type="prot" subtype="Prot" count="1"/&#x0003e;<br /> &#x0003c;Stat type="pub" count="14"/&#x0003e;<br /> &#x0003c;Stat type="pub" subtype="PubMed" count="10"/&#x0003e;<br /> &#x0003c;Stat type="pub" subtype="PubMed/Gene-rif" count="4"/&#x0003e;<br /> &#x0003c;Stat type="site" count="4"/&#x0003e;<br /> &#x0003c;Stat type="site" subtype="Site" count="4"/&#x0003e;<br /> &#x0003c;Stat source="CDD" type="all" count="15"/&#x0003e;<br /> &#x0003c;Stat source="CDD" type="region" count="6"/&#x0003e;<br /> &#x0003c;Stat source="CDD" type="region" subtype="Region" count="6"/&#x0003e;<br /> &#x0003c;Stat source="CDD" type="site" count="9"/&#x0003e;<br /> &#x0003c;Stat source="CDD" type="site" subtype="Site" count="9"/&#x0003e;<br /> &#x0003c;Stat source="HPRD" type="all" count="3"/&#x0003e;<br /> &#x0003c;Stat source="HPRD" type="site" count="3"/&#x0003e;<br /> &#x0003c;Stat source="HPRD" type="site" subtype="Site" count="3"/&#x0003e;<br /> &#x0003c;Stat source="SNP" type="all" count="31"/&#x0003e;<br /> &#x0003c;Stat source="SNP" type="imp" count="31"/&#x0003e;<br /> &#x0003c;Stat source="SNP" type="imp" subtype="variation" count="31"/&#x0003e;<br /> &#x0003c;Stat source="all" type="all" count="57"/&#x0003e;<br /> &#x0003c;Stat source="all" type="blob_size" count="16154"/&#x0003e;<br /> &#x0003c;Stat source="all" type="cdregion" count="1"/&#x0003e;<br /> &#x0003c;Stat source="all" type="gene" count="1"/&#x0003e;<br /> &#x0003c;Stat source="all" type="imp" count="31"/&#x0003e;<br /> &#x0003c;Stat source="all" type="org" count="1"/&#x0003e;<br /> &#x0003c;Stat source="all" type="prot" count="1"/&#x0003e;<br /> &#x0003c;Stat source="all" type="pub" count="14"/&#x0003e;<br /> &#x0003c;Stat source="all" type="region" count="6"/&#x0003e;<br /> &#x0003c;Stat source="all" type="site" count="16"/&#x0003e;<br /> &#x0003c;/Statistics&#x0003e;<br /> &#x0003c;AccessionVersion&#x0003e;<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537.3</a>&#x0003c;/AccessionVersion&#x0003e;<br /> &#x0003c;Properties aa="2"&#x0003e;2&#x0003c;/Properties&#x0003e;<br /> &#x0003c;Comment/&#x0003e;<br /> &#x0003c;OSLT indexed="yes"&#x0003e;<a href="/protein/15718680/?report=GenPept" class="bk_tag" ref="pagearea=body&amp;targetsite=entrez&amp;targetcat=link&amp;targettype=genpept">NP_005537.3</a>&#x0003c;/OSLT&#x0003e;<br /> &#x0003c;IdGiClass mol="3" repr="2" gi_state="10" sat="4" sat_key="58760802" owner="20"<br /> sat_name="NCBI" owner_name="NCBI-Genomes" defdiv="GNM" length="620" extfeatmask="41"<br /> /&#x0003e;<br /> &#x0003c;/DocumentSummary&#x0003e;<br /><br /> &#x0003c;/DocumentSummarySet&#x0003e;<br />&#x0003c;/eSummaryResult&#x0003e;</pre></div></div><div id="chapter1.Downloading_Full_Records"><h2 id="_chapter1_Downloading_Full_Records_">Downloading Full Records</h2><div id="chapter1.Basic_Downloading_1"><h3>Basic Downloading</h3><pre>efetch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;&#x00026;rettype=&#x0003c;retrieval_type&#x0003e;<br />&#x00026;retmode=&#x0003c;retrieval_mode&#x0003e;</pre><p>Input: List of UIDs (&#x00026;id); Entrez database (&#x00026;db); Retrieval type (&#x00026;rettype); Retrieval mode (&#x00026;retmode)</p><p>Output: Formatted data records as specified</p><p>
<i>Example: Download nuccore GIs 34577062 and 24475906 in FASTA format</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&#x00026;id=34577062,24475906&#x00026;rettype=fasta&#x00026;retmode=text" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nuccore&#x00026;id=34577062,24475906&#x00026;rettype=fasta&#x00026;retmode=text</a>
</span>
</p></div><div id="chapter1.Downloading_Data_From_a_Previou_1"><h3>Downloading Data From a Previous Search</h3><pre>esearch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;term=&#x0003c;query&#x0003e;&#x00026;usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />efetch.fcgi?db=&#x0003c;database&#x0003e;&#x00026;query_key=$key1&#x00026;WebEnv=$web1&#x00026;rettype=<br />&#x0003c;retrieval_type&#x0003e;&#x00026;retmode=&#x0003c;retrieval_mode&#x0003e;</pre><p>Input: Entrez database (&#x00026;db); Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) representing a set of Entrez UIDs on the Entrez history server; Retrieval type (&#x00026;rettype); Retrieval mode (&#x00026;retmode)</p><p>Output: Formatted data records as specified</p></div><div id="chapter1.Downloading_a_Large_Set_of_Reco"><h3>Downloading a Large Set of Records</h3><p>
<span class="bk_pgobj">Please see </span>
<a href="/books/n/helpeutils/chapter3/#chapter3.Application_3_Retrieving_large">Application 3</a>
<span class="bk_pgobj"> in Chapter 3</span>
</p><p>Input: Entrez database (&#x00026;db); Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) representing a set of Entrez UIDs on the Entrez history server; Retrieval start (&#x00026;retstart), the first record of the set to retrieve; Retrieval maximum (&#x00026;retmax), maximum number of records to retrieve</p><p>Output: Formatted data records as specified</p></div><div id="chapter1.For_More_Information_2"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EFetch">EFetch In-Depth</a> for a full description of EFetch.</p></div></div><div id="chapter1.Finding_Related_Data_Through_En"><h2 id="_chapter1_Finding_Related_Data_Through_En_">Finding Related Data Through Entrez Links</h2><div id="chapter1.Basic_Linking"><h3>Basic Linking</h3><div id="chapter1.Batch_mode__finds_only_one_set"><h4>Batch mode &#x02013; finds only one set of linked UIDs</h4><pre>elink.fcgi?dbfrom=&#x0003c;source_db&#x0003e;&#x00026;db=&#x0003c;destination_db&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;</pre><p>Input: List of UIDs (&#x00026;id); Source Entrez database (&#x00026;dbfrom); Destination Entrez database (&#x00026;db)</p><p>Output: XML containing linked UIDs from source and destination databases</p><p>
<i>Example: Find one set of Gene IDs linked to nuccore GIs 34577062 and 24475906</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&#x00026;db=gene&#x00026;id=34577062,24475906" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&#x00026;db=gene&#x00026;id=34577062,24475906</a>
</span>
</p></div><div id="chapter1._By_Id_mode__finds_one_set_of_l"><h4>&#x02018;By Id&#x02019; mode &#x02013; finds one set of linked UIDs for each input UID</h4><pre>elink.fcgi?dbfrom=&#x0003c;source_db&#x0003e;&#x00026;db=&#x0003c;destination_db&#x0003e;&#x00026;id=&#x0003c;uid1&#x0003e;&#x00026;id=<br />&#x0003c;uid2&#x0003e;&#x00026;id=&#x0003c;uid3&#x0003e;...</pre><p>
<i>Example: Find separate sets of Gene IDs linked to nuccore GIs 34577062 and 24475906</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&#x00026;db=gene&#x00026;id=34577062&#x00026;id=24475906" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=nuccore&#x00026;db=gene&#x00026;id=34577062&#x00026;id=24475906</a>
</span>
</p><p>
<i>Note: &#x00026;db may be a comma-delimited list of databases, so that elink returns multiple sets of linked UIDs in a single call</i>
</p></div></div><div id="chapter1.Finding_Links_to_Data_from_a_Pr"><h3>Finding Links to Data from a Previous Search</h3><pre>esearch.fcgi?db=&#x0003c;source_db&#x0003e;&#x00026;term=&#x0003c;query&#x0003e;&#x00026;usehistory=y<br /><br /># esearch produces WebEnv value ($web1) and QueryKey value ($key1)<br /><br />elink.fcgi?dbfrom=&#x0003c;source_db&#x0003e;&#x00026;db=&#x0003c;destination_db&#x0003e;&#x00026;query_key=<br />$key1&#x00026;WebEnv=$web1&#x00026;cmd=neighbor_history</pre><p>Input: Source Entrez database (&#x00026;dbfrom); Destination Entrez database (&#x00026;db); Web environment (&#x00026;WebEnv) and query key (&#x00026;query_key) representing the set of source UIDs on the Entrez history server; Command mode (&#x00026;cmd)</p><p>Output: XML containing Web environments and query keys for each set of linked UIDs</p><p>
<i>Note: To achieve &#x02018;By Id&#x02019; mode, one must send each input UID as a separate &#x00026;id parameter in the URL. Sending a WebEnv/query_key set always produces Batch mode behavior (one set of linked UIDs).</i>
</p></div><div id="chapter1.Finding_Computational_Neighbors"><h3>Finding Computational Neighbors Limited by an Entrez Search</h3><pre>elink.fcgi?dbfrom=&#x0003c;source_db&#x0003e;&#x00026;db=&#x0003c;source_db&#x0003e;&#x00026;id=&#x0003c;uid_list&#x0003e;&#x00026;term=<br />&#x0003c;query&#x0003e;&#x00026;cmd=neighbor_history</pre><p>Input: Source Entrez database (&#x00026;dbfrom); Destination Entrez database (&#x00026;db); List of UIDs (&#x00026;id); Entrez query (&#x00026;term); Command mode (&#x00026;cmd)</p><p>Output: XML containing Web environments and query keys for each set of linked UIDs</p><p>
<i>Example: Find protein UIDs that are rat Reference Sequences and that are sequence similar to GI 15718680</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&#x00026;db=protein&#x00026;id=15718680&#x00026;term=rat%5borgn%5d+AND+srcdb+refseq%5bprop%5d&#x00026;cmd=neighbor_history" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/elink.fcgi?dbfrom=protein&#x00026;db=protein&#x00026;id=15718680&#x00026;term=rat[orgn]+AND+srcdb+refseq[prop]&#x00026;cmd=neighbor_history</a>
</span>
</p></div><div id="chapter1.For_More_Information_3"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ELink">ELink In-Depth</a> for a full description of ELink.</p></div></div><div id="chapter1.Getting_Database_Statistics_and"><h2 id="_chapter1_Getting_Database_Statistics_and_">Getting Database Statistics and Search Fields</h2><pre>einfo.fcgi?db=&#x0003c;database&#x0003e;</pre><p>Input: Entrez database (&#x00026;db)</p><p>Output: XML containing database statistics</p><p>
<i>Note: If no database parameter is supplied, einfo will return a list of all valid Entrez databases.</i>
</p><p>
<i>Example: Find database statistics for Entrez Protein.</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=protein" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/einfo.fcgi?db=protein</a>
</span>
</p><div id="chapter1.For_More_Information_4"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EInfo">EInfo In-Depth</a> for a full description of EInfo.</p></div><div id="chapter1.Sample_EInfo_Output"><h3>Sample EInfo Output</h3><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE eInfoResult PUBLIC "-//NLM//DTD eInfoResult, 11 May 2002//EN" <br />"https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eInfo_020511.dtd"&#x0003e;<br />&#x0003c;eInfoResult&#x0003e;<br />&#x0003c;DbInfo&#x0003e;<br />&#x0003c;DbName&#x0003e;protein&#x0003c;/DbName&#x0003e;<br />&#x0003c;MenuName&#x0003e;Protein&#x0003c;/MenuName&#x0003e;<br />&#x0003c;Description&#x0003e;Protein sequence record&#x0003c;/Description&#x0003e;<br />&#x0003c;Count&#x0003e;26715092&#x0003c;/Count&#x0003e;<br />&#x0003c;LastUpdate&#x0003e;2009/05/12 04:39&#x0003c;/LastUpdate&#x0003e;<br />&#x0003c;FieldList&#x0003e;<br />&#x0003c;Field&#x0003e;<br />&#x0003c;Name&#x0003e;ALL&#x0003c;/Name&#x0003e;<br />&#x0003c;FullName&#x0003e;All Fields&#x0003c;/FullName&#x0003e;<br />&#x0003c;Description&#x0003e;All terms from all searchable fields&#x0003c;/Description&#x0003e;<br />&#x0003c;TermCount&#x0003e;133639432&#x0003c;/TermCount&#x0003e;<br />&#x0003c;IsDate&#x0003e;N&#x0003c;/IsDate&#x0003e;<br />&#x0003c;IsNumerical&#x0003e;N&#x0003c;/IsNumerical&#x0003e;<br />&#x0003c;SingleToken&#x0003e;N&#x0003c;/SingleToken&#x0003e;<br />&#x0003c;Hierarchy&#x0003e;N&#x0003c;/Hierarchy&#x0003e;<br />&#x0003c;IsHidden&#x0003e;N&#x0003c;/IsHidden&#x0003e;<br />&#x0003c;/Field&#x0003e;<br />...<br />&#x0003c;Field&#x0003e;<br />&#x0003c;Name&#x0003e;PORG&#x0003c;/Name&#x0003e;<br />&#x0003c;FullName&#x0003e;Primary Organism&#x0003c;/FullName&#x0003e;<br />&#x0003c;Description&#x0003e;Scientific and common names <br />of primary organism, and all higher levels of taxonomy&#x0003c;/Description&#x0003e;<br />&#x0003c;TermCount&#x0003e;673555&#x0003c;/TermCount&#x0003e;<br />&#x0003c;IsDate&#x0003e;N&#x0003c;/IsDate&#x0003e;<br />&#x0003c;IsNumerical&#x0003e;N&#x0003c;/IsNumerical&#x0003e;<br />&#x0003c;SingleToken&#x0003e;Y&#x0003c;/SingleToken&#x0003e;<br />&#x0003c;Hierarchy&#x0003e;Y&#x0003c;/Hierarchy&#x0003e;<br />&#x0003c;IsHidden&#x0003e;N&#x0003c;/IsHidden&#x0003e;<br />&#x0003c;/Field&#x0003e;<br />&#x0003c;/FieldList&#x0003e;<br />&#x0003c;LinkList&#x0003e;<br />&#x0003c;Link&#x0003e;<br />&#x0003c;Name&#x0003e;protein_biosystems&#x0003c;/Name&#x0003e;<br />&#x0003c;Menu&#x0003e;BioSystem Links&#x0003c;/Menu&#x0003e;<br />&#x0003c;Description&#x0003e;BioSystems&#x0003c;/Description&#x0003e;<br />&#x0003c;DbTo&#x0003e;biosystems&#x0003c;/DbTo&#x0003e;<br />&#x0003c;/Link&#x0003e;<br />...<br />&#x0003c;Link&#x0003e;<br />&#x0003c;Name&#x0003e;protein_unigene&#x0003c;/Name&#x0003e;<br />&#x0003c;Menu&#x0003e;UniGene Links&#x0003c;/Menu&#x0003e;<br />&#x0003c;Description&#x0003e;Related UniGene records&#x0003c;/Description&#x0003e;<br />&#x0003c;DbTo&#x0003e;unigene&#x0003c;/DbTo&#x0003e;<br />&#x0003c;/Link&#x0003e;<br />&#x0003c;/LinkList&#x0003e;<br />&#x0003c;/DbInfo&#x0003e;<br />&#x0003c;/eInfoResult&#x0003e;</pre></div></div><div id="chapter1.Performing_a_Global_Entrez_Sear"><h2 id="_chapter1_Performing_a_Global_Entrez_Sear_">Performing a Global Entrez Search</h2><pre>egquery.fcgi?term=&#x0003c;query&#x0003e;</pre><p>Input: Entrez text query (&#x00026;term)</p><p>Output: XML containing the number of hits in each database.</p><p>
<i>Example: Determine the number of records for mouse in Entrez.</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/egquery.fcgi?term=mouse%5borgn%5d" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/egquery.fcgi?term=mouse[orgn]</a>
</span>
</p><div id="chapter1.For_More_Information_5"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.EGQuery">EGQuery In-Depth</a> for a full description of EGQuery.</p></div><div id="chapter1.Sample_EGQuery_Output"><h3>Sample EGQuery Output</h3><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE Result PUBLIC "-//NLM//DTD eSearchResult, January 2004//EN"<br /> "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/egquery.dtd"&#x0003e;<br />&#x0003c;!--<br /> $Id: egquery_template.xml 106311 2007-06-26 14:46:31Z osipov $<br />--&#x0003e;<br />&#x0003c;!-- ================================================================= --&#x0003e;<br />&#x0003c;Result&#x0003e;<br /> &#x0003c;Term&#x0003e;mouse[orgn]&#x0003c;/Term&#x0003e;<br /> &#x0003c;eGQueryResult&#x0003e;<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;pubmed&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;PubMed&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;0&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Term or Database is not found&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;pmc&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;PMC&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;3823&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br />...<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;nuccore&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;Nucleotide&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;1739903&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;nucgss&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;GSS&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;2264567&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;nucest&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;EST&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;4852140&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;protein&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;Protein&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;255212&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br />...<br /> &#x0003c;ResultItem&#x0003e;<br /> &#x0003c;DbName&#x0003e;proteinclusters&#x0003c;/DbName&#x0003e;<br /> &#x0003c;MenuName&#x0003e;Protein Clusters&#x0003c;/MenuName&#x0003e;<br /> &#x0003c;Count&#x0003e;13&#x0003c;/Count&#x0003e;<br /> &#x0003c;Status&#x0003e;Ok&#x0003c;/Status&#x0003e;<br /> &#x0003c;/ResultItem&#x0003e;<br /> &#x0003c;/eGQueryResult&#x0003e;<br />&#x0003c;/Result&#x0003e;</pre></div></div><div id="chapter1.Retrieving_Spelling_Suggestions"><h2 id="_chapter1_Retrieving_Spelling_Suggestions_">Retrieving Spelling Suggestions</h2><pre>espell.fcgi?term=&#x0003c;query&#x0003e;&#x00026;db=&#x0003c;database&#x0003e;</pre><p>Input: Entrez text query (&#x00026;term); Entrez database (&#x00026;db)</p><p>Output: XML containing the original query and spelling suggestions.</p><p>
<i>Example: Find spelling suggestions for the PubMed Central query &#x02018;fiberblast cell grwth&#x02019;.</i>
</p><p>
<span class="bk_pgobj">
<a href="https://eutils.ncbi.nlm.nih.gov/entrez/eutils/espell.fcgi?term=fiberblast+cell+grwth&#x00026;db=pmc" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">https://eutils.ncbi.nlm.nih.gov/entrez/eutils/espell.fcgi?term=fiberblast+cell+grwth&#x00026;db=pmc</a>
</span>
</p><div id="chapter1.For_More_Information_6"><h3>For More Information</h3><p>Please see <a href="/books/n/helpeutils/chapter4/#chapter4.ESpell">ESpell In-Depth</a> for a full description of EGQuery.</p></div><div id="chapter1.Sample_ESpell_Output"><h3>Sample ESpell Output</h3><pre>&#x0003c;?xml version="1.0"?&#x0003e;<br />&#x0003c;!DOCTYPE eSpellResult PUBLIC "-//NLM//DTD eSpellResult, 23 November <br />2004//EN" "https://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSpell.dtd"&#x0003e;<br />&#x0003c;eSpellResult&#x0003e;<br />&#x0003c;Database&#x0003e;pmc&#x0003c;/Database&#x0003e;<br />&#x0003c;Query&#x0003e;fiberblast cell grwth&#x0003c;/Query&#x0003e;<br />&#x0003c;CorrectedQuery&#x0003e;fibroblast cell growth&#x0003c;/CorrectedQuery&#x0003e;<br />&#x0003c;SpelledQuery&#x0003e;<br /> &#x0003c;Replaced&#x0003e;fibroblast&#x0003c;/Replaced&#x0003e;<br /> &#x0003c;Original&#x0003e; cell &#x0003c;/Original&#x0003e;<br /> &#x0003c;Replaced&#x0003e;growth&#x0003c;/Replaced&#x0003e;<br />&#x0003c;/SpelledQuery&#x0003e;<br />&#x0003c;ERROR/&#x0003e;<br />&#x0003c;/eSpellResult&#x0003e;</pre></div></div><div id="chapter1.Demonstration_Programs"><h2 id="_chapter1_Demonstration_Programs_">Demonstration Programs</h2><div id="chapter1.EBot"><h3>EBot</h3><p><a href="https://www.ncbi.nlm.nih.gov/Class/PowerTools/eutils/ebot/ebot.cgi" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">EBot</a> is an interactive web tool that first allows users to construct an arbitrary E-utility analysis pipeline and then generates a Perl script to execute the pipeline. The Perl script can be downloaded and executed on any computer with a Perl installation. For more details, see the EBot page linked above.</p></div><div id="chapter1.Sample_Perl_Scripts"><h3>Sample Perl Scripts</h3><p>The two sample Perl scripts below demonstrate basic E-utility functions. Both scripts should be copied and saved as plain text files and can be executed on any computer with a Perl installation.</p><p>ESearch-EFetch demonstrates basic search and retrieval functions.</p><pre>#!/usr/local/bin/perl -w<br /># =======================================================================<br />#<br /># PUBLIC DOMAIN NOTICE<br /># National Center for Biotechnology Information<br />#<br /># This software/database is a "United States Government Work" under the<br /># terms of the United States Copyright Act. It was written as part of<br /># the author's official duties as a United States Government employee and<br /># thus cannot be copyrighted. This software/database is freely available<br /># to the public for use. The National Library of Medicine and the U.S.<br /># Government have not placed any restriction on its use or reproduction.<br />#<br /># Although all reasonable efforts have been taken to ensure the accuracy<br /># and reliability of the software and data, the NLM and the U.S.<br /># Government do not and cannot warrant the performance or results that<br /># may be obtained by using this software or data. The NLM and the U.S.<br /># Government disclaim all warranties, express or implied, including<br /># warranties of performance, merchantability or fitness for any particular<br /># purpose.<br />#<br /># Please cite the author in any work or product based on this material.<br />#<br /># =======================================================================<br />#<br /># Author: Oleg Khovayko<br />#<br /># File Description: eSearch/eFetch calling example<br /># <br /># ---------------------------------------------------------------------<br /># Subroutine to prompt user for variables in the next section<br /><br />sub ask_user {<br /> print "$_[0] [$_[1]]: ";<br /> my $rc = &#x0003c;&#x0003e;;<br /> chomp $rc;<br /> if($rc eq "") { $rc = $_[1]; }<br /> return $rc;<br />}<br /><br /># ---------------------------------------------------------------------<br /># Define library for the 'get' function used in the next section.<br /># $utils contains route for the utilities.<br /># $db, $query, and $report may be supplied by the user when prompted; <br /># if not answered, default values, will be assigned as shown below.<br /><br />use LWP::Simple;<br /><br />my $utils = "https://www.ncbi.nlm.nih.gov/entrez/eutils";<br /><br />my $db = ask_user("Database", "Pubmed");<br />my $query = ask_user("Query", "zanzibar");<br />my $report = ask_user("Report", "abstract");<br /><br /># ---------------------------------------------------------------------<br /># $esearch cont?ins the PATH &#x00026; parameters for the ESearch call<br /># $esearch_result containts the result of the ESearch call<br /># the results are displayed ?nd parsed into variables <br /># $Count, $QueryKey, and $WebEnv for later use and then displayed.<br /><br />my $esearch = "$utils/esearch.fcgi?" .<br /> "db=$db&#x00026;retmax=1&#x00026;usehistory=y&#x00026;term=";<br /><br />my $esearch_result = get($esearch . $query);<br /><br />print "\nESEARCH RESULT: $esearch_result\n";<br /><br />$esearch_result =~ <br /> m|&#x0003c;Count&#x0003e;(\d+)&#x0003c;/Count&#x0003e;.*&#x0003c;QueryKey&#x0003e;(\d+)&#x0003c;/QueryKey&#x0003e;.*&#x0003c;WebEnv&#x0003e;(\S+)&#x0003c;/WebEnv&#x0003e;|s;<br /><br />my $Count = $1;<br />my $QueryKey = $2;<br />my $WebEnv = $3;<br /><br />print "Count = $Count; QueryKey = $QueryKey; WebEnv = $WebEnv\n";<br /><br /># ---------------------------------------------------------------------<br /># this area defines a loop which will display $retmax citation results from <br /># Efetch each time the the Enter Key is pressed, after a prompt.<br /><br />my $retstart;<br />my $retmax=3;<br /><br />for($retstart = 0; $retstart &#x0003c; $Count; $retstart += $retmax) {<br /> my $efetch = "$utils/efetch.fcgi?" .<br /> "rettype=$report&#x00026;retmode=text&#x00026;retstart=$retstart&#x00026;retmax=$retmax&#x00026;" .<br /> "db=$db&#x00026;query_key=$QueryKey&#x00026;WebEnv=$WebEnv";<br /> <br /> print "\nEF_QUERY=$efetch\n"; <br /><br /> my $efetch_result = get($efetch);<br /> <br /> print "---------\nEFETCH RESULT(". <br /> ($retstart + 1) . ".." . ($retstart + $retmax) . "): ".<br /> "[$efetch_result]\n-----PRESS ENTER!!!-------\n";<br /> &#x0003c;&#x0003e;;<br />}</pre><p>EPost-ESummary demonstrates basic uploading and document summary retrieval.</p><pre>#!/usr/local/bin/perl -w<br /># =======================================================================<br />#<br /># PUBLIC DOMAIN NOTICE<br /># National Center for Biotechnology Information<br />#<br /># This software/database is a "United States Government Work" under the<br /># terms of the United States Copyright Act. It was written as part of<br /># the author's official duties as a United States Government employee and<br /># thus cannot be copyrighted. This software/database is freely available<br /># to the public for use. The National Library of Medicine and the U.S.<br /># Government have not placed any restriction on its use or reproduction.<br />#<br /># Although all reasonable efforts have been taken to ensure the accuracy<br /># and reliability of the software and data, the NLM and the U.S.<br /># Government do not and cannot warrant the performance or results that<br /># may be obtained by using this software or data. The NLM and the U.S.<br /># Government disclaim all warranties, express or implied, including<br /># warranties of performance, merchantability or fitness for any particular<br /># purpose.<br />#<br /># Please cite the author in any work or product based on this material.<br />#<br /># =======================================================================<br />#<br /># Author: Oleg Khovayko<br />#<br /># File Description: ePost/eSummary calling example<br /># <br /><br /># ---------------------------------------------------------------------<br />my $eutils_root = "https://www.ncbi.nlm.nih.gov/entrez/eutils";<br />my $ePost_url = "$eutils_root/epost.fcgi";<br />my $eSummary_url = "$eutils_root/esummary.fcgi";<br /><br />my $db_name = "PubMed";<br /><br /># ---------------------------------------------------------------------<br />use strict;<br /><br />use LWP::UserAgent;<br />use LWP::Simple;<br />use HTTP::Request;<br />use HTTP::Headers;<br />use CGI;<br /><br /># ---------------------------------------------------------------------<br /># Read input file into variable $file<br /># File name - forst argument $ARGV[0]<br /><br />undef $/; #for load whole file<br /><br />open IF, $ARGV[0] || die "Can't open for read: $!\n";<br />my $file = &#x0003c;IF&#x0003e;;<br />close IF;<br />print "Loaded file: [$file]\n";<br /><br /># Prepare file - substitute all separators to comma<br /><br />$file =~ s/\s+/,/gs;<br />print "Prepared file: [$file]\n";<br /><br />#Create CGI param line<br /><br />my $form_data = "db=$db_name&#x00026;id=$file";<br /><br /># ---------------------------------------------------------------------<br /># Create HTTP request<br /><br />my $headers = new HTTP::Headers(<br /> Accept =&#x0003e; "text/html, text/plain",<br /> Content_Type =&#x0003e; "application/x-www-form-urlencoded"<br />);<br /><br />my $request = new HTTP::Request("POST", $ePost_url, $headers );<br /><br />$request-&#x0003e;content($form_data);<br /><br /># Create the user agent object<br /><br />my $ua = new LWP::UserAgent;<br />$ua-&#x0003e;agent("ePost/example");<br /><br /># ---------------------------------------------------------------------<br /># send file to ePost by HTTP<br /><br />my $response = $ua-&#x0003e;request($request);<br /><br /># ---------------------------------------------------------------------<br /><br />print "Responce status message: [" . $response-&#x0003e;message . "]\n";<br />print "Responce content: [" . $response-&#x0003e;content . "]\n";<br /><br /># ---------------------------------------------------------------------<br /># Parse response-&#x0003e;content and extract QueryKey &#x00026; WebEnv<br />$response-&#x0003e;content =~ <br /> m|&#x0003c;QueryKey&#x0003e;(\d+)&#x0003c;/QueryKey&#x0003e;.*&#x0003c;WebEnv&#x0003e;(\S+)&#x0003c;/WebEnv&#x0003e;|s;<br /><br />my $QueryKey = $1;<br />my $WebEnv = $2;<br /><br />print "\nEXTRACTED:\nQueryKey = $QueryKey;\nWebEnv = $WebEnv\n\n";<br /><br /># ---------------------------------------------------------------------<br /># Retrieve DocSum from eSummary by simple::get method and print it<br />#<br />print "eSummary result: [" . <br /> get("$eSummary_url?db=$db_name&#x00026;query_key=$QueryKey&#x00026;WebEnv=$WebEnv") . <br /> "]\n";</pre></div></div><div id="chapter1.For_More_Information_7"><h2 id="_chapter1_For_More_Information_7_">For More Information</h2><div id="chapter1.Announcement_Mailing_List"><h3>Announcement Mailing List</h3><p>NCBI posts general announcements regarding the E-utilities to the <a href="https://www.ncbi.nlm.nih.gov/mailman/listinfo/utilities-announce/" ref="pagearea=body&amp;targetsite=external&amp;targetcat=link&amp;targettype=uri">utilities-announce announcement mailing list</a>. This mailing list is an announcement list only; individual subscribers may <b>not</b> send mail to the list.&#x000a0;Also, the list of subscribers is private and is not shared or used in any other way except for providing announcements to list members.&#x000a0;The list receives about one posting per month. Please subscribe at the above link.</p></div><div id="chapter1.Getting_Help"><h3>Getting Help</h3><p>Please refer to the <a href="/books/n/helppubmed/pubmedhelp/">PubMed</a> and <a href="/books/n/helpentrez/EntrezHelp/">Entrez</a> help documents for more information about search queries, database indexing, field limitations and database content.</p><p>Suggestions, comments, and questions specifically relating to the EUtility programs may be sent to <a href="mailto:dev@null" data-email="vog.hin.mln.ibcn@seitilitue" class="oemail">vog.hin.mln.ibcn@seitilitue</a>.</p></div></div><div id="bk_toc_contnr"></div></div></div>
<div class="post-content"><div><div class="half_rhythm"><a href="/books/about/copyright/">Copyright Notice</a></div><div class="small"><span class="label">Bookshelf ID: NBK25500</span></div><div style="margin-top:2em" class="bk_noprnt"><a class="bk_cntns" href="/books/n/helpeutils/">Contents</a><div class="pagination bk_noprnt"><a class="active page_link prev" href="/books/n/helpeutils/" title="Previous page in this title">&lt; Prev</a><a class="active page_link next" href="/books/n/helpeutils/chapter2/" title="Next page in this title">Next &gt;</a></div></div></div></div>
</div>
</div>
</div>
<div class="bottom">
<div id="NCBIFooter_dynamic">
<!--<component id="Breadcrumbs" label="breadcrumbs"/>
<component id="Breadcrumbs" label="helpdesk"/>-->
</div>
<script type="text/javascript" src="/portal/portal3rc.fcgi/rlib/js/InstrumentNCBIBaseJS/InstrumentPageStarterJS.js"> </script>
</div>
</div>
<!--/.page-->
</div>
<!--/.wrap-->
</div><!-- /.twelve_col -->
</div>
<!-- /.grid -->
<span class="PAFAppResources"></span>
<!-- BESelector tab -->
<noscript><img alt="statistics" src="/stat?jsdisabled=true&amp;ncbi_db=books&amp;ncbi_pdid=book-part&amp;ncbi_acc=NBK25500&amp;ncbi_domain=helpeutils&amp;ncbi_report=printable&amp;ncbi_type=fulltext&amp;ncbi_objectid=&amp;ncbi_pcid=/NBK25500/?report=printable&amp;ncbi_app=bookshelf" /></noscript>
<!-- usually for JS scripts at page bottom -->
<!--<component id="PageFixtures" label="styles"></component>-->
<!-- CE8B5AF87C7FFCB1_0191SID /projects/books/PBooks@9.11 portal104 v4.1.r689238 Tue, Oct 22 2024 16:10:51 -->
<span id="portal-csrf-token" style="display:none" data-token="CE8B5AF87C7FFCB1_0191SID"></span>
<script type="text/javascript" src="//static.pubmed.gov/portal/portal3rc.fcgi/4216699/js/3879255/4121861/3501987/4008961/3893018/3821238/3400083/3426610.js" snapshot="books"></script></body>
</html>