NIH API: Search PubMed articles
Finds PubMed medical and life-science articles by topic, with publication details and free full-text links when PubMed confirms them.
Unofficial. Not affiliated with or endorsed by NIH.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Sort optional
sort Order by relevance or newest publication, for example newest.
newest
One of
relevance,newest. Defaultrelevance.- Query, required
query Topic in plain words, for example intermittent fasting blood pressure.
intermittent fasting blood pressure
- End Year optional
end_year Last publication year, for example 2024.
2024
Whole number from 1800 to 2100.
- Start Year optional
start_year First publication year, for example 2020.
2022
Whole number from 1800 to 2100.
- Max Results optional
max_results Maximum number of articles to return, for example 20 (up to 100).
5
Whole number from 1 to 100. Default
20.- Article Type optional
article_type Article type, for example systematic_review.
systematic_review
One of
any,clinical_trial,randomized_controlled_trial,review,systematic_review,meta_analysis. Defaultany.- Free Full Text Only optional
free_full_text_only Only include articles PubMed marks as free full text, for example true.
true
True or false. Default
false.
Input as JSON
{ "sort": "newest", "query": "intermittent fasting blood pressure", "end_year": 2024, "start_year": 2022, "max_results": 5, "article_type": "systematic_review", "free_full_text_only": true}Output
{ "articles": [ { "doi": "10.3390/nu16203533" , "title": "Is Fasting Superior to Continuous Caloric Restriction for Weight Loss and Metabolic Outcomes in Obese Adults? A Systematic Review and Meta-Analysis of Randomized Clinical Trials.", "authors": "Víctor Siles-Guerrero, Jose M Romero-Márquez, Rosa Natalia García-Pérez, et al.", "journal": "Nutrients", "pubmed_id": "39458528", "pubmed_link": "https://pubmed.ncbi.nlm.nih.gov/39458528/" , "article_type": "Meta-Analysis", "abstract_excerpt": "BACKGROUND: fasting-based strategies (FBS) and continuous caloric restriction (CCR) are popular methods for weight loss and improving metabolic health. FBS alternates between eating and fasting periods, while CCR reduces daily calorie intake consistently. Both aim to create a calorie deficit, but it", "publication_date": "2024-10-18", "free_full_text_link": "https://pmc.ncbi.nlm.nih.gov/articles/PMC11510157/" }, { "doi": "10.1016/j.cjca.2024.02.004" , "title": "Risks and Benefits of Intermittent Fasting for the Aging Cardiovascular System.", "authors": "Mualla Ozcan, Mahmoud Abdellatif, Ali Javaheri, et al.", "journal": "The Canadian journal of cardiology", "pubmed_id": "38354947", "pubmed_link": "https://pubmed.ncbi.nlm.nih.gov/38354947/" , "article_type": "Systematic Review", "abstract_excerpt": "Population aging and the associated increase in cardiovascular disease rates pose serious threats to global public health. Different forms of fasting have become an increasingly attractive strategy to directly address aging and potentially limit or delay the onset of cardiovascular diseases. A growi", "publication_date": "2024-02-12", "free_full_text_link": null }, { "doi": "10.1186/s12937-023-00909-x" , "title": "Combined versus independent effects of exercise training and intermittent fasting on body composition and cardiometabolic health in adults: a systematic review and meta-analysis.", "authors": "Mousa Khalafi, Michael E Symonds, Aref Habibi Maleki, et al.", "journal": "Nutrition journal", "pubmed_id": "38183054", "pubmed_link": "https://pubmed.ncbi.nlm.nih.gov/38183054/" , "article_type": "Meta-Analysis", "abstract_excerpt": "INTRODUCTION AND AIM: Exercise training (Ex) and intermittent fasting (IF) are effective for improving body composition and cardiometabolic health overweight and obese adults, but whether combining Ex and IF induces additive or synergistic effects is less well established. We therefore, performed a ", "publication_date": "2024-01-06", "free_full_text_link": "https://pmc.ncbi.nlm.nih.gov/articles/PMC10770891/" } ]}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"pubmed.ncbi.nlm.nih.gov/search_articles","input":{"sort":"newest","query":"intermittent fasting blood pressure","end_year":2024,"start_year":2022,"max_results":5,"article_type":"systematic_review","free_full_text_only":true}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "pubmed.ncbi.nlm.nih.gov/search_articles" , "input": { "sort": "newest", "query": "intermittent fasting blood pressure", "end_year": 2024, "start_year": 2022, "max_results": 5, "article_type": "systematic_review", "free_full_text_only": True }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "pubmed.ncbi.nlm.nih.gov/search_articles" , "input": { "sort": "newest", "query": "intermittent fasting blood pressure", "end_year": 2024, "start_year": 2022, "max_results": 5, "article_type": "systematic_review", "free_full_text_only": true } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run pubmed.ncbi.nlm.nih.gov/search_articles# with {"sort":"newest","query":"intermittent fasting blood pressure","end_year":2024,"start_year":2022,"max_results":5,"article_type":"systematic_review","free_full_text_only":true}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "query" ], "properties": { "sort": { "enum": [ "relevance", "newest" ], "type": "string", "default": "relevance", "description": "Order by relevance or newest publication, for example newest." }, "query": { "type": "string", "minLength": 1, "description": "Topic in plain words, for example intermittent fasting blood pressure." }, "end_year": { "type": "integer", "maximum": 2100, "minimum": 1800, "description": "Last publication year, for example 2024." }, "start_year": { "type": "integer", "maximum": 2100, "minimum": 1800, "description": "First publication year, for example 2020." }, "max_results": { "type": "integer", "default": 20, "maximum": 100, "minimum": 1, "description": "Maximum number of articles to return, for example 20 (up to 100)." }, "article_type": { "enum": [ "any", "clinical_trial", "randomized_controlled_trial", "review", "systematic_review", "meta_analysis" ], "type": "string", "default": "any", "description": "Article type, for example systematic_review." }, "free_full_text_only": { "type": "boolean", "default": false, "description": "Only include articles PubMed marks as free full text, for example true." } }, "additionalProperties": false}Output schema
{ "type": "object", "required": [ "articles" ], "properties": { "articles": { "type": "array", "items": { "type": "object", "required": [ "title", "authors", "journal", "publication_date", "article_type", "abstract_excerpt", "free_full_text_link", "pubmed_link", "pubmed_id", "doi" ], "properties": { "doi": { "type": [ "string", "null" ], "description": "Digital object identifier, when available.", "x-fous-developer": true }, "title": { "type": "string", "description": "Article title." }, "authors": { "type": "string", "description": "First three authors, followed by et al. if there are more." }, "journal": { "type": [ "string", "null" ], "description": "Journal name, when available." }, "pubmed_id": { "type": "string", "description": "PubMed identifier.", "x-fous-developer": true }, "pubmed_link": { "type": "string", "description": "PubMed article page." }, "article_type": { "type": [ "string", "null" ], "description": "PubMed publication type." }, "abstract_excerpt": { "type": [ "string", "null" ], "description": "First 300 characters of the abstract, when available." }, "publication_date": { "type": [ "string", "null" ], "description": "Publication date, as YYYY-MM-DD, YYYY-MM, or YYYY when only part is known." }, "free_full_text_link": { "type": [ "string", "null" ], "description": "A confirmed free full-text page, when available." } }, "additionalProperties": false }, "description": "Matching articles in the requested order." } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
pubmed.ncbi.nlm.nih.gov/search_articles- Returns
- title, authors, journal, publication date, article type, abstract excerpt, free full-text link, PubMed link, PubMed ID, DOI
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method pubmed.ncbi.nlm.nih.gov/search_articles with the inputs above.
Ask your agent
- Find recent systematic reviews on intermittent fasting and blood pressure published since 2020, free full text only
- Search PubMed for randomized controlled trials of semaglutide and weight loss from 2022 to 2024, newest first
- I need meta-analyses on vitamin D supplementation and depression risk, sorted by relevance, up to 30 results
- Look up review articles about gut microbiome and type 2 diabetes on nih.gov published between 2018 and 2023
- Show me the newest clinical trials on mRNA vaccine side effects in adolescents, limited to 15 results with free full-text links
See more
All NIH methodsGets the full PubMed abstract and publication details for one article by title, PubMed link, or PubMed number (PMID). A title is searched in PubMed titles first and must closely match a found article. Some articles have no abstract or free full text.
pubmed.ncbi.nlm.nih.gov/get_articleFinds NIH research grants by topic, organisation, or researcher name. Searches the last five fiscal years by default.
reporter.nih.gov/search_grantsFinds ICD-10-CM diagnosis codes and official names from a plain-language condition description, retrying with simplified wording when the first search finds nothing.
clinicaltables.nlm.nih.gov/search_diagnosis_codesLooks up a chemical on PubChem by common name or CAS number and returns its formula, molecular weight, names, description, SMILES, InChIKey and 2D structure image link.
pubchem.ncbi.nlm.nih.gov/get_chemicalLooks up a chemical on PubChem by name or CAS number and returns its GHS hazard labels, route-specific first aid, flash point and workplace exposure limits.
pubchem.ncbi.nlm.nih.gov/get_chemical_safetyExplains an ICD-10-CM diagnosis code with its official name, category, chapter, and whether it is billable, using the NLM Clinical Tables diagnosis table.
clinicaltables.nlm.nih.gov/explain_diagnosis_codeSearches NPR-published articles by keyword, newest first or by best match, with optional publication dates, and returns each article's date, authors, section and summary.
npr.org/search_newsFinds bioRxiv and medRxiv preprints whose title, abstract or subject matches all topic words, within a posting date range, newest first. Adds published journal details when available.
biorxiv.org/search_preprints