AI medical and pharmaceutical agents cannot rely on general web search engines. They need access to peer-reviewed, indexed medical journals. The National Center for Biotechnology Information (NCBI) provides public access to over 37 million citations through PubMed.
To search and retrieve these documents, you use the NCBI E-utilities API. This is a federated search system split into two steps: searching for document IDs, then fetching the document metadata.
First, you query esearch to get a list of unique PubMed IDs (PMIDs) matching a term:
curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer+immunotherapy&retmode=json&retmax=5"
Second, you pass the returned PMIDs to the esummary endpoint to retrieve normalized metadata records:
curl "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=38291044,38291045&retmode=json"
The E-utilities API returns structured JSON fields including authors, journal title, publication date, and mesh terms. This structured authority makes it a critical source for high-stakes medical retrieval. Relying on structured citations rather than web summaries ensures that clinical decision models operate on verified fact (see why web snippets fail).