Quick reference guide for querying NCBI databases via E-utilities API.
Find human BRCA1 gene:
Database: gene
Term: BRCA1[Gene Name] AND Homo sapiens[Organism]
Database: nucleotide
ID: NM_001385642
Format: fasta
Database: taxonomy
ID: 9606
Database: pubmed
Term: CRISPR[Title/Abstract] AND 2023[PDAT]
Database
ID Parameter Value
Nucleotide
nuccore
Protein
protein
Gene
gene
Taxonomy
taxonomy
PubMed
pubmed
dbSNP
snp
ClinVar
clinvar
Assembly
assembly
Structure (MMDB)
structure
GEO
gds
SRA
sra
Format
retmode
rettype
Use Case
JSON
json
-
Programmatic parsing
XML
xml
-
Structured data
FASTA
text
fasta
Sequence data
GenBank
text
gb
Full record
Summary
json
summary
Quick overview
Abstract
text
abstract
PubMed abstract
Search gene : esearch -db gene -query "GENE_NAME[Gene Name] AND SPECIES[Organism]"
Get ID : Extract ID from result
Find sequences : elink -dbfrom gene -linkname gene_nucleotide -id GENE_ID
Fetch : efetch -db nuccore -id SEQ_ID -rettype fasta
Find Gene → Find Literature
Search gene : Get Gene ID
Link to PubMed : elink -dbfrom gene -linkname gene_pubmed -id GENE_ID
Fetch abstracts : efetch -db pubmed -id PUBMED_IDS -rettype abstract
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=gene&term=BRCA1[Gene+Name]+AND+Homo+sapiens[Organism]&retmax=5&retmode=json
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=gene&id=672&retmode=json
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_001385642&rettype=fasta&retmode=text
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&id=NM_001385642&rettype=gb&retmode=text
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=taxonomy&id=9606&rettype=xml&retmode=text
https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=CRISPR[Title/Abstract]+AND+2023[PDAT]&retmax=20&retmode=json
Field Tags (for searching)
Tag
Description
Example
[Gene Name]
Gene symbol
BRCA1[Gene Name]
[Organism]
Species name
Homo sapiens[Organism]
[Title]
Paper title
CRISPR[Title]
[Title/Abstract]
Title or abstract
cancer[Title/Abstract]
[Author]
Author name
Smith[Author]
[Journal]
Journal name
Nature[Journal]
[PDAT]
Publication date
2023[PDAT]
[DP]
Date of publication
2022[DP]
[All Fields]
Search all fields
mutation[All Fields]
Operator
Description
Example
AND
Both terms
BRCA1 AND TP53
OR
Either term
cancer OR tumor
NOT
Exclude term
human NOT mouse
[Title]
Field search
CRISPR[Title]
*
Truncation
bacter*
" "
Phrase search
"breast cancer"
Modifier
Description
Example
[Organism]
Species filter
Homo sapiens[Organism]
[filter]
Results filter
latest[filter]
[pt]
Publication type
review[pt]
[dp]
Date range
2020:2023[dp]
Without API key : 3 requests/second
With API key : 10 requests/second
Get API key: https://www.ncbi.nlm.nih.gov/account/
Always include your email: email=user@example.com
Use JSON for parsing: retmode=json
For large queries: use usehistory=y + webenv
Check retmax for pagination
Use esummary for quick checks before efetch