COVID-19 is an emerging, rapidly evolving situation.
Get the latest public health information from CDC: https://www.coronavirus.gov.

Get the latest research information from NIH: https://www.nih.gov/coronavirus.
Search Operators (BETA)
If you are looking for information about clinical studies, please visit ClinicalTrials.gov.

Search Operators

A search expression consists of a sequence of terms and operators. Search terms are words or phrases that must appear as values in the study records returned by the search. Search operators affect which studies are returned and their rank order in retrieval sets by changing how the search terms are contextualized or interpreted. In general, operator precedence (from highest to lowest) is as follows: search terms and source operators, the NOT operator and context operators, the AND operator, and the OR operator.

The following operator types are described in the sections below:

Boolean Operators

Boolean operators connect search terms and define their logical relationship.

Boolean Operators
Operator Example Description
OR youth OR teen A binary operator used to retrieve study records containing either the left or right subexpression, or both. The weighted score for determining rank order in retrieval sets will be higher when both the left and right subexpressions are present in a study record.
AND heart AND attack A binary operator used to retrieve study records containing both the left and right subexpressions.
NOT bethesda NOT maryland A unary operator that acts only on the right subexpression. It is used to retrieve study records that do not contain the right subexpression.

Grouping Operators

Grouping operators group search terms or operators in a query.

Grouping Operators
Operator Example Description
" " "back pain" Forces a sequence of words to be treated as a phrase.
() (acetaminophen OR aspirin) AND NOT (heart failure OR heart attack) Used to increase operator precedence in a search expression.

Context Operators

Context operators, which control how search terms are evaluated, are immediately followed by parameters in square brackets without any spaces. All context operators have the same precedence as the NOT operator and apply to the subexpression on their right, which immediately follows the right square bracket without a space in between.

Context Operators
Operator Example Description Default Setting
COVERAGE COVERAGE[FullMatch]pain Declares the degree to which a search term needs to match the text in an API field. There are four choices:
  • FullMatch—The search term must match all of the text in the field searched.
  • StartsWith—The search term must match the beginning of the text in the field searched.
  • EndsWith—The search term must match the end of the text in the field searched.
  • Contains—The search term must match part of the text in the field searched.
Defaults to Contains when the search expression does not include a COVERAGE operator.
EXPANSION * EXPANSION[None]SLE Declares the degree to which a search term may be expanded. There are five choices:
  • None—The term is searched for exactly as is. Case and accent marks are significant, but consecutive spaces are treated as a single space.
  • Term—Similar to None but includes simple lexical variants such as plurals, possessives, alternate spellings, and compound words; ignores case, hyphens, and accent marks.
  • Concept—Similar to Term but includes synonyms based on the Unified Medical Language System (UMLS). Also has a slight scoring penalty, ranking any records that include the search terms higher than records that include only synonyms.
  • Relaxation—Similar to Concept. Relaxes adjacency requirements so that partial terms are matches (e.g., a search for heart disease will return records with heart in one place and disease in another, as in the phrase "heart and lung disease"). Also has a significant scoring penalty, ranking any records that include the full search terms higher than records that include only partial terms.
  • Lossy—Similar to Relaxation but allows for missing partial terms (e.g., a search for heart disease will return records with heart but not disease and records with disease but not heart).
Defaults to Relaxation when the search expression does not include an EXPANSION operator.
AREA AREA[InterventionName]aspirin Declares which search area should be searched. Search areas are defined on the ClinicalTrials.gov Search Areas page. In addition to specifying search areas, it is possible to specify a field from the study structure. Any field from the study structure is searchable.
SEARCH ** heart attack AND SEARCH[Location](AREA[LocationCity]Portland AND AREA[LocationState]Maine) Declares which subsection of the study structure should be searched. For example, this operator can be used to search for a city and state within the same location (e.g. Portland, Maine), and exclude cities and states outside of that location (e.g. Portland, Oregon, and Augusta, Maine).

* The EXPANSION operator interacts with other operators as follows:

  • Enclosing a sequence of words in quotation marks forces those words to be treated as a phrase and gives the phrase higher precedence than EXPANSION. As such, a quoted phrase following EXPANSION[Relaxation] or EXPANSION[Lossy] is effectively the same as EXPANSION[Concept].
  • COVERAGE[FullMatch], COVERAGE[StartsWith], and COVERAGE[EndsWith] can be used only with EXPANSION[Concept], EXPANSION[Term], or EXPANSION[None].

** The SEARCH operator restricts search expressions to fields within a data element so that multiple pieces from that data element can be found together. For instance, the Location data element includes LocationCity, LocationState, LocationCountry, and LocationStatus. The SEARCH[Location] operator limits the search to the Location data element.

The following example uses the SEARCH[Location] operator to find site facility locations in the United States that are also recruiting participants:

heart attack AND SEARCH[Location](AREA[LocationCountry]United States AND AREA[LocationStatus]Recruiting)

In contrast, the following search expression, which does not use SEARCH[Location], would also return studies listing facility locations in the United States that are not recruiting and facility locations not in the United States that are recruiting:

heart attack AND AREA[LocationCountry]United States AND AREA[LocationStatus]Recruiting

Source Operators

Source operators find studies, similar to search terms. All source operators have the same precedence as a search term.

Source Operators
Operator Example Description
MISSING AREA[ResultsFirstPostDate]MISSING Finds study records that have no values in the search area specified as a parameter.
RANGE AREA[ResultsFirstPostDate]RANGE[01/01/2015, MAX] Finds study records in the search area that have a value greater than or equal to the first parameter (e.g., 01/01/2015) and less than or equal to the second parameter (e.g. MAX) in the search area. Each search area (e.g., ResultsFirstPostedDate) has a specified ordering, as follows:
  • Text fields—Most are ordered alphabetically.
  • Fields containing numbers and dates—Ordered in ascending sequence.
  • Age fields—Special ordering to accommodate units and to treat 1 year as greater than 6 months.
Special RANGE operator values:
  • MIN—Use to indicate the smallest value of interest in the current search area.
  • MAX—Use to indicate the largest value of interest in the current search area.

Note: The RANGE operator will not retrieve study records with no values in the search area.

ALL ALL Retrieves all study records in the database.

Scoring Operators

Scoring operators are used to adjust the rank order of search results by recency of dates or size of values.

Scoring Operators
Operator Example Description
TILT TILT[StudyFirstPostDate]"heart attack" Biases the scoring and rank ordering of study records in favor of the subexpression to the right by imposing a scoring penalty based on the ordering of API field values for the search area provided as a parameter (e.g., StudyFirstPostDate), with higher-ordered values having a lower penalty (e.g., more recent dates) than lower-ordered values (e.g., earlier dates). Use the TILT operator with API fields that are ordered, such as date fields.
This page last reviewed in June 2019