Search PubMed and bioRxiv for biomedical research papers with titles and abstracts.
python
import requests
import xml.etree.ElementTree as ET
# Step 1: Search for PMIDs
search_url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi"
params = {"db": "pubmed", "term": "PD-1 inhibitor cancer", "retmax": 10, "retmode": "json"}
response = requests.get(search_url, params=params)
pmids = response.json()["esearchresult"]["idlist"]
# Step 2: Fetch paper details
fetch_url = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi"
response = requests.get(fetch_url, params={"db": "pubmed", "id": ",".join(pmids), "rettype": "abstract", "retmode": "xml"})
python
import requests
# Fetch papers by date range
url = "https://api.biorxiv.org/details/biorxiv/2026-02-01/2026-03-01"
response = requests.get(url)
papers = response.json()["collection"]
for paper in papers[:5]:
print(f"Title: {paper['title']}")
print(f"Abstract: {paper['abstract'][:200]}...")
Returns list of papers with:
FieldDescriptiontitlePaper titleauthorsAuthor listabstractFull abstractdoiDOI identifierpmidPubMed IDdatePublication datelinkPubMed URL
Returns list of papers with:
FieldDescriptiontitlePaper titleauthorsAuthor listabstractFull abstractdoiDOI identifierdatePublication datecategorySubject categorylinkbioRxiv URL
CategoryDescriptioncancer_biologyCancer researchimmunologyImmune system studiescell_biologyCellular processesbioinformaticsComputational biologyneuroscienceNervous system researchmicrobiologyMicrobial studiesgenomicsGenome analysis
ErrorSolutionNo PubMed resultsBroaden search terms, check spellingbioRxiv timeoutReduce date range, retryEmpty abstractPaper may not have abstract availableRate limitingAdd delay between requests (NCBI: 3 req/sec)
See examples/basic_example.py for complete runnable examples.