mcpField
P
pubmed-trends

pubmed-trends

github.com/bmilesData & databases045 installsUpdated 15w ago
Repository

About pubmed-trends

A research intelligence API for analyzing publication activity across PubMed and OpenAlex. Researchers and agents can query trends, compare topics, find key papers, and explore emerging research using USDC micropayments via x402.

Key features

  1. 01Publication counts and time-series trends
  2. 02Compare research topics and growth
  3. 03Find scored key papers and digests
  4. 04Track weekly spikes and emerging topics
  5. 05Explore subtopics and author metrics

Use cases

  1. 01Checking publication volume for a query
  2. 02Comparing growth across research fields
  3. 03Finding influential papers in a time range
  4. 04Scanning categories for rising research topics

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/bmiles/pubmed-trends-skill --skill pubmed-trends

After installing, type/pubmed-trendsin Claude Code to confirm it loaded.

Bundled files.claude/skills/pubmed-trends

Details

From the project README

PubMed Trends API

Pay-per-query research intelligence from 37M+ PubMed articles. No API keys, no subscriptions — just USDC micropayments on Base via x402.

Base URL: https://pubmed.sekgen.xyz

Companion skill: Install x402 from coinbase/agentic-wallet-skills for payment commands.

Endpoints

GET /api/v1/snapshot — $0.01

Single-year publication count. Cheapest option for quick lookups.

ParameterRequiredDefaultDescription
queryYes—PubMed search query
yearNocurrent yearYear to query
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/snapshot?query=CRISPR&year=2025'

Returns count, total_pubmed, proportion (share of all PubMed articles).

GET /api/v1/trends — $0.01

Year-by-year publication counts with growth analytics over a range.

ParameterRequiredDefaultDescription
queryYes—PubMed search query
start_yearNocurrent - 10First year
end_yearNocurrent yearLast year
sourceNopubmedpubmed or openalex
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/trends?query=GLP-1+agonist&start_year=2015'

Returns yearly count, yoy_growth, plus analytics: cagr, trend_direction (growing/declining/stable/emerging), peak_year, acceleration.

GET /api/v1/compare — $0.02

Compare publication trends across 2–5 search terms. Identifies which field is growing fastest and detects crossover points.

ParameterRequiredDefaultDescription
termsYes—Comma-separated search terms (2–5)
start_yearNocurrent - 10First year
end_yearNocurrent yearLast year
sourceNopubmedpubmed or openalex
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/compare?terms=CAR-T,bispecific+antibodies,antibody+drug+conjugate'

Returns per-term series with cagr and trend_direction, plus ranking_by_growth and crossover_years (when one term overtook another).

GET /api/v1/pulse — $0.02

Real-time publication pulse with 7d/30d/90d windows and year-over-year change.

ParameterRequiredDefaultDescription
queryYes—PubMed search query
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/pulse?query=prime+editing'

Returns current and year_ago counts for 7d/30d/90d windows, plus change (fractional, e.g. 0.35 = 35% increase YoY).

GET /api/v1/keypapers — $0.03

Scored key papers for a query within a time window. Papers are ranked by a composite score based on journal prestige, publication type, MeSH relevance, and citation impact (via OpenAlex).

ParameterRequiredDefaultDescription
queryYes—PubMed search query
start_yearNocurrent - 5First year
end_yearNocurrent yearLast year
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/keypapers?query=base+editing&start_year=2023&end_year=2025'

Returns scored papers with pmid, title, journal, pub_year, pub_type, score, score_breakdown (top_journal, review_or_trial, mesh_major_topic, multi_strategy_hit, relevance_rank, citation_impact), cited_by_count, fwci (field-weighted citation impact), open_access status, and authors_enriched (name, institution, country).

GET /api/v1/digest — $0.08

Full research digest combining scored key papers, MeSH term landscape, and frequent authors. The most comprehensive single-call endpoint.

ParameterRequiredDefaultDescription
queryYes—PubMed search query
start_yearNocurrent - 5First year
end_yearNocurrent yearLast year
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/digest?query=NF2+schwannomatosis+treatment&start_year=2022&end_year=2025'

Returns everything from /keypapers plus mesh_terms (array of MeSH descriptors across the result set) and authors (recurring authors with appearance counts).

GET /api/v1/hottest-weekly — $0.05

Hottest topics in a category ranked by weekly spike ratio (last 7d vs 30d average). Use category for PubMed curated terms (default) or topic + source=openalex for free-text search.

ParameterRequiredDefaultDescription
categoryYes*—See categories below
topicYes*—Free-text topic (when source=openalex)
sourceNopubmedpubmed or openalex

*One of category or topic required depending on source.

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/hottest-weekly?category=oncology'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/hottest-weekly?topic=microbiome&source=openalex'

Returns topics sorted by spike_ratio. Values >1.0 mean more activity than usual this week.

GET /api/v1/emerging — $0.05

Scan a category for topics with accelerating publication rates. Use category for PubMed curated terms (default) or topic + source=openalex for free-text search.

ParameterRequiredDefaultDescription
categoryYes*—See categories below
topicYes*—Free-text topic (when source=openalex)
sourceNopubmedpubmed or openalex
window_yearsNo3Years to evaluate growth
min_growth_rateNo0.3Minimum CAGR threshold (0.3 = 30%)
limitNo10Max results

*One of category or topic required depending on source.

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/emerging?category=gene+therapy&min_growth_rate=0.5'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/emerging?topic=CRISPR&source=openalex'

Returns topics meeting the growth threshold, sorted by recent_cagr.

GET /api/v1/trending-subtopics — $0.05

Discover which sub-topics within a research field are growing fastest. Uses OpenAlex topic breakdown over a multi-year window.

ParameterRequiredDefaultDescription
queryYes—Research field to decompose
windowNo3Window size in years (2–5)
limitNo10Max results (1–25)
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/trending-subtopics?query=ulcerative+colitis&window=3'

Returns sub-topics with topic_id, topic_name, per-year counts, cagr, trend_direction, latest_year_count, and growth_score.

GET /api/v1/explore — $0.10

Discover interesting research signals. Two modes:

  1. With topics param — OpenAlex multi-domain scan: searches topics, computes spike_ratio x CAGR, ranks by explore_score.
  2. Without topics — D1 MeSH anomaly detection: z-score anomalies from stored baselines.
ParameterRequiredDefaultDescription
topicsNo—Comma-separated research topics to scan (max 4)
limitNo5Max results (1–20)
min_z_scoreNo2.0Minimum z-score for anomaly mode (without topics)
daysNo7Lookback days for anomaly mode (1–30, without topics)
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/explore?topics=neurodegeneration,epigenetics&limit=5'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/explore'

Returns ranked results with explore_score, spike_ratio, cagr_3y, trend_direction, and latest_year_count.

GET /api/v1/author — $0.02

Author analytics profile powered by OpenAlex. Returns citation metrics, institutional affiliation, and publication trajectory.

ParameterRequiredDefaultDescription
nameYes*—Author name to look up
orcidYes*—ORCID identifier (alternative to name)

*One of name or orcid required.

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/author?name=David+Liu'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/author?orcid=0000-0001-8277-943X'

Returns name, orcid, works_count, cited_by_count, h_index, i10_index, current_institution (name, country), top_topics, counts_by_year (works, cited_by per year).

POST /api/v1/feature-request — $0.01

Submit a feature request or data-source suggestion to the maintainers. The only POST endpoint. Send a JSON body. The x402 payment attributes the submission — the verified payer wallet is recorded as the submitter identity, so no separate account or auth is needed.

FieldRequiredDefaultDescription
titleYes—Short summary (1–120 chars)
descriptionYes—Full request (1–2000 chars)
categoryNo—One of endpoint, data, pricing, bug, other
contactNo—Optional contact string (≤200 chars) if you want a reply
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/feature-request' --method POST --data '{"title":"Add clinical-trial phase breakdown","description":"Return publication counts split by clinical trial phase (I-IV) for a query.","category":"data"}'

Returns ok, id, and a message. Validation failures return 400 before settlement, so a rejected submission is never charged.

Categories

Used by /hottest-weekly and /emerging (PubMed mode):

  • oncology — CAR-T, bispecific antibodies, ADCs, checkpoint inhibitors, liquid biopsy, KRAS inhibitors, PARP inhibitors, radiopharmaceuticals, cancer vaccines, spatial transcriptomics
  • neuroscience — anti-amyloid antibodies, brain-computer interfaces, psychedelic therapy, GLP-1 neurodegeneration, antisense oligonucleotides, deep brain stimulation
  • immunology — mRNA vaccines, CAR-T autoimmune, JAK inhibitors, regulatory T cells, microbiome immunotherapy, complement inhibitors
  • gene therapy — CRISPR, base editing, prime editing, AAV gene therapy, lipid nanoparticle mRNA, epigenome editing, RNA interference
  • cardiology — PCSK9 inhibitors, SGLT2 inhibitors, cardiac gene therapy, lipoprotein(a) inhibitors, AI cardiac imaging, wearable ECG

Free Endpoints

These do not require payment:

  • GET / — Service info and pricing
  • GET /health — Health check
  • GET /docs — Interactive documentation (HTML, or Markdown with Accept: text/markdown)
  • GET /llms.txt — Machine-readable documentation

Example Workflows

Quick fact check ($0.01):

"How much CRISPR research was published in 2025?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/snapshot?query=CRISPR&year=2025'

Technology race ($0.02):

"Is base editing overtaking traditional CRISPR?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/compare?terms=CRISPR+gene+editing,base+editing,prime+editing&start_year=2018'

Weekly research briefing ($0.10):

"What's spiking in oncology and neuroscience right now?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/hottest-weekly?category=oncology'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/hottest-weekly?category=neuroscience'

Drug target validation ($0.03):

"Is GLP-1 for neurodegeneration actually gaining traction?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/trends?query=GLP-1+agonist+neurodegeneration&start_year=2018'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/pulse?query=GLP-1+agonist+neurodegeneration'

Deep dive into a disease area ($0.13):

"What are the key papers and sub-topics for NF2 schwannoma treatment?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/keypapers?query=NF2+schwannoma+treatment&start_year=2022&end_year=2025'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/trending-subtopics?query=neurofibromatosis+type+2&window=3'
awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/pulse?query=NF2+schwannoma+treatment'

Full research digest ($0.08):

"Give me a comprehensive overview of NF2 schwannomatosis treatment research"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/digest?query=NF2+schwannomatosis+treatment&start_year=2022&end_year=2025'

Author profiling ($0.02):

"Who is Scott Plotkin and what's his publication record?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/author?name=Scott+Plotkin'

Discovery mode ($0.10):

"What's interesting happening across neurodegeneration and epigenetics?"

awal x402 pay 'https://pubmed.sekgen.xyz/api/v1/explore?topics=neurodegeneration,epigenetics&limit=5'

Error Handling

  • 402 — Payment required. Ensure you're authenticated (awal auth login) with USDC balance.
  • 400 — Invalid parameters. Check required fields and constraints (max 50-year range, 2–5 terms for compare).
  • 502 — Upstream NCBI error. Retry after a moment.
  • 503 — Service temporarily unavailable. Retry after a moment.

Comments

Markdown supported