Sign up

Searching PubMed

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!

Entering a Boolean Query #

Boolean Operators can be used to specify the structure of your search.

Basic Boolean Operators #

When entering your search terms of interest, use:

  • AND/OR/NOT to separate terms,
  • quotation marks to search for an exact term (which also turns off Automatic Term Mapping), and
  • parenthesis to dictate groupings and priority order

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:

  • The word stroke or similar terms to stroke (using Automatic Term Mapping [ATM])
  • The word trevo or the word solitaire and associated ATM
  • The exact phrase “modified Rankin Scale.”

Note: Asterisks are also Boolean operators and can be used for truncation,

Using Search Fields and Filters #

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.

MeSH Fields

PubMed indexes articles using the MeSH 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.

  • [mh] / [MESH] / [MESH TERMS]: Searches throughout the MeSH hierarchy.
  • [MESH MAJOR TOPIC]: Searches only for MeSH “Major Topics” (which are indicated in the MeSH hierarchy by asterisks).
  • [MESH SUBHEADING]: Searches specific aspects or qualifiers of the MeSH heading. Learn more here.

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).

Field-limited Search Terms (Author, Journal, etc.)

PubMed enables you to specify whether one of your terms of interest is one of the following:

  • Author, by searching name[AUTHOR];
  • Journal, by searching name[JOURNAL];
  • Publisher, by searching name[PUBLISHER]
  • Volume, by searching number[VOLUME]
  • Issue, by searching number[ISSUE].

Filter by Study Traits

PubMed enables searches to be narrowed by the following study characteristics:

  • Publication type, by searching for one of PubMed’s supported publication types using, for example, review[PT];
  • Full Text available, by appending full text[SB];
  • Publication date, by searching for (YYYY-MM-DD[Date - Publication] : YYYY-MM-DD[Date - Publication]);
  • Language, by searching for the language[LANGUAGE];
  • And others (see full list here)

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])

Filter by Study Contents

You can also narrow the section of the publication in question that your term will be searched within by specifying:

  • Title only, term[TITLE]
  • Title or Abstract (TIAB), term[TITLE/ABSTRACT]
  • Text only, 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.

Guidance on Search Creation #

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.

PICO Framework #

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.

Automatic Term Mapping #

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:

  • A Subject translation table (including MeSH (Medical Subject Headings)),
  • A Journals translation table,
  • The Author index, and
  • An Investigator (Collaborator) index.

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.

Expanding or Narrowing? #

If your search was too narrow (and did not return the records you want to include), consider:

  • Adding new terms or synonyms with “OR”
  • Removing extraneous and highly specific terms
  • Removing quotation marks.

If your search was too broad (and returned more records than you want to screen, with a low ‘hit rate’), consider:

  • Removing general terms in favor of more specific ones,
  • Appending more “AND”- phrases, including filters for both concepts of interest and traits like study type or date
  • Adding quotation marks, where appropriate.

See also our guidance on search size.

Source of Data for PubMed Searches; Copyright #

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.

Updated on October 25, 2024
Did this article help?

Have a question?

Send us an email and we’ll get back to you as quickly as we can!