NIH API: Get PubMed article
Gets 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.
Unofficial. Not affiliated with or endorsed by NIH.
Inputs
Values from the run on Oct 31, 2026, shown under Output.
- Article, required
article Article title, PubMed link, or PubMed number. Example: Effects of intermittent fasting on health, aging, and disease
https://pubmed.ncbi.nlm.nih.gov/32986097/
Input as JSON
{ "article": "https://pubmed.ncbi.nlm.nih.gov/32986097/" }Output
{ "issue": "11", "pages": "1491-1499", "title": "Effects of Time-Restricted Eating on Weight Loss and Other Metabolic Parameters in Women and Men With Overweight and Obesity: The TREAT Randomized Clinical Trial.", "volume": "180", "authors": [ { "name": "Dylan A Lowe", "affiliations": [ "Cardiovascular Research Institute, University of California, San Francisco, San Francisco." ] }, { "name": "Nancy Wu", "affiliations": [ "Cardiology Division, University of California, San Francisco, San Francisco.", "Center for Vulnerable Populations, University of California, San Francisco, San Francisco." ] }, { "name": "Linnea Rohdin-Bibby", "affiliations": [ "Cardiology Division, University of California, San Francisco, San Francisco." ] } ], "journal": "JAMA internal medicine", "abstract": "IMPORTANCE: The efficacy and safety of time-restricted eating have not been explored in large randomized clinical trials.\n\nOBJECTIVE: To determine the effect of 16:8-hour time-restricted eating on weight loss and metabolic risk markers.\n\nINTERVENTIONS: Participants were randomized such that the cons…", "doi_link": "https://doi.org/10.1001/jamainternmed.2020.4153" , "keywords": [], "pubmed_id": "32986097", "mesh_terms": [ "Adult", "Blood Glucose / metabolism", "Body Mass Index" ], "pubmed_link": "https://pubmed.ncbi.nlm.nih.gov/32986097/" , "publication_date": "2020-11-01", "publication_types": [ "Journal Article", "Randomized Controlled Trial", "Research Support, N.I.H., Extramural" ], "free_full_text_link": "https://pmc.ncbi.nlm.nih.gov/articles/PMC7522780/" , "conflict_of_interest": "Conflict of Interest Disclosures: Dr Lowe reported personal fees from Keyto outside the submitted work. Dr Vittinghoff reported personal fees from UCSF during the conduct of the study. Dr Heymsfield reported personal fees from Medifast Medical Advisory Board and personal fees from Tanita Medical Adv…"}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/get_article","input":{"article":"https://pubmed.ncbi.nlm.nih.gov/32986097/"}}' # 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/get_article" , "input": { "article": "https://pubmed.ncbi.nlm.nih.gov/32986097/" }})# 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/get_article" , "input": { "article": "https://pubmed.ncbi.nlm.nih.gov/32986097/" } }), 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/get_article# with {"article":"https://pubmed.ncbi.nlm.nih.gov/32986097/"}"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": [ "article" ], "properties": { "article": { "type": "string", "description": "Article title, PubMed link, or PubMed number. Example: Effects of intermittent fasting on health, aging, and disease" } }}Output schema
{ "type": "object", "required": [ "title", "authors", "journal", "volume", "issue", "pages", "publication_date", "abstract", "keywords", "mesh_terms", "publication_types", "conflict_of_interest", "doi_link", "free_full_text_link", "pubmed_link", "pubmed_id" ], "properties": { "issue": { "type": [ "string", "null" ] }, "pages": { "type": [ "string", "null" ] }, "title": { "type": "string" }, "volume": { "type": [ "string", "null" ] }, "authors": { "type": "array", "items": { "type": "object", "required": [ "name", "affiliations" ], "properties": { "name": { "type": "string" }, "affiliations": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } }, "journal": { "type": [ "string", "null" ] }, "abstract": { "type": [ "string", "null" ] }, "doi_link": { "type": [ "string", "null" ] }, "keywords": { "type": "array", "items": { "type": "string" } }, "pubmed_id": { "type": "string", "x-fous-developer": true }, "mesh_terms": { "type": "array", "items": { "type": "string" } }, "pubmed_link": { "type": "string" }, "publication_date": { "type": [ "string", "null" ] }, "publication_types": { "type": "array", "items": { "type": "string" } }, "free_full_text_link": { "type": [ "string", "null" ] }, "conflict_of_interest": { "type": [ "string", "null" ] } }, "additionalProperties": false}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
pubmed.ncbi.nlm.nih.gov/get_article- Returns
- title, authors with affiliations, journal, volume, issue, pages, publication date, abstract, keywords, MeSH terms, publication types, conflict of interest, DOI link, free full text link, PubMed link and ID
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/get_article with the inputs above.
Ask your agent
- Pull up the abstract and MeSH terms for PMID 31881139.
- I need the author affiliations and DOI for the paper titled "Global burden of 87 risk factors in 204 countries and territories, 1990–2019".
- Can you fetch the PubMed details for https://pubmed.ncbi.nlm.nih.gov/32109013/ — journal, volume, pages, and whether there's a free full text link?
- Look up the NIH PubMed record for "Safety and Efficacy of the BNT162b2 mRNA Covid-19 Vaccine" and tell me the conflict of interest statement and publication types.
- Get me the abstract and keywords from PubMed for the article "Gut microbiota in health and disease".
See more
All NIH methodsFinds PubMed medical and life-science articles by topic, with publication details and free full-text links when PubMed confirms them.
pubmed.ncbi.nlm.nih.gov/search_articlesFinds NIH research grants by topic, organisation, or researcher name. Searches the last five fiscal years by default.
reporter.nih.gov/search_grantsLooks 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_chemicalFinds 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 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_codeFinds a paper on Semantic Scholar by title, DOI or Semantic Scholar link and returns its abstract, one-sentence summary, authors, publication details, citation counts and a free PDF link when there is one.
semanticscholar.org/get_paperFinds a patent family on Espacenet by publication number or invention title and returns its publications, applicants, priority date and reported legal events. Legal-event coverage varies by country; a grant alone does not establish that a patent is currently in force.
espacenet.com/get_patent_family