PubMed |
PubMed | Nucleotide | Protein | Genome | Structure | PopSet | Taxonomy | OMIM |
Linking to PubMed and other Entrez databases
Last Updated: June 4, 2001
The Entrez system provides three distinct ways to create Web URL links that search and retrieve documents from PubMed and the molecular biology databases. They are Entrez utilities, the URL button on the Details screen, and manually constructed URLs. This document describes the manually constructed URLs.
The Entrez search and retrieval system was not designed for downloading large quantities of data. However, if you represent an US-based organization, it is possible to lease MEDLINE data from NLM. Please see Leasing Data from the National Library of Medicine for details.
You may generate a query on your web page and submit it to PubMed and the other Entrez databases providing that proper attribution is given to the US National Library of Medicine (NLM) and PubMed. It must be clear to users that the search is actually being conducted at NLM. When you link to PubMed, present PubMed in a separate browser window that partially overlays your page. Users can then easily return to your page as well as go directly to PubMed.
NCBI's Disclaimer and Copyright notice must be evident to users of your service. NLM does not hold the copyright on the abstracts found in PubMed, the journal publishers do. NLM provides no legal advice concerning distribution of copyrighted materials. This advice should be sought from your legal counsel.
Begin a URL with the NCBI address, a search command, and database specification:
http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?cmd=Command&db=Database&...
where Command is one of the following:
Search - searches using search terms or phrases
with or without Boolean operators
Retrieve - retrieve results using unique identifiers
(UIDs)
Link - search using UIDs, then links to and displays
the related results of the retrieved items
Text - retrieve results in text format using unique
identifiers (UIDs)
and Database is one of the following:
Genome
Nucleotide
OMIM
PopSet
Protein
PubMed
Structure
Search
Syntax: cmd=Search&db=Database&term=Term&doptcmdl=Format
Examples:
To search PubMed for citations about hay fever published in 1999:
cmd=Search&db=PubMed&term=hay+fever+AND+1999[Publication+Date]
See the PubMed Help to qualify search terms by PubMed field tags.
To search the Protein database for "AAC72193"[PACC] and display the
results in GenPept format:
cmd=Search&db=Protein&term="AAC72193"[PACC]&doptcmdl=GenPept
To search Nucleotides for COMT sequences and display the brief format:
cmd=Search&db=Nucleotide&term=COMT&doptcmdl=Brief
See the Entrez Help to qualify search terms by Entrez field tags.
To search OMIM for the FBN1 gene and display the Text format:
cmd=Search&db=OMIM&term=fbn1[gene]&doptcmdl=Detailed
See the OMIM Help to qualify search terms by Entrez field tags.
Formats available by databases are listed below:
Database | Report Format | |
---|---|---|
PubMed | DocSum, Brief, Abstract, Citation, MEDLINE, SGML, ASN.1, ExternalLink | |
Nucleotide | DocSum, Brief, GenBank, ASN.1, FASTA, ExternalLink | |
OMIM | DocSum, Detailed, Synopsis, Variants, MiniMIM, ASN.1, ExternalLink | |
Protein | DocSum, Brief, GenPept, ASN.1, FASTA, ExternalLink | |
Genome | DocSum, Brief, ASN.1, ExternalLink | |
Structure | DocSum, Brief | |
PopSet | DocSum, Brief, ASN.1, FASTA, ExternalLink |
See Help for PubMed format, Entrez format, and OMIM format descriptions.
To retrieve results from Boolean queries as text requires two steps. You must first run your Boolean search to retrieve the UI numbers, then search by these UI numbers in the Entrez Utility PmFetch. PmFetch provides direct access to the data and is the most efficient way to retrieve results for a many users .
Tool is a string with no internal spaces that identifies the resource which is using Entrez links (e.g. tool=IGM or tool=FlyBase). This argument is used to help NCBI provide better service to third parties generating Entrez queries from programs. As with any query system, it is sometimes possible to ask the same question different ways, with different effects on performance. NCBI requests that developers sending batch requests include the 'Tool' argument.
For example:
&tool=FlyBase
Examples using Boolean Queries:
To search for PubMed citations on (hay fever OR asthma) AND (diet therapy
OR drug therapy):
cmd=search&db=PubMed&term=(hay+fever+OR+asthma)+AND+(diet+therapy+OR+drug+therapy)
To search for PubMed citations indexed with the MeSH terms Drosophila
and Circadian Rhythm, and then display the first 50 citations in citation
format:
cmd=search&term=Drosophila[mh]+AND+Circadian+Rhythm[mh]&db=PubMed&dispmax=50
&doptcmdl=citation
To search for Provider Links for citations in PubMed containing the
text word p21:
cmd=search&db=PubMed&term=p21[tw]+AND+human[mh]&doptcmdl=externallink
Date Ranging
Not all dates are supported in all databases. Date ranging can be specified in one of two ways:
Fixed Dates
Use these pmfilters to limit a search between two specific dates:
Relative Dates
Use these relative date filters to limit a search for citations whose dates fall between a number of days ago and today's date.
Use Retrieve to search using unique identifiers (UIDs). UIDs include the PubMed identifier (PMID), MEDLINE identifier (UI), and the molecular biology database identifier (GI). Accession numbers are not UIDs and cannot be retrieved via cmd=Retrieve. Use cmd=Search to search by accession number.
Syntax: cmd=Retrieve&db=Database&list_uids=ID&dopt=Format
Example:
To retrieve abstract format for PubMed UI 10480954:
cmd=Retrieve&db=PubMed&list_uids=10480954&dopt=Abstract
To display results as text, search by unique identifier using the Entrez utility PmFetch.
Use Link to search using UIDs, UIDs include the PubMed identifier (PMID) and the molecular biology database identifier (GI), and then link to and display the related results of the retrieved items.
Syntax: cmd=Link&db=DatabaseTo&dbFrom=DatabaseFrom&from_uid=ID
DatabaseTo is the database to retrieve links.
DatabaseFrom is the database searched.
Examples:
To retrieve Related Article links from PubMed UI 10495220:
cmd=Link&db=PubMed&dbFrom=PubMed&from_uid=10495220
To retrieve Nucleotide links from PubMed UI 10492167:
cmd=Link&db=Nucleotide&dbFrom=PubMed&from_uid=10492167
To retrieve PubMed links from Nucleotide GI 4759059 and display the
abstract:
cmd=Link&db=PubMed&dbFrom=Nucleotide&from_uid=4759059&dopt=Abstract
Use Text to retrieve results in text format using unique identifiers (UIDs). UIDs include the PubMed identifier (PMID) and the molecular biology database identifier (GI). Accession numbers are not UIDs and cannot be retrieved via cmd=Text.
Syntax: cmd=Text&db=Database&uid=ID&uid=ID&dopt=Format
Example:
To retrieve PubMed UIs 10480954, 10903209 in Text/Abstract format:
cmd=Text&db=PubMed&uid=10903209&uid=10480954&dopt=Abstract
To retrieve Protein sequence records in flat file format for GIs 9367031,
729567, 586553
cmd=Text&db=Protein&dopt=GenPept&dispmax=20&uid=9367031&uid=729567&uid=586553
Note: