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

176 lines
70 KiB
Text

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" class="no-js no-jr">
<head>
<!-- For pinger, set start time and add meta elements. -->
<script type="text/javascript">var ncbi_startTime = new Date();</script>
<!-- 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="reader">
<meta name="ncbi_type" content="fulltext">
<meta name="ncbi_objectid" content="">
<meta name="ncbi_pcid" content="/NBK25500/?report=reader">
<meta name="ncbi_pagename" content="E-utilities Quick Start - Entrez Programming Utilities Help - NCBI Bookshelf">
<meta name="ncbi_bookparttype" content="chapter">
<meta name="ncbi_app" content="bookshelf">
<!-- Logger end -->
<!--component id="Page" label="meta"/-->
<script type="text/javascript" src="/corehtml/pmc/jatsreader/ptpmc_3.22/js/jr.boots.min.js"> </script><title>E-utilities Quick Start - Entrez Programming Utilities Help - NCBI Bookshelf</title>
<meta charset="utf-8">
<meta name="apple-mobile-web-app-capable" content="no">
<meta name="viewport" content="initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
<meta name="jr-col-layout" content="auto">
<meta name="jr-prev-unit" content="/books/n/helpeutils/toc/?report=reader">
<meta name="jr-next-unit" content="/books/n/helpeutils/chapter2/?report=reader">
<meta name="bk-toc-url" content="/books/n/helpeutils/?report=toc">
<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/?report=reader">
<link rel="canonical" href="https://www.ncbi.nlm.nih.gov/books/NBK25500/">
<link href="https://fonts.googleapis.com/css?family=Archivo+Narrow:400,700,400italic,700italic&amp;subset=latin" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/corehtml/pmc/jatsreader/ptpmc_3.22/css/libs.min.css">
<link rel="stylesheet" href="/corehtml/pmc/jatsreader/ptpmc_3.22/css/jr.min.css">
<meta name="format-detection" content="telephone=no">
<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" media="print">
<link rel="stylesheet" href="/corehtml/pmc/css/bookshelf/2.26/css/books_reader.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} .body-content h2, .body-content .h2 {border-bottom: 1px solid #97B0C8} .body-content h2.inline {border-bottom: none} a.page-toc-label , .jig-ncbismoothscroll a {text-decoration:none;border:0 !important} .temp-labeled-list .graphic {display:inline-block !important} .temp-labeled-list img{width:100%}</style>
<link rel="shortcut icon" href="//www.ncbi.nlm.nih.gov/favicon.ico">
<meta name="ncbi_phid" content="CE8CEAA97C8059410000000000F300B3.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/3849091.css"></head>
<body>
<!-- Book content! -->
<div id="jr" data-jr-path="/corehtml/pmc/jatsreader/ptpmc_3.22/"><div class="jr-unsupported"><table class="modal"><tr><td><span class="attn inline-block"></span><br />Your browser does not support the NLM PubReader view.<br />Go to <a href="/pmc/about/pr-browsers/">this page</a> to see a list of supported browsers<br />or return to the <br /><a href="/books/NBK25500/?report=classic">regular view</a>.</td></tr></table></div><div id="jr-ui" class="hidden"><nav id="jr-head"><div class="flexh tb"><div id="jr-tb1"><a id="jr-links-sw" class="hidden" title="Links"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" x="0px" y="0px" viewBox="0 0 70.6 85.3" style="enable-background:new 0 0 70.6 85.3;vertical-align:middle" xml:space="preserve" width="24" height="24">
<style type="text/css">.st0{fill:#939598;}</style>
<g>
<path class="st0" d="M36,0C12.8,2.2-22.4,14.6,19.6,32.5C40.7,41.4-30.6,14,35.9,9.8"></path>
<path class="st0" d="M34.5,85.3c23.2-2.2,58.4-14.6,16.4-32.5c-21.1-8.9,50.2,18.5-16.3,22.7"></path>
<path class="st0" d="M34.7,37.1c66.5-4.2-4.8-31.6,16.3-22.7c42.1,17.9,6.9,30.3-16.4,32.5h1.7c-66.2,4.4,4.8,31.6-16.3,22.7 c-42.1-17.9-6.9-30.3,16.4-32.5"></path>
</g>
</svg> Books</a></div><div class="jr-rhead f1 flexh"><div class="head"><a href="/books/n/helpeutils/toc/?report=reader"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M75,30 c-80,60 -80,0 0,60 c-30,-60 -30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Prev</text></svg></a></div><div class="body"><div class="t">E-utilities Quick Start</div><div class="j">Entrez Programming Utilities Help [Internet]</div></div><div class="tail"><a href="/books/n/helpeutils/chapter2/?report=reader"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M25,30c80,60 80,0 0,60 c30,-60 30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Next</text></svg></a></div></div><div id="jr-tb2"><a id="jr-bkhelp-sw" class="btn wsprkl hidden" title="Help with NLM PubReader">?</a><a id="jr-help-sw" class="btn wsprkl hidden" title="Settings and typography in NLM PubReader"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" preserveAspectRatio="none"><path d="M462,283.742v-55.485l-29.981-10.662c-11.431-4.065-20.628-12.794-25.274-24.001 c-0.002-0.004-0.004-0.009-0.006-0.013c-4.659-11.235-4.333-23.918,0.889-34.903l13.653-28.724l-39.234-39.234l-28.72,13.652 c-10.979,5.219-23.68,5.546-34.908,0.889c-0.005-0.002-0.01-0.003-0.014-0.005c-11.215-4.65-19.933-13.834-24-25.273L283.741,50 h-55.484l-10.662,29.981c-4.065,11.431-12.794,20.627-24.001,25.274c-0.005,0.002-0.009,0.004-0.014,0.005 c-11.235,4.66-23.919,4.333-34.905-0.889l-28.723-13.653l-39.234,39.234l13.653,28.721c5.219,10.979,5.545,23.681,0.889,34.91 c-0.002,0.004-0.004,0.009-0.006,0.013c-4.649,11.214-13.834,19.931-25.271,23.998L50,228.257v55.485l29.98,10.661 c11.431,4.065,20.627,12.794,25.274,24c0.002,0.005,0.003,0.01,0.005,0.014c4.66,11.236,4.334,23.921-0.888,34.906l-13.654,28.723 l39.234,39.234l28.721-13.652c10.979-5.219,23.681-5.546,34.909-0.889c0.005,0.002,0.01,0.004,0.014,0.006 c11.214,4.649,19.93,13.833,23.998,25.271L228.257,462h55.484l10.595-29.79c4.103-11.538,12.908-20.824,24.216-25.525 c0.005-0.002,0.009-0.004,0.014-0.006c11.127-4.628,23.694-4.311,34.578,0.863l28.902,13.738l39.234-39.234l-13.66-28.737 c-5.214-10.969-5.539-23.659-0.886-34.877c0.002-0.005,0.004-0.009,0.006-0.014c4.654-11.225,13.848-19.949,25.297-24.021 L462,283.742z M256,331.546c-41.724,0-75.548-33.823-75.548-75.546s33.824-75.547,75.548-75.547 c41.723,0,75.546,33.824,75.546,75.547S297.723,331.546,256,331.546z"></path></svg></a><a id="jr-fip-sw" class="btn wsprkl hidden" title="Find"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 550 600" preserveAspectRatio="none"><path fill="none" stroke="#000" stroke-width="36" stroke-linecap="round" style="fill:#FFF" d="m320,350a153,153 0 1,0-2,2l170,170m-91-117 110,110-26,26-110-110"></path></svg></a><a id="jr-rtoc-sw" class="btn wsprkl hidden" title="Table of Contents"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M20,20h10v8H20V20zM36,20h44v8H36V20zM20,37.33h10v8H20V37.33zM36,37.33h44v8H36V37.33zM20,54.66h10v8H20V54.66zM36,54.66h44v8H36V54.66zM20,72h10v8 H20V72zM36,72h44v8H36V72z"></path></svg></a></div></div></nav><nav id="jr-dash" class="noselect"><nav id="jr-dash" class="noselect"><div id="jr-pi" class="hidden"><a id="jr-pi-prev" class="hidden" title="Previous page"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M75,30 c-80,60 -80,0 0,60 c-30,-60 -30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Prev</text></svg></a><div class="pginfo">Page <i class="jr-pg-pn">0</i> of <i class="jr-pg-lp">0</i></div><a id="jr-pi-next" class="hidden" title="Next page"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M25,30c80,60 80,0 0,60 c30,-60 30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Next</text></svg></a></div><div id="jr-is-tb"><a id="jr-is-sw" class="btn wsprkl hidden" title="Switch between Figures/Tables strip and Progress bar"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><rect x="10" y="40" width="20" height="20"></rect><rect x="40" y="40" width="20" height="20"></rect><rect x="70" y="40" width="20" height="20"></rect></svg></a></div><nav id="jr-istrip" class="istrip hidden"><a id="jr-is-prev" href="#" class="hidden" title="Previous"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M80,40 60,65 80,90 70,90 50,65 70,40z M50,40 30,65 50,90 40,90 20,65 40,40z"></path><text x="35" y="25" textLength="60" style="font-size:25px">Prev</text></svg></a><a id="jr-is-next" href="#" class="hidden" title="Next"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M20,40 40,65 20,90 30,90 50,65 30,40z M50,40 70,65 50,90 60,90 80,65 60,40z"></path><text x="15" y="25" textLength="60" style="font-size:25px">Next</text></svg></a></nav><nav id="jr-progress"></nav></nav></nav><aside id="jr-links-p" class="hidden flexv"><div class="tb sk-htbar flexh"><div><a class="jr-p-close btn wsprkl">Done</a></div><div class="title-text f1">NCBI Bookshelf</div></div><div class="cnt lol f1"><a href="/books/">Home</a><a href="/books/browse/">Browse All Titles</a><a class="btn share" target="_blank" rel="noopener noreferrer" href="https://www.facebook.com/sharer/sharer.php?u=https://www.ncbi.nlm.nih.gov/books/NBK25500/"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" style="vertical-align:middle" width="24" height="24" preserveAspectRatio="none"><g><path d="M 17.996,32L 12,32 L 12,16 l-4,0 l0-5.514 l 4-0.002l-0.006-3.248C 11.993,2.737, 13.213,0, 18.512,0l 4.412,0 l0,5.515 l-2.757,0 c-2.063,0-2.163,0.77-2.163,2.209l-0.008,2.76l 4.959,0 l-0.585,5.514L 18,16L 17.996,32z"></path></g></svg> Share on Facebook</a><a class="btn share" target="_blank" rel="noopener noreferrer" href="https://twitter.com/intent/tweet?url=https://www.ncbi.nlm.nih.gov/books/NBK25500/&amp;text=E-utilities%20Quick%20Start"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33 33" style="vertical-align:middle" width="24" height="24"><g><path d="M 32,6.076c-1.177,0.522-2.443,0.875-3.771,1.034c 1.355-0.813, 2.396-2.099, 2.887-3.632 c-1.269,0.752-2.674,1.299-4.169,1.593c-1.198-1.276-2.904-2.073-4.792-2.073c-3.626,0-6.565,2.939-6.565,6.565 c0,0.515, 0.058,1.016, 0.17,1.496c-5.456-0.274-10.294-2.888-13.532-6.86c-0.565,0.97-0.889,2.097-0.889,3.301 c0,2.278, 1.159,4.287, 2.921,5.465c-1.076-0.034-2.088-0.329-2.974-0.821c-0.001,0.027-0.001,0.055-0.001,0.083 c0,3.181, 2.263,5.834, 5.266,6.438c-0.551,0.15-1.131,0.23-1.73,0.23c-0.423,0-0.834-0.041-1.235-0.118 c 0.836,2.608, 3.26,4.506, 6.133,4.559c-2.247,1.761-5.078,2.81-8.154,2.81c-0.53,0-1.052-0.031-1.566-0.092 c 2.905,1.863, 6.356,2.95, 10.064,2.95c 12.076,0, 18.679-10.004, 18.679-18.68c0-0.285-0.006-0.568-0.019-0.849 C 30.007,8.548, 31.12,7.392, 32,6.076z"></path></g></svg> Share on Twitter</a></div></aside><aside id="jr-rtoc-p" class="hidden flexv"><div class="tb sk-htbar flexh"><div><a class="jr-p-close btn wsprkl">Done</a></div><div class="title-text f1">Table of Content</div></div><div class="cnt lol f1"><a href="/books/n/helpeutils/?report=reader">Title Information</a><a href="/books/n/helpeutils/toc/?report=reader">Table of Contents Page</a></div></aside><aside id="jr-help-p" class="hidden flexv"><div class="tb sk-htbar flexh"><div><a class="jr-p-close btn wsprkl">Done</a></div><div class="title-text f1">Settings</div></div><div class="cnt f1"><div id="jr-typo-p" class="typo"><div><a class="sf btn wsprkl">A-</a><a class="lf btn wsprkl">A+</a></div><div><a class="bcol-auto btn wsprkl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 100" preserveAspectRatio="none"><text x="10" y="70" style="font-size:60px;font-family: Trebuchet MS, ArialMT, Arial, sans-serif" textLength="180">AUTO</text></svg></a><a class="bcol-1 btn wsprkl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M15,25 85,25zM15,40 85,40zM15,55 85,55zM15,70 85,70z"></path></svg></a><a class="bcol-2 btn wsprkl"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M5,25 45,25z M55,25 95,25zM5,40 45,40z M55,40 95,40zM5,55 45,55z M55,55 95,55zM5,70 45,70z M55,70 95,70z"></path></svg></a></div></div><div class="lol"><a class="" href="/books/NBK25500/?report=classic">Switch to classic view</a><a href="/books/NBK25500/pdf/Bookshelf_NBK25500.pdf">PDF (127K)</a><a href="/books/n/helpeutils/pdf/">PDF (2.4M)</a><a href="/books/NBK25500/?report=printable">Print View</a></div></div></aside><aside id="jr-bkhelp-p" class="hidden flexv"><div class="tb sk-htbar flexh"><div><a class="jr-p-close btn wsprkl">Done</a></div><div class="title-text f1">Help</div></div><div class="cnt f1 lol"><a id="jr-helpobj-sw" data-path="/corehtml/pmc/jatsreader/ptpmc_3.22/" data-href="/corehtml/pmc/jatsreader/ptpmc_3.22/img/bookshelf/help.xml" href="">Help</a><a href="mailto:info@ncbi.nlm.nih.gov?subject=PubReader%20feedback%20%2F%20NBK25500%20%2F%20sid%3ACE8B5AF87C7FFCB1_0191SID%20%2F%20phid%3ACE8CEAA97C8059410000000000F300B3.4">Send us feedback</a><a id="jr-about-sw" data-path="/corehtml/pmc/jatsreader/ptpmc_3.22/" data-href="/corehtml/pmc/jatsreader/ptpmc_3.22/img/bookshelf/about.xml" href="">About PubReader</a></div></aside><aside id="jr-objectbox" class="thidden hidden"><div class="jr-objectbox-close wsprkl">&#10008;</div><div class="jr-objectbox-inner cnt"><div class="jr-objectbox-drawer"></div></div></aside><nav id="jr-pm-left" class="hidden"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 800" preserveAspectRatio="none"><text font-stretch="ultra-condensed" x="800" y="-15" text-anchor="end" transform="rotate(90)" font-size="18" letter-spacing=".1em">Previous Page</text></svg></nav><nav id="jr-pm-right" class="hidden"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 800" preserveAspectRatio="none"><text font-stretch="ultra-condensed" x="800" y="-15" text-anchor="end" transform="rotate(90)" font-size="18" letter-spacing=".1em">Next Page</text></svg></nav><nav id="jr-fip" class="hidden"><nav id="jr-fip-term-p"><input type="search" placeholder="search this page" id="jr-fip-term" autocorrect="off" autocomplete="off" /><a id="jr-fip-mg" class="wsprkl btn" title="Find"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 550 600" preserveAspectRatio="none"><path fill="none" stroke="#000" stroke-width="36" stroke-linecap="round" style="fill:#FFF" d="m320,350a153,153 0 1,0-2,2l170,170m-91-117 110,110-26,26-110-110"></path></svg></a><a id="jr-fip-done" class="wsprkl btn" title="Dismiss find">&#10008;</a></nav><nav id="jr-fip-info-p"><a id="jr-fip-prev" class="wsprkl btn" title="Jump to previuos match">&#9664;</a><button id="jr-fip-matches">no matches yet</button><a id="jr-fip-next" class="wsprkl btn" title="Jump to next match">&#9654;</a></nav></nav></div><div id="jr-epub-interstitial" class="hidden"></div><div id="jr-content"><article data-type="main"><div class="main-content lit-style" itemscope="itemscope" itemtype="http://schema.org/CreativeWork"><div class="meta-content fm-sec"><div class="fm-sec"><h1 id="_NBK25500_"><span class="title" itemprop="name">E-utilities Quick Start</span></h1><p class="contribs">Sayers E.</p><p class="fm-aai"><a href="#_NBK25500_pubdet_">Publication Details</a></p><p><em>Estimated reading time: 10 minutes</em></p></div></div><div class="jig-ncbiinpagenav body-content whole_rhythm" data-jigconfig="allHeadingLevels: ['h2'],smoothScroll: false" 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/?report=reader#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/?report=reader">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/?report=reader">Chapter 2</a> for a general introduction to these utilities and <a href="/books/n/helpeutils/chapter4/?report=reader">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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader#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/?report=reader">PubMed</a> and <a href="/books/n/helpentrez/EntrezHelp/?report=reader">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="fm-sec"><h2 id="_NBK25500_pubdet_">Publication Details</h2><h3>Author Information and Affiliations</h3><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><h3>Publication History</h3><p class="small">Created: <span itemprop="datePublished">December 12, 2008</span>; Last Update: <span itemprop="dateModified">October 24, 2018</span>.</p><h3>Copyright</h3><div><div class="half_rhythm"><a href="/books/about/copyright/">Copyright Notice</a></div></div><h3>Publisher</h3><p><a href="http://www.ncbi.nlm.nih.gov/" ref="pagearea=page-banner&amp;targetsite=external&amp;targetcat=link&amp;targettype=publisher">National Center for Biotechnology Information (US)</a>, Bethesda (MD)</p><h3>NLM Citation</h3><p>Sayers E. E-utilities Quick Start. 2008 Dec 12 [Updated 2018 Oct 24]. In: Entrez Programming Utilities Help [Internet]. Bethesda (MD): National Center for Biotechnology Information (US); 2010-. <span class="bk_cite_avail"></span></p></div><div class="small-screen-prev"><a href="/books/n/helpeutils/toc/?report=reader"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M75,30 c-80,60 -80,0 0,60 c-30,-60 -30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Prev</text></svg></a></div><div class="small-screen-next"><a href="/books/n/helpeutils/chapter2/?report=reader"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M25,30c80,60 80,0 0,60 c30,-60 30,0 0,-60"></path><text x="20" y="28" textLength="60" style="font-size:25px">Next</text></svg></a></div></article></div><div id="jr-scripts"><script src="/corehtml/pmc/jatsreader/ptpmc_3.22/js/libs.min.js"> </script><script src="/corehtml/pmc/jatsreader/ptpmc_3.22/js/jr.min.js"> </script></div></div>
<!-- Book content -->
<script type="text/javascript" src="/portal/portal3rc.fcgi/rlib/js/InstrumentNCBIBaseJS/InstrumentPageStarterJS.js"> </script>
<!-- CE8B5AF87C7FFCB1_0191SID /projects/books/PBooks@9.11 portal105 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/3968615.js" snapshot="books"></script></body>
</html>