PubMed Search Scraper
Search PubMed through NCBI E-utilities and return structured biomedical citation records with PMIDs, titles, authors, journals, dates, DOI, publication types, abstracts, MeSH terms, and article URLs.
Overview
PubMed Search Scraper gives agents a reliable public-API path into biomedical literature. Provide a PubMed query such as cancer immunotherapy[Title/Abstract], CRISPR[Title], or machine learning radiology and the tool calls NCBI ESearch, ESummary, and EFetch through Better Fetch. It returns compact citation rows with PMIDs, titles, PubMed URLs, authors, journal names, publication dates, DOI values, publication types, abstracts when available, MeSH descriptor terms, languages, volume, issue, and pages. It is built for literature monitoring, biomedical RAG ingestion, systematic-review screening, pharma intelligence, clinical evidence queues, and academic discovery workflows.
Last validated: Jul 3, 2026
Playground
Input
sort"relevance" | "pub_date"default: "relevance"Result ordering: relevance or PubMed publication date.
querystringrequiredPubMed query using normal PubMed syntax, e.g. cancer immunotherapy or CRISPR[Title].
journalstringOptional journal filter, e.g. Nature Medicine.
max_datestringOptional PubMed date upper bound in YYYY, YYYY/MM, or YYYY/MM/DD format.
min_datestringOptional PubMed date lower bound in YYYY, YYYY/MM, or YYYY/MM/DD format.
date_type"pdat" | "edat"default: "pdat"Date field used for min_date and max_date: publication date or Entrez date.
max_resultsintegerdefault: 10Maximum PubMed records to return.
article_typestringOptional PubMed publication type filter, e.g. Review or Clinical Trial.
include_abstractsbooleandefault: trueFetch PubMed XML and include abstracts when available.
include_mesh_termsbooleandefault: trueFetch PubMed XML and include MeSH descriptor terms when available.
Output
countintegerrequiredNumber of returned article records
querystringrequiredNormalized PubMed query used
articlesobject[]requiredStructured PubMed article records
source_urlstringrequiredNCBI ESearch URL fetched first
total_matchesintegerTotal PubMed matches reported by ESearch
Examples
cancer-immunotherapy
{
"sort": "pub_date",
"query": "cancer immunotherapy[Title/Abstract]",
"max_results": 3,
"include_abstracts": true,
"include_mesh_terms": true
}Use cases
FAQ
Does PubMed Search Scraper require an API key?
No. Version 0.1 uses the public NCBI E-utilities endpoints through Better Fetch. It keeps each run small and does not require login cookies, browser automation, or a private NCBI API key.
Does it download full-text articles?
No. It returns PubMed citation metadata and abstracts available in PubMed XML. It does not bypass publisher paywalls or fetch full-text article bodies.
Can I use PubMed field tags and date filters?
Yes. The query field accepts normal PubMed syntax, and the tool supports optional min_date, max_date, date_type, article_type, and journal filters for bounded searches.
Use it anywhere
MCP (Claude, Cursor, any client)
# Add the Better Fetch MCP connector (or paste the URL into # Claude → Settings → Connectors → Add custom connector): claude mcp add --transport http better-fetch https://betterfetch.co/api/mcp \ --header "Authorization: Bearer bf_your_key_here" # Then ask for the tool by name: pubmed_search_scraper
REST
curl -sS -X POST "https://betterfetch.co/api/tools/pubmed_search_scraper/run" \
-H "Authorization: Bearer bf_your_key_here" \
-H "Content-Type: application/json" \
-d '{"input": {"sort":"pub_date","query":"cancer immunotherapy[Title/Abstract]","max_results":3,"include_abstracts":true,"include_mesh_terms":true}}'Run locally
git clone https://github.com/better-fetch/tools/tree/main/tools/pubmed-search-scraper && cd pubmed-search-scraper && npm i
BETTER_FETCH_API_KEY=bf_your_key_here npx bf-tool run --input '{"sort":"pub_date","query":"cancer immunotherapy[Title/Abstract]","max_results":3,"include_abstracts":true,"include_mesh_terms":true}'