GET /esearch.fcgi

nih.gov:ncbi-e-utilities

Summary: Search and retrieve primary IDs matching a query
Operation ID: esearch
Auth: unknown
Description

ESearch searches and retrieves primary IDs (for use in EFetch, ELink, and ESummary) and term translations, and optionally retains results for future use in the user's environment.

Parameters (10)

WebEnv (string, query, optional)

Web environment string returned from a previous ESearch, EPost or ELink call

api_key (string, query, optional)

NCBI API key for higher rate limits

db (string, query, required)

Database to search

Constraints: {'enum': ['pubmed', 'protein', 'nuccore', 'ipg', 'nucleotide', 'structure', 'genome', 'annotinfo', 'assembly', 'bioproject', 'biosample', 'blastdbinfo', 'books', 'cdd', 'clinvar', 'gap', 'gapplus', 'grasp', 'dbvar', 'gene', 'gds', 'geoprofiles', 'medgen', 'mesh', 'nlmcatalog', 'omim', 'orgtrack', 'pmc', 'proteinclusters', 'pcassay', 'protfam', 'pccompound', 'pcsubstance', 'seqannot', 'snp', 'sra', 'taxonomy', 'biocollections', 'gtr']}

query_key (integer, query, optional)

Query key returned from a previous ESearch, EPost or ELink call

retmax (integer, query, optional)

Total number of UIDs from the retrieved set to display (default: 20)

Constraints: {'maximum': 100000}

retmode (string, query, optional)

Return mode. Use 'json' for JSON output, 'xml' for XML output.

Constraints: {'enum': ['xml', 'json']}

retstart (integer, query, optional)

Sequential number of the first UID in the retrieved set to display (default: 0)

sort (string, query, optional)

Method for sorting results (varies by database)

term (string, query, required)

Entrez text query

usehistory (string, query, optional)

When 'y', store results on the history server

Constraints: {'enum': ['y', 'n']}

Examples (3)

TitleTypeURLAction
Basic PubMed search for cancer research curl https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer+immunotherapy
Search with JSON output and pagination curl https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=nuccore&term=COVID-19+genome&retmode=json&retmax=10&retstart=0
Search with history storage and sorting by relevance curl https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=CRISPR+gene+editing&usehistory=y&sort=relevance&retmax=50

Probe History

Latency

Status Codes

TimeStatusLatencySize
2026-03-23 10:48:03.620443 200 598ms
2026-03-23 09:03:46.184681 200 439ms
2026-03-23 09:01:42.001736 200 488ms

Response Changes

WhenOldNew
2026-03-23 09:03:46.184681 f7b49873fac2 401e92aa6d88
2026-03-23 10:48:03.620443 401e92aa6d88 954846d6faa2