Better Fetch

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.

Researchv0.1.1~2 credits/runSource on GitHub

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

Result ordering: relevance or PubMed publication date.

PubMed query using normal PubMed syntax, e.g. cancer immunotherapy or CRISPR[Title].

Optional journal filter, e.g. Nature Medicine.

Optional PubMed date upper bound in YYYY, YYYY/MM, or YYYY/MM/DD format.

Optional PubMed date lower bound in YYYY, YYYY/MM, or YYYY/MM/DD format.

Date field used for min_date and max_date: publication date or Entrez date.

Maximum PubMed records to return.

Optional PubMed publication type filter, e.g. Review or Clinical Trial.

Fetch PubMed XML and include abstracts when available.

Fetch PubMed XML and include MeSH descriptor terms when available.

Sign in to run this tool

~2 credits per run · runs against your account

Input

sort"relevance" | "pub_date"default: "relevance"

Result ordering: relevance or PubMed publication date.

querystringrequired

PubMed query using normal PubMed syntax, e.g. cancer immunotherapy or CRISPR[Title].

journalstring

Optional journal filter, e.g. Nature Medicine.

max_datestring

Optional PubMed date upper bound in YYYY, YYYY/MM, or YYYY/MM/DD format.

min_datestring

Optional 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: 10

Maximum PubMed records to return.

article_typestring

Optional PubMed publication type filter, e.g. Review or Clinical Trial.

include_abstractsbooleandefault: true

Fetch PubMed XML and include abstracts when available.

include_mesh_termsbooleandefault: true

Fetch PubMed XML and include MeSH descriptor terms when available.

Output

countintegerrequired

Number of returned article records

querystringrequired

Normalized PubMed query used

articlesobject[]required

Structured PubMed article records

source_urlstringrequired

NCBI ESearch URL fetched first

total_matchesinteger

Total 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

Literature monitoring

Run precise PubMed queries with date filters and collect recent paper metadata for disease, drug, biomarker, clinical-trial, or research-topic monitoring.

Review screening

Create compact screening tables with PMID, title, authors, journal, publication type, DOI, abstract, and PubMed URL before deeper human or agent review.

Biomedical RAG ingestion

Collect PubMed abstracts, MeSH terms, and citation metadata in a structured shape suitable for downstream embeddings, retrieval, and evidence synthesis.

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}'