PubMed searches on Nested Knowledge source information from the National Library of Medicine.
This doc describes how to use Boolean search to retrieve records from PubMed via Application Program Interface (API). For advice on getting started, see also our blog on constructing a query from the start!
Boolean Operators can be used to specify the structure of your search.
When entering your search terms of interest, use:
to narrow in on publications of interest. For example,
stroke AND (trevo OR solitaire) AND “modified Rankin Scale”
will retrieve all PubMed-indexed publications that contain all of the following in all PubMed fields including title, abstract, or keywords:
Note: Asterisks are also Boolean operators and can be used for truncation,
If you want to specify how a term will be interpreted by PubMed, specify the field in the following manner: term[FIELD]
, using one of PubMed's pre-specified fields (or filters), which will narrow how that specific term is interpreted.
Fields and filters generally follow the structure of term[FIELD]
, but if the field is incorrectly spelled or not recognized, it will be ignored by PubMed and the term will be searched as plain text.
PubMed indexes articles using theMeSH controlled vocabulary, which means that you can add this field to search for MeSH topics so long as your term of interest is in the MeSH hierarchy.
So, a search for stroke[MESH MAJOR TOPIC]
will return only studies tagged with Major Topics at or under “stroke” in the MeSH hierarchy, while a search for stroke[MESH]
will return any study tagged at or below “stroke” in the hierarchy.
Note: Use of field tags turns off Automatic Term Mapping (ATM).
PubMed enables you to specify whether one of your terms of interest is one of the following:
name[AUTHOR]
;name[JOURNAL]
;name[PUBLISHER]
number[VOLUME]
number[ISSUE]
.PubMed enables searches to be narrowed by the following study characteristics:
review[PT]
;full text[SB]
;(YYYY-MM-DD[Date - Publication] : YYYY-MM-DD[Date - Publication])
;language[LANGUAGE]
;
For Publication Date limits, only the Year is required for the filter to function, and PubMed uses the year “3000” to represent all publications through to the present. So, for example, to search for all studies published from January 1st, 2015 to Present, you can use the simplified (2015[Date - Publication] : 3000[Date - Publication]
and even the highly simplified (2015:3000[pdat])
You can also narrow the section of the publication in question that your term will be searched within by specifying:
term[TITLE]
term[TITLE/ABSTRACT]
term[TEXT WORD]
Note: Text Words includes all words and numbers in the title, abstract, other abstract, MeSH terms, MeSH Subheadings, Publication Types, Substance Names, Personal Name as Subject, Corporate Author, Secondary Source, Comment/Correction Notes, and Other Terms (see Other Term [OT] above) typically non-MeSH subject terms (keywords), including NASA Space Flight Mission, assigned by an organization other than NLM. Learn more here.
While it is possible to simply enter your terms of interest, the following guidance (as well as this more in-depth search guide) helps narrow your search with the goal of finding as many relevant/includable records as possible, while returning as few irrelevant records as possible.
If you are searching for clinical studies and are seeking a framework for building out your search, you may consider using PICO to organize your Patients, Interventions/Comparators, and Outcomes.
When you search on PubMed, it will search not only for your term of interest but also use Automatic Term Mapping (ATM) to find records with related terms. Specifically, ATM matches each individual term in your search against:
In effect, ATM expands your search's coverage to ensure that synonyms and close-matches are not thrown out. To see how ATM has expanded your search, you can view the Search History on the Literature Search page.
If your search was too narrow (and did not return the records you want to include), consider:
If your search was too broad (and returned more records than you want to screen, with a low 'hit rate'), consider:
See also our guidance on search size.
All data returned from PubMed searches on Nested Knowledge are sourced from the National Library of Medicine (NLM). The NLM assumes no responsibility or liability associated with use of copyrighted material, including transmitting, reproducing, redistributing, or making commercial use of the data. For full details, see the NLM's Copyright Statement.
Users of PubMed, including users of Nested Knowledge accessing PubMed via API, must comply with any relevant NLM policies, including attributing search results to PubMed or the National Library of Medicine, or otherwise acknowledge NLM as the source of the data in a clear and conspicuous manner. For details on use of data from PubMed, see the NLM's "Downloading NLM Data" guidance.
Nested Knowledge assumes no responsibility or liability associated with users' use of copyrighted material, including transmitting, reproducing, redistributing, or making commercial use of the data, and subject to Nested Knowledge's Copyright Policy, Nested Knowledge may remove materials from users' projects.