Search PubMed with NCBI E-utilities esearch and retrieve records with efetch

domain: eutils.ncbi.nlm.nih.gov · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Call esearch.fcgi with db=pubmed and a term query to get a list of PMIDs plus a WebEnv/query_key history token
  2. Optionally page through results using retstart/retmax, noting the 10,000-record ceiling (retstart + retmax <= 10000)
  3. Call efetch.fcgi with db=pubmed, the WebEnv/query_key (or explicit id list), and rettype/retmode (e.g. abstract/xml) to fetch full records
  4. Include an api_key parameter obtained from an NCBI account to raise the rate limit
  5. Throttle requests client-side to stay within the applicable rate limit
  6. Handle HTTP 429s with exponential backoff since NCBI enforces limits per key/IP regardless of client identity

Known gotchas

Related routes

Search biomedical literature via the Europe PMC REST API
www.ebi.ac.uk · 6 steps · unrated
Execute a search query against the EBSCO EDS API
developer.ebsco.com · 4 steps · unrated
Use FHIR _include and chained search parameters to fetch related resources in one request
fhir · 6 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans