MeSH
App · 15 actions
Look up MeSH, the Medical Subject Headings the U.S. National Library of Medicine indexes PubMed with: the official heading for a subject, its tree numbers and place in the hierarchy, synonyms (entry terms), definition and allowed subheadings (qualifiers), plus supplementary concept records for chemicals, drugs and rare diseases with the headings they map to, and drugs' pharmacological actions. Use it to tag content with standard headings, expand a search with synonyms and narrower headings, or build a precise PubMed query. Every action reads; no account or API key required.
Actions
| Action | What it does |
|---|---|
| Build PubMed search | Build a PubMed search for a MeSH heading or supplementary concept, with its exact name and the right search tag: optionally narrowed to subheadings or to articles where it is a main topic, without the headings below it, or widened with its entry terms as title and abstract words. |
| Check heading and subheading | Check whether MeSH allows a subheading with a heading, such as Ofloxacin/adverse effects, and get the pair's ID. |
| Get broader headings | Get every heading above a heading in the MeSH trees: its direct parents, all its ancestors up to the top of each tree, and one readable path per tree number, such as Diseases > Cardiovascular Diseases > Heart Diseases > Myocardial Ischemia > Myocardial Infarction. |
| Get heading | Get a MeSH heading in full: its definition (scope note), tree numbers, entry terms, allowed subheadings with their abbreviations, broader and see-also headings, pharmacological actions for a drug, previous indexing, NLM's notes, registry numbers and dates. |
| Get narrower headings | List the headings below a heading in the MeSH trees: the level just below, or every heading below it, which is what PubMed searches when it explodes a heading. |
| Get subheading | Get a MeSH subheading (qualifier) in full: its abbreviation, what it is used with (scope note), its place in the subheading tree, its other names, NLM's notes and dates. |
| Get supplementary concept | Get a MeSH supplementary concept record (a chemical, drug, rare disease or organism) in full: the headings it maps to, which are how PubMed indexes it, its pharmacological actions, synonyms, registry numbers, how many PubMed articles carry it, NLM's note and dates. |
| List allowed subheadings | List the subheadings (qualifiers, such as adverse effects or drug therapy) MeSH allows with a heading, with their IDs and two-letter abbreviations. |
| List pharmacological actions | List what a drug or chemical does, as MeSH pharmacological actions: Ofloxacin is an Anti-Bacterial Agent and a Topoisomerase II Inhibitor, among others. |
| List substances with an action | List the drugs and chemicals MeSH files under a pharmacological action, such as every Anti-Bacterial Agent: headings, supplementary concepts, or both. |
| Look up MeSH IDs | Name up to 100 MeSH IDs at once, of any kind: headings (D...), subheadings (Q...), supplementary concepts (C...), heading/subheading pairs, concepts and terms. |
| Look up tree number | Find the heading at a MeSH tree number, such as C14.280.647, with the heading one level up and every heading one level down. |
| Search entry terms | Find MeSH entry terms (the synonyms, spellings, brand names and codes that lead to a heading) by text, and the heading, subheading or supplementary concept each one names: 'heart attack' leads to Myocardial Infarction, 'paracetamol' to Acetaminophen. |
| Search headings | Find MeSH headings (descriptors, the subjects PubMed indexes articles under) by name: exactly, containing some text, or starting with it, in any letter case. |
| Search supplementary concepts | Find MeSH supplementary concept records by name: the chemicals, drugs, rare diseases, organisms, population groups and drug protocols MeSH records outside its headings. |
Build PubMed search
Build a PubMed search for a MeSH heading or supplementary concept, with its exact name and the right search tag: optionally narrowed to subheadings or to articles where it is a main topic, without the headings below it, or widened with its entry terms as title and abstract words. Returns the query and a link that runs it; the PubMed integration's search takes the query as it is.
Inputs
- Heading or supplementary concept
headingtextRequired - A heading's ID (D009203), a supplementary concept's ID (C000718217), or either's exact name.
- Subheadings
subheadingslist - Only articles indexed with the heading under any of these subheadings. Leave empty for all of them. Headings only.
- Main topic only
major_topic_onlytrue/false - Only articles where the heading is a main topic. Off by default.Default:
false. - Include narrower headings
include_narrowertrue/false - Also find articles indexed with the headings below it, as PubMed does by default. On by default.Default:
true. - Add entry terms as text words
add_entry_termstrue/false - Also search titles and abstracts for the heading's name and synonyms, to catch articles not yet indexed. Off by default.Default:
false.
Outputs
heading_idtext- The heading's (or supplementary concept's) MeSH ID.
heading_nametext- Its exact name, as the search uses it.
include_narrowertrue/false- True when the headings below it are found too.
kindtext- heading or supplementary_concept.
major_topic_onlytrue/false- True when only articles with it as a main topic are found.
pubmed_urltext- A link that runs the search on pubmed.ncbi.nlm.nih.gov.
querytext- The PubMed search, ready for PubMed's search box or Search step.
subheadingslist- The subheadings the search narrows to, by name.
summarytext- One line saying what came back.
text_wordslist- The names searched for in titles and abstracts too.
typetext- Its type in words: Topical heading, Geographic heading, Publication type, Check tag, Subheading, or a supplementary concept's type (Chemical, Disease, Organism, Population, Protocol, Anatomy).
Example output
{
"heading_id": "D009203",
"heading_name": "Myocardial Infarction",
"include_narrower": true,
"kind": "heading",
"major_topic_only": true,
"pubmed_url": "https://pubmed.ncbi.nlm.nih.gov/?term=%28%22Myocardial+Infarction%2Fdrug+therapy%22%5BMajr%5D+OR+%22Myocardial+Infarction%2Fsurgery%22%5BMajr%5D%29",
"query": "(\"Myocardial Infarction/drug therapy\"[Majr] OR \"Myocardial Infarction/surgery\"[Majr])",
"subheadings": [
"drug therapy",
"surgery"
],
"summary": "PubMed search for Myocardial Infarction: (\"Myocardial Infarction/drug therapy\"[Majr] OR \"Myocardial Infarction/surgery\"[Majr])",
"text_words": [],
"type": "Topical heading"
}Check heading and subheading
Check whether MeSH allows a subheading with a heading, such as Ofloxacin/adverse effects, and get the pair's ID. For a pair it doesn't allow, NLM often names the heading to use instead: Heart/abnormalities points to Heart Defects, Congenital.
Inputs
- Heading
headingtextRequired - The heading's MeSH ID, such as D009203, or its exact name. 'Search headings' finds either.
- Subheading
subheadingtextRequired - Pick a subheading, or type its ID (Q000009), name (adverse effects) or abbreviation (AE).
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
abbreviationtext- The subheading's two-letter abbreviation.
allowedtrue/false- True when MeSH allows the subheading with the heading.
foundtrue/false- True when MeSH has both the heading and the subheading.
heading_idtext- The heading's MeSH ID.
heading_nametext- The heading's name.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
pair_idtext- The pair's MeSH ID, such as D015242Q000009.
pair_nametext- The pair as PubMed writes it, such as Ofloxacin/adverse effects.
subheading_idtext- The subheading's MeSH ID.
subheading_nametext- The subheading's name.
summarytext- One line saying what came back.
use_instead_idtext- For a pair MeSH does not allow, the ID of the heading (or pair) NLM says to use instead, when it names one.
use_instead_nametext- Its name, such as Heart Defects, Congenital.
Example output
{
"abbreviation": "AB",
"allowed": false,
"found": true,
"heading_id": "D006321",
"heading_name": "Heart",
"mesh_year": "current",
"pair_id": "D006321Q000002",
"pair_name": "Heart/abnormalities",
"subheading_id": "Q000002",
"subheading_name": "abnormalities",
"summary": "Heart/abnormalities is not allowed; use Heart Defects, Congenital (D006330) instead",
"use_instead_id": "D006330",
"use_instead_name": "Heart Defects, Congenital"
}Get broader headings
Get every heading above a heading in the MeSH trees: its direct parents, all its ancestors up to the top of each tree, and one readable path per tree number, such as Diseases > Cardiovascular Diseases > Heart Diseases > Myocardial Ischemia > Myocardial Infarction. Useful for tagging with broader subjects.
Inputs
- Heading
headingtextRequired - The heading's MeSH ID, such as D009203, or its exact name. 'Search headings' finds either.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
ancestor_countnumber- How many headings sit above it.
ancestor_idslist- The IDs of every heading above it, in the same order.
ancestorslist- Every heading above it, the top of each tree first.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
idtext- The record's MeSH ID, such as D009203.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The heading's name.
parent_countnumber- How many headings sit directly above it.
parentslist- The headings directly above it.
pathslist- One path from the top of a tree for each tree number.
summarytext- One line saying what came back.
tree_numberslist- The heading's own tree numbers.
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"ancestor_count": 9,
"ancestor_ids": [
"D002318",
"D013568",
"D006331",
"D010335",
"D014652",
"D007511",
"D017202",
"D009336",
"D007238"
],
"ancestors": [
{
"id": "D002318",
"level": 1,
"name": "Cardiovascular Diseases",
"tree_numbers": [
"C14"
]
},
{
"id": "D013568",
"level": 1,
"name": "Pathological Conditions, Signs and Symptoms",
"tree_numbers": [
"C23"
]
},
{
"id": "D006331",
"level": 2,
"name": "Heart Diseases",
"tree_numbers": [
"C14.280"
]
},
{
"id": "D010335",
"level": 2,
"name": "Pathologic Processes",
"tree_numbers": [
"C23.550"
]
},
{
"id": "D014652",
"level": 2,
"name": "Vascular Diseases",
"tree_numbers": [
"C14.907"
]
},
{
"id": "D007511",
"level": 3,
"name": "Ischemia",
"tree_numbers": [
"C23.550.513"
]
},
{
"id": "D017202",
"level": 3,
"name": "Myocardial Ischemia",
"tree_numbers": [
"C14.280.647",
"C14.907.585"
]
},
{
"id": "D009336",
"level": 3,
"name": "Necrosis",
"tree_numbers": [
"C23.550.717"
]
},
{
"id": "D007238",
"level": 4,
"name": "Infarction",
"tree_numbers": [
"C23.550.513.355",
"C23.550.717.489"
]
}
],
"found": true,
"id": "D009203",
"mesh_year": "current",
"name": "Myocardial Infarction",
"parent_count": 2,
"parents": [
{
"id": "D007238",
"name": "Infarction",
"tree_numbers": [
"C23.550.513.355",
"C23.550.717.489"
]
},
{
"id": "D017202",
"name": "Myocardial Ischemia",
"tree_numbers": [
"C14.280.647",
"C14.907.585"
]
}
],
"paths": [
{
"path": "Diseases > Cardiovascular Diseases > Heart Diseases > Myocardial Ischemia > Myocardial Infarction",
"tree_number": "C14.280.647.500"
},
{
"path": "Diseases > Cardiovascular Diseases > Vascular Diseases > Myocardial Ischemia > Myocardial Infarction",
"tree_number": "C14.907.585.500"
},
{
"path": "Diseases > Pathological Conditions, Signs and Symptoms > Pathologic Processes > Ischemia > Infarction > Myocardial Infarction",
"tree_number": "C23.550.513.355.750"
},
{
"path": "Diseases > Pathological Conditions, Signs and Symptoms > Pathologic Processes > Necrosis > Infarction > Myocardial Infarction",
"tree_number": "C23.550.717.489.750"
}
],
"summary": "Myocardial Infarction (D009203) sits under Infarction; Myocardial Ischemia",
"tree_numbers": [
"C14.280.647.500",
"C14.907.585.500",
"C23.550.513.355.750",
"C23.550.717.489.750"
],
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D009203"
}Get heading
Get a MeSH heading in full: its definition (scope note), tree numbers, entry terms, allowed subheadings with their abbreviations, broader and see-also headings, pharmacological actions for a drug, previous indexing, NLM's notes, registry numbers and dates. A heading MeSH doesn't have comes back with found false.
Inputs
- Heading
headingtextRequired - The heading's MeSH ID, such as D009203, or its exact name. 'Search headings' finds either.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
activetrue/false- False for a heading NLM has retired.
allowed_subheading_countnumber- How many subheadings it allows.
allowed_subheadingslist- The subheadings MeSH allows with it, by name.
annotationtext- NLM's notes to indexers on how to use it.
broader_headingslist- The headings directly above it in the trees.
cas_nametext- For a chemical, its Chemical Abstracts systematic name.
consider_alsotext- Word roots of related headings worth searching too.
date_createdtext- When the record was created, as YYYY-MM-DD, if NLM says.
date_establishedtext- When it was established, as YYYY-MM-DD, if NLM says.
date_introducedtext- When it entered MeSH, as YYYY-MM-DD.
date_revisedtext- When it was last revised, as YYYY-MM-DD, if NLM says.
entry_termslist- Its synonyms and other names, which lead to it in searches.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
history_notetext- How the heading has changed over the years.
idtext- The record's MeSH ID, such as D009203.
last_updatedtext- When NLM last updated it, as YYYY-MM-DD.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The heading's name, such as Myocardial Infarction.
nlm_classification_numbertext- The NLM Classification shelf number, such as WG 310.
online_notetext- NLM's advice for searching older articles.
pharmacological_actionslist- For a drug or chemical, what it does, as headings.
previous_indexinglist- Headings PubMed used for the subject before this one existed, with years.
public_mesh_notetext- NLM's public note on its history.
registry_numberslist- For a chemical, its CAS, UNII or EC numbers, some with a name after them.
scope_notetext- NLM's definition of the heading.
see_alsolist- Related headings NLM points to.
summarytext- One line saying what came back.
tree_numberslist- Where it sits in the MeSH trees, such as C14.280.647.500; one per place.
typetext- Its type in words: Topical heading, Geographic heading, Publication type, Check tag, Subheading, or a supplementary concept's type (Chemical, Disease, Organism, Population, Protocol, Anatomy).
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"active": true,
"allowed_subheading_count": 35,
"allowed_subheadings": [
{
"abbreviation": "BL",
"id": "Q000097",
"name": "blood"
},
{
"abbreviation": "CF",
"id": "Q000134",
"name": "cerebrospinal fluid"
},
{
"abbreviation": "CI",
"id": "Q000139",
"name": "chemically induced"
},
{
"abbreviation": "CL",
"id": "Q000145",
"name": "classification"
},
{
"abbreviation": "CO",
"id": "Q000150",
"name": "complications"
},
{
"abbreviation": "CN",
"id": "Q000151",
"name": "congenital"
}
],
"annotation": "do not coordinate with ACUTE DISEASE for \"acute infarct\"",
"broader_headings": [
{
"id": "D007238",
"name": "Infarction"
},
{
"id": "D017202",
"name": "Myocardial Ischemia"
}
],
"cas_name": null,
"consider_also": null,
"date_created": null,
"date_established": null,
"date_introduced": "1966-01-01",
"date_revised": null,
"entry_terms": [
"Cardiovascular Stroke",
"Heart Attack",
"Myocardial Infarct"
],
"found": true,
"history_note": "79; was MYOCARDIAL INFARCT 1963-78",
"id": "D009203",
"last_updated": "2019-07-01",
"mesh_year": "current",
"name": "Myocardial Infarction",
"nlm_classification_number": "WG 310",
"online_note": "use MYOCARDIAL INFARCTION to search MYOCARDIAL INFARCT 1966-78",
"pharmacological_actions": [],
"previous_indexing": [],
"public_mesh_note": "79; was MYOCARDIAL INFARCT 1963-78",
"registry_numbers": [],
"scope_note": "NECROSIS of the MYOCARDIUM caused by an obstruction of the blood supply to the heart (CORONARY CIRCULATION).",
"see_also": [
{
"id": "D006342",
"name": "Heart Rupture, Post-Infarction"
}
],
"summary": "Myocardial Infarction (D009203), topical heading at C14.280.647.500, C14.907.585.500, C23.550.513.355.750, C23.550.717.489.750",
"tree_numbers": [
"C14.280.647.500",
"C14.907.585.500",
"C23.550.513.355.750",
"C23.550.717.489.750"
],
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D009203"
}Get narrower headings
List the headings below a heading in the MeSH trees: the level just below, or every heading below it, which is what PubMed searches when it explodes a heading. Each comes with its tree numbers. Useful for expanding a search or a tag to more specific subjects.
Inputs
- Heading
headingtextRequired - The heading's MeSH ID, such as D009203, or its exact name. 'Search headings' finds either.
- Depth
depthtext - The level just below the heading, or every heading below it. Defaults to the level just below.One of:
children(Direct children only),all(All descendants). Default:children. - Most results
limitnumber - The most headings to return, 1 to 500. Defaults to 100.From 1 to 500. Default:
100. - Skip
offsetnumber - How many to skip, to page through a long list. Defaults to 0.From 0 to 100000.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many headings are in this page of the list.
depthtext- children for the level below, or all for every heading below.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
has_moretrue/false- True when there are more after these: raise Skip to see them.
idtext- The record's MeSH ID, such as D009203.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The heading's name.
narrowerlist- The headings below it, in alphabetical order.
narrower_idslist- Their IDs alone, in the same order.
offsetnumber- How many were skipped before these.
summarytext- One line saying what came back.
tree_numberslist- The heading's own tree numbers.
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"count": 5,
"depth": "all",
"found": true,
"has_more": true,
"id": "D017202",
"mesh_year": "current",
"name": "Myocardial Ischemia",
"narrower": [
{
"id": "D054058",
"name": "Acute Coronary Syndrome",
"tree_numbers": [
"C14.280.647.124",
"C14.907.585.124"
]
},
{
"id": "D000787",
"name": "Angina Pectoris",
"tree_numbers": [
"C14.280.647.187",
"C14.907.585.187"
]
},
{
"id": "D000788",
"name": "Angina Pectoris, Variant",
"tree_numbers": [
"C14.280.647.187.150.150",
"C14.907.585.187.150.500"
]
},
{
"id": "D060050",
"name": "Angina, Stable",
"tree_numbers": [
"C14.280.647.187.362",
"C14.907.585.187.362"
]
},
{
"id": "D000789",
"name": "Angina, Unstable",
"tree_numbers": [
"C14.280.647.187.150",
"C14.907.585.187.150"
]
}
],
"narrower_ids": [
"D054058",
"D000787",
"D000788",
"D060050",
"D000789"
],
"offset": 0,
"summary": "Myocardial Ischemia (D017202) has 5 headings below it on this page, and more after it",
"tree_numbers": [
"C14.280.647",
"C14.907.585"
],
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D017202"
}Get subheading
Get a MeSH subheading (qualifier) in full: its abbreviation, what it is used with (scope note), its place in the subheading tree, its other names, NLM's notes and dates.
Inputs
- Subheading
subheadingtextRequired - Pick a subheading, or type its ID (Q000009), name (adverse effects) or abbreviation (AE).
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
abbreviationtext- Its two-letter abbreviation, such as AE.
activetrue/false- False for a subheading NLM has retired.
annotationtext- NLM's notes to indexers on how to use it.
broader_subheadingslist- The subheadings directly above it.
date_createdtext- When the record was created, as YYYY-MM-DD, if NLM says.
date_establishedtext- When it was established, as YYYY-MM-DD, if NLM says.
date_introducedtext- When it entered MeSH, as YYYY-MM-DD.
date_revisedtext- When it was last revised, as YYYY-MM-DD, if NLM says.
entry_termslist- Its other names.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
history_notetext- How its use has changed over the years.
idtext- The subheading's MeSH ID, such as Q000009.
last_updatedtext- When NLM last updated it, as YYYY-MM-DD.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The subheading's name, such as adverse effects.
online_notetext- NLM's advice for searching with it.
scope_notetext- NLM's definition: what it is used with, and for.
summarytext- One line saying what came back.
tree_numberslist- Where it sits in the subheading tree, such as Y07.020.
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"abbreviation": "AE",
"active": true,
"annotation": "subheading only; see also /poisoning & /toxicity",
"broader_subheadings": [
{
"id": "Q000494",
"name": "pharmacology"
},
{
"id": "Q000627",
"name": "therapeutic use"
}
],
"date_created": null,
"date_established": null,
"date_introduced": "1966-01-01",
"date_revised": null,
"entry_terms": [
"side effects"
],
"found": true,
"history_note": "66; used with Category D, E & H 1966-69; D, E, H & J 1970-74; D, E, F4, H & J 1975-81; D, E, F4, G3, H & J 1982-87; D, E, F4, H, J, & SMOKING 1988; D, E, F4, H, J, & 1982-87; D, E, F4, H, J & SMOKING 1988; D, E, F4, H, J & SMOKING+ 1989; D, E & J 1990 forward",
"id": "Q000009",
"last_updated": "2017-07-05",
"mesh_year": "current",
"name": "adverse effects",
"online_note": "search policy: Online Manual; use: main heading/AE or AE (SH) or SUBS APPLY AE",
"scope_note": "Used with drugs, chemicals, or biological agents in accepted dosage - or with physical agents or manufactured products in normal usage - when intended for diagnostic, therapeutic, prophylactic, or anesthetic purposes. It is used also for adverse effects or complications of diagnostic, therapeutic, prophylactic, anesthetic, surgical, or other procedures.",
"summary": "adverse effects (Q000009, AE)",
"tree_numbers": [
"Y07.020",
"Y10.020"
],
"url": "https://meshb.nlm.nih.gov/record/ui?ui=Q000009"
}Get supplementary concept
Get a MeSH supplementary concept record (a chemical, drug, rare disease or organism) in full: the headings it maps to, which are how PubMed indexes it, its pharmacological actions, synonyms, registry numbers, how many PubMed articles carry it, NLM's note and dates. A record MeSH doesn't have comes back with found false.
Inputs
- Supplementary concept
concepttextRequired - The record's MeSH ID, such as C000718217, or its exact name. 'Search supplementary concepts' finds either.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
activetrue/false- False for a record NLM has retired.
date_createdtext- When the record was created, as YYYY-MM-DD, if NLM says.
date_establishedtext- When it was established, as YYYY-MM-DD, if NLM says.
date_introducedtext- When it entered MeSH, as YYYY-MM-DD.
date_revisedtext- When it was last revised, as YYYY-MM-DD, if NLM says.
entry_termslist- Its synonyms and other names, such as codes and brand names.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
frequencynumber- How many PubMed articles are indexed with it.
idtext- The record's MeSH ID, such as C000718217.
indexer_consider_alsolist- Headings NLM suggests indexers also consider.
last_updatedtext- When NLM last updated it, as YYYY-MM-DD.
mapped_heading_idslist- The IDs of those headings alone, each once.
mapped_tolist- The headings PubMed adds to an article indexed with this record: the way to search for it with headings.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The record's name, such as nirmatrelvir.
notetext- NLM's note on the record.
pharmacological_actionslist- For a chemical, what it does, as headings.
previous_indexinglist- How PubMed indexed it before, with years.
registry_numberslist- Its CAS, UNII or EC numbers, when NLM has them.
sourceslist- The article in which NLM first found it.
summarytext- One line saying what came back.
typetext- Chemical, Disease, Organism, Population, Protocol or Anatomy.
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"active": true,
"date_created": null,
"date_established": null,
"date_introduced": "2021-07-19",
"date_revised": null,
"entry_terms": [
"(1R,2S,5S)-N-((1S)-1-cyano-2-((3S)-2-oxopyrrolidin-3-yl)ethyl)-6,6-dimethyl-3-(3-methyl-N-(trifluoroacetyl)-l-valyl)-3-azabicyclo(3.1.0)hexane-2-carboxamide",
"PF-07321332",
"PF07321332"
],
"found": true,
"frequency": 41,
"id": "C000718217",
"indexer_consider_also": [],
"last_updated": "2022-01-06",
"mapped_heading_ids": [
"D007769",
"D007930",
"D009570",
"D011392"
],
"mapped_to": [
{
"id": "D007769",
"name": "Lactams",
"preferred": true
},
{
"id": "D007930",
"name": "Leucine",
"preferred": true
},
{
"id": "D009570",
"name": "Nitriles",
"preferred": true
},
{
"id": "D011392",
"name": "Proline",
"preferred": true
}
],
"mesh_year": "current",
"name": "nirmatrelvir",
"note": "component of COVID-19 drug Paxlovid",
"pharmacological_actions": [
{
"id": "D000084762",
"name": "Viral Protease Inhibitors"
}
],
"previous_indexing": [],
"registry_numbers": [],
"sources": [
"Curr Opin Virol. 2021 Apr 27;49:36-40."
],
"summary": "nirmatrelvir (C000718217), chemical, maps to Lactams; Leucine; Nitriles; Proline",
"type": "Chemical",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C000718217"
}List allowed subheadings
List the subheadings (qualifiers, such as adverse effects or drug therapy) MeSH allows with a heading, with their IDs and two-letter abbreviations.
Inputs
- Heading
headingtextRequired - The heading's MeSH ID, such as D009203, or its exact name. 'Search headings' finds either.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many subheadings it allows.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
idtext- The record's MeSH ID, such as D009203.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The heading's name.
subheading_nameslist- Their names alone, in the same order.
subheadingslist- The subheadings MeSH allows with the heading, by name.
summarytext- One line saying what came back.
Example output
{
"count": 25,
"found": true,
"id": "D015242",
"mesh_year": "current",
"name": "Ofloxacin",
"subheading_names": [
"administration & dosage",
"adverse effects",
"agonists",
"analogs & derivatives",
"analysis",
"antagonists & inhibitors"
],
"subheadings": [
{
"abbreviation": "AD",
"id": "Q000008",
"name": "administration & dosage"
},
{
"abbreviation": "AE",
"id": "Q000009",
"name": "adverse effects"
},
{
"abbreviation": "AG",
"id": "Q000819",
"name": "agonists"
},
{
"abbreviation": "AA",
"id": "Q000031",
"name": "analogs & derivatives"
},
{
"abbreviation": "AN",
"id": "Q000032",
"name": "analysis"
},
{
"abbreviation": "AI",
"id": "Q000037",
"name": "antagonists & inhibitors"
}
],
"summary": "Ofloxacin (D015242) takes 25 subheadings"
}List pharmacological actions
List what a drug or chemical does, as MeSH pharmacological actions: Ofloxacin is an Anti-Bacterial Agent and a Topoisomerase II Inhibitor, among others. Takes a heading or a supplementary concept.
Inputs
- Substance
substancetextRequired - The drug or chemical: a heading's ID (D015242), a supplementary concept's ID (C000718217), or either's exact name.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
action_idslist- Their IDs alone, in the same order.
countnumber- How many pharmacological actions it has.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
idtext- The record's MeSH ID, such as D009203.
kindtext- heading or supplementary_concept.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- The substance's name.
pharmacological_actionslist- What the substance does, as headings, in alphabetical order.
summarytext- One line saying what came back.
typetext- Its type in words: Topical heading, Geographic heading, Publication type, Check tag, Subheading, or a supplementary concept's type (Chemical, Disease, Organism, Population, Protocol, Anatomy).
Example output
{
"action_ids": [
"D000900",
"D000892",
"D065609",
"D059005"
],
"count": 4,
"found": true,
"id": "D015242",
"kind": "heading",
"mesh_year": "current",
"name": "Ofloxacin",
"pharmacological_actions": [
{
"id": "D000900",
"name": "Anti-Bacterial Agents"
},
{
"id": "D000892",
"name": "Anti-Infective Agents, Urinary"
},
{
"id": "D065609",
"name": "Cytochrome P-450 CYP1A2 Inhibitors"
},
{
"id": "D059005",
"name": "Topoisomerase II Inhibitors"
}
],
"summary": "Ofloxacin (D015242) has 4 pharmacological actions",
"type": "Topical heading"
}List substances with an action
List the drugs and chemicals MeSH files under a pharmacological action, such as every Anti-Bacterial Agent: headings, supplementary concepts, or both. Retired records are left out.
Inputs
- Pharmacological action
pharmacological_actiontextRequired - The action's heading ID, such as D000900, or its exact name, such as Anti-Bacterial Agents.
- Include
includetext - Which substances to list. Defaults to headings and supplementary concepts.One of:
all(Headings and supplementary concepts),headings(Headings only),supplementary_concepts(Supplementary concepts only). Default:all. - Most results
limitnumber - The most substances to return, 1 to 500. Defaults to 100.From 1 to 500. Default:
100. - Skip
offsetnumber - How many to skip, to page through a long list. Defaults to 0.From 0 to 100000.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many substances are in this page of the list.
foundtrue/false- True when MeSH has the record. False means it has none by that ID or name in the MeSH year read, and the other fields are empty.
has_moretrue/false- True when there are more after these: raise Skip to see them.
idtext- The pharmacological action's MeSH ID, such as D000900.
includetext- all, headings or supplementary_concepts.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- Its name, such as Anti-Bacterial Agents.
offsetnumber- How many were skipped before these.
substance_idslist- Their IDs alone, in the same order.
substanceslist- The substances, in alphabetical order.
summarytext- One line saying what came back.
Example output
{
"count": 5,
"found": true,
"has_more": true,
"id": "D000900",
"include": "headings",
"mesh_year": "current",
"name": "Anti-Bacterial Agents",
"offset": 0,
"substance_ids": [
"D019342",
"D000408",
"D000560",
"D000561",
"D000583"
],
"substances": [
{
"id": "D019342",
"kind": "heading",
"name": "Acetic Acid",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D019342"
},
{
"id": "D000408",
"kind": "heading",
"name": "Alamethicin",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D000408"
},
{
"id": "D000560",
"kind": "heading",
"name": "Amdinocillin",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D000560"
},
{
"id": "D000561",
"kind": "heading",
"name": "Amdinocillin Pivoxil",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D000561"
},
{
"id": "D000583",
"kind": "heading",
"name": "Amikacin",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D000583"
}
],
"summary": "5 substances filed under Anti-Bacterial Agents (D000900) on this page, and more after it"
}Look up MeSH IDs
Name up to 100 MeSH IDs at once, of any kind: headings (D...), subheadings (Q...), supplementary concepts (C...), heading/subheading pairs, concepts and terms. Each comes back with its name and type, or marked not found rather than failing the step.
Inputs
- IDs
idslistRequired - The MeSH IDs, as a list from an earlier step or typed with commas, spaces or new lines between them.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many IDs were looked up.
found_countnumber- How many of them MeSH has.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
not_foundlist- The IDs MeSH has no record for.
recordslist- Every ID, in the order given, with what it names.
summarytext- One line saying what came back.
Example output
{
"count": 6,
"found_count": 5,
"mesh_year": "current",
"not_found": [
"D999999"
],
"records": [
{
"active": true,
"found": true,
"id": "D009203",
"kind": "heading",
"name": "Myocardial Infarction",
"type": "Topical heading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D009203"
},
{
"active": true,
"found": true,
"id": "Q000009",
"kind": "subheading",
"name": "adverse effects",
"type": "Subheading",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=Q000009"
},
{
"active": true,
"found": true,
"id": "C000718217",
"kind": "supplementary_concept",
"name": "nirmatrelvir",
"type": "Chemical",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C000718217"
},
{
"active": true,
"found": true,
"id": "D015242Q000009",
"kind": "pair",
"name": "Ofloxacin/adverse effects",
"type": "Allowed heading/subheading pair",
"url": null
},
{
"active": true,
"found": true,
"id": "T000866941",
"kind": "term",
"name": "Heart Attack",
"type": "Term",
"url": null
},
{
"active": null,
"found": false,
"id": "D999999",
"kind": null,
"name": null,
"type": null,
"url": null
}
],
"summary": "Named 5 of 6 IDs; the current MeSH has no D999999"
}Look up tree number
Find the heading at a MeSH tree number, such as C14.280.647, with the heading one level up and every heading one level down. Give a tree's letter, such as C for Diseases, to list the headings at the top of that tree.
Inputs
- Tree number
tree_numbertextRequired - A tree number such as C14.280.647, or a tree's letter: A Anatomy, B Organisms, C Diseases, D Chemicals and Drugs, E Techniques and Equipment, F Psychiatry and Psychology, G Phenomena and Processes, and so on to Z Geographicals.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
categorytext- The tree's letter, such as C.
category_nametext- The tree's name, such as Diseases.
child_countnumber- How many records sit one level below.
child_idslist- Their IDs alone, each once.
childrenlist- The records one level below, in tree number order; for a letter, the headings at the top of that tree.
foundtrue/false- True when MeSH has the tree number (or, for a letter, the tree). False means it has none, and the other fields are empty.
idtext- The ID of the heading (or subheading) at that place; empty for a letter.
kindtext- heading or subheading.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
nametext- Its name.
parent_idtext- The ID of the record one level up.
parent_nametext- The name of the record one level up.
parent_tree_numbertext- The tree number one level up; empty at the top.
summarytext- One line saying what came back.
tree_numbertext- The tree number or letter looked up.
urltext- The record's page in NLM's MeSH Browser.
Example output
{
"category": "C",
"category_name": "Diseases",
"child_count": 6,
"child_ids": [
"D054058",
"D000787",
"D003327",
"D000074962",
"D009203",
"D015428"
],
"children": [
{
"id": "D054058",
"name": "Acute Coronary Syndrome",
"tree_number": "C14.280.647.124"
},
{
"id": "D000787",
"name": "Angina Pectoris",
"tree_number": "C14.280.647.187"
},
{
"id": "D003327",
"name": "Coronary Disease",
"tree_number": "C14.280.647.250"
},
{
"id": "D000074962",
"name": "Kounis Syndrome",
"tree_number": "C14.280.647.375"
},
{
"id": "D009203",
"name": "Myocardial Infarction",
"tree_number": "C14.280.647.500"
},
{
"id": "D015428",
"name": "Myocardial Reperfusion Injury",
"tree_number": "C14.280.647.625"
}
],
"found": true,
"id": "D017202",
"kind": "heading",
"mesh_year": "current",
"name": "Myocardial Ischemia",
"parent_id": "D006331",
"parent_name": "Heart Diseases",
"parent_tree_number": "C14.280",
"summary": "C14.280.647 is Myocardial Ischemia (D017202), with 6 children",
"tree_number": "C14.280.647",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D017202"
}Search entry terms
Find MeSH entry terms (the synonyms, spellings, brand names and codes that lead to a heading) by text, and the heading, subheading or supplementary concept each one names: 'heart attack' leads to Myocardial Infarction, 'paracetamol' to Acetaminophen. Use it to map free text to official headings.
Inputs
- Text
texttextRequired - The words to look for in entry terms, in any letter case.
- Match
matchtext - How a term must match the text. Defaults to exact name.One of:
exact(Exact name),contains(Contains the text),startswith(Starts with the text). Default:exact. - Most results
limitnumber - The most terms to return, 1 to 50. Defaults to 10.From 1 to 50. Default:
10.
Outputs
countnumber- How many terms were found.
heading_idslist- The IDs of the headings the terms name, each once.
summarytext- One line saying what came back.
termslist- The terms found, in the order NLM lists them.
Example output
{
"count": 5,
"heading_ids": [
"D000082"
],
"summary": "5 terms matching 'paracetamol'O-isopropyl acetaminophen; O-propyl acetaminophen; Acetaminophen; acetaminophen, butalbital, caffeine drug combination",
"terms": [
{
"is_preferred": true,
"record_id": "C063450",
"record_kind": "supplementary_concept",
"record_name": "3-(cystein-S-yl)paracetamol",
"record_type": "Chemical",
"term": "3-(cystein-S-yl)paracetamol",
"term_id": "T205149",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C063450"
},
{
"is_preferred": false,
"record_id": "C067793",
"record_kind": "supplementary_concept",
"record_name": "O-isopropyl acetaminophen",
"record_type": "Chemical",
"term": "O-isopropyl paracetamol",
"term_id": "T215716",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C067793"
},
{
"is_preferred": false,
"record_id": "C067792",
"record_kind": "supplementary_concept",
"record_name": "O-propyl acetaminophen",
"record_type": "Chemical",
"term": "O-propyl paracetamol",
"term_id": "T215714",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C067792"
},
{
"is_preferred": false,
"record_id": "D000082",
"record_kind": "heading",
"record_name": "Acetaminophen",
"record_type": "Topical heading",
"term": "Paracetamol",
"term_id": "T000219",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D000082"
},
{
"is_preferred": false,
"record_id": "C056076",
"record_kind": "supplementary_concept",
"record_name": "acetaminophen, butalbital, caffeine drug combination",
"record_type": "Chemical",
"term": "acetaminophen - caffeine - paracetamol",
"term_id": "T773555",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C056076"
}
]
}Search headings
Find MeSH headings (descriptors, the subjects PubMed indexes articles under) by name: exactly, containing some text, or starting with it, in any letter case. Each comes back with its ID and MeSH Browser link. To find a heading from a synonym, use 'Search entry terms'.
Inputs
- Name
nametextRequired - The text to look for in heading names.
- Match
matchtext - How a heading's name must match the text. Defaults to exact name.One of:
exact(Exact name),contains(Contains the text),startswith(Starts with the text). Default:exact. - Most results
limitnumber - The most headings to return, 1 to 50. Defaults to 10.From 1 to 50. Default:
10. - MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many headings were found.
headingslist- The headings found, in the order NLM lists them.
idslist- The headings' IDs alone, to pass to another step.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
summarytext- One line saying what came back.
Example output
{
"count": 5,
"headings": [
{
"id": "D006321",
"name": "Heart",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D006321"
},
{
"id": "D006322",
"name": "Heart Aneurysm",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D006322"
},
{
"id": "D006323",
"name": "Heart Arrest",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D006323"
},
{
"id": "D006324",
"name": "Heart Arrest, Induced",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D006324"
},
{
"id": "D006325",
"name": "Heart Atria",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=D006325"
}
],
"ids": [
"D006321",
"D006322",
"D006323",
"D006324",
"D006325"
],
"mesh_year": "current",
"summary": "5 headings starting with 'heart' in the current MeSH"
}Search supplementary concepts
Find MeSH supplementary concept records by name: the chemicals, drugs, rare diseases, organisms, population groups and drug protocols MeSH records outside its headings. Closest (shortest) names come first; pick a type to narrow the search.
Inputs
- Name
nametextRequired - The text to look for in record names, in any letter case.
- Match
matchtext - How a record's name must match the text. Defaults to contains the text.One of:
exact(Exact name),contains(Contains the text),startswith(Starts with the text). Default:contains. - Type
concept_typetext - Only records of this type. Defaults to any type.One of:
any(Any type),chemical(Chemicals and drugs),disease(Diseases (mostly rare diseases)),organism(Organisms),population(Population groups),protocol(Protocols (drug regimens)),anatomy. Default:any. - Most results
limitnumber - The most records to return, 1 to 100. Defaults to 20.From 1 to 100. Default:
20. - Skip
offsetnumber - How many to skip, to page through a long list. Defaults to 0.From 0 to 100000.
- MeSH year
yeartext - Which year's MeSH to read. Current by default; pick an earlier year to match work indexed with it.Default:
current.
Outputs
countnumber- How many records are in this page of the list.
has_moretrue/false- True when there are more after these: raise Skip to see them.
idslist- Their IDs alone, in the same order.
mesh_yeartext- The MeSH read: 'current', or a year such as '2025'.
offsetnumber- How many were skipped before these.
summarytext- One line saying what came back.
supplementary_conceptslist- The records found, shortest (closest) names first.
Example output
{
"count": 5,
"has_more": true,
"ids": [
"C536136",
"C536848",
"C562378",
"C537071",
"C580012"
],
"mesh_year": "current",
"offset": 0,
"summary": "5 supplementary concepts matching 'fibrosis' on this page, and more after it",
"supplementary_concepts": [
{
"id": "C536136",
"name": "Mediastinal Fibrosis",
"type": "Disease",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C536136"
},
{
"id": "C536848",
"name": "Familial myelofibrosis",
"type": "Disease",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C536848"
},
{
"id": "C562378",
"name": "Hepatic Fibrosis, Congenital",
"type": "Disease",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C562378"
},
{
"id": "C537071",
"name": "Follicular hamartoma alopecia cystic fibrosis",
"type": "Disease",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C537071"
},
{
"id": "C580012",
"name": "congenital fibrosis of the extraocular muscles",
"type": "Disease",
"url": "https://meshb.nlm.nih.gov/record/ui?ui=C580012"
}
]
}