APIs

RxNorm API

findRxcuiByString

Information returned
Concepts with a specified name
Service domain
https://rxnav.nlm.nih.gov
HTTP request
GET  /REST/rxcui.xml?name=yourName&allsrc=0or1&srclist=yourSources&search=0or1or2

Description

Searches for a name (from any vocabulary in RxNorm) and returns the RxCUIs associated with the name.

The scope of the search is either Active concepts (allsrc=0) or Current concepts (allsrc=1). When the scope is Current concepts, only concepts that have at least one atom from a source in the srclist parameter are returned.

The precision of the search is adjustable with the search parameter. An exact search ignores only upper/lowercase. A normalized search is less strict. A combination search tries an exact search, then a normalized search if nothing was found.

Normalized matching broadens the recall of the exact match by eliminating sources of discrepancies that are usually not meaningful in drug names:

  • Word order

  • Case sensitivity

  • Punctuation

  • Suffixes that might be English inflections

  • Abbreviations, e.g., "hctz" is expanded to "hydrochlorothiazide"

  • Salts forms, e.g. "morphine sulfate" becomes "morphine"

Scope

Selectable (see parameters):

  • Active: concepts in the current RxNorm data set that have an atom with SAB=RXNORM and SUPPRESS=N

  • Current: concepts in the current RxNorm data set that have an atom with SUPPRESS=N

Parameters

ParameterLocationUseDescriptionDefault
formatPathOptional

Notation for results

One of:
.xml
Get results in XML
.json
Get results in JSON
.xml
nameQueryRequiredName of concept to find
allsrcQueryOptionalScope of search
One of:
0
Active concepts
1
Current concepts
0
srclistQueryOptionalSource vocabularies to search (if allsrc=1)

(Space-separated list. See getSourceTypes for the menu.)

ALL
searchQueryOptionalPrecision
One of:
0
Exact match only
1
Normalized match
2
Best match (exact or normalized)
0

All query parameters are case-insensitive.

Note that HTTP requires that query parameters be "URL encoded". For instance, a "space-separated list" will, in practice, usually appear to use either a plus sign (+) or %20 as the separator. For full information on URL encoding, please refer to IETF RFC 3986, "Uniform Resource Identifier".

Output structure

Results are available as either XML or JSON.

  • The XML result has the root element rxnormdata. It is described in the XML Schema for the RxNorm API; the relevant element structure is summarized below. Elements that would be empty might be left out.

  • The JSON result is an object {...}, analogous to the content of the XML rxnormdata. Fields that might occur multiple times in the XML are expressed as an array. Fields that would be empty might be null or left out. Numbers are expressed as strings.

Both XML and JSON results follow the same outline:

rxnormdata
Root element in XML, or anonymous object in JSON
idGroup
rxnormId (array)
A concept associated with the requested ID

Example: Exact search does not find any concept with precisely this string

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Lipitor+10+mg+Tab&search=0

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Lipitor+10+mg+Tab&search=0

An XML result is shown below.

<rxnormdata>
    <idGroup/>
</rxnormdata>

Example: Normalized search finds a concept with a string similar to the specified one

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Lipitor+10+mg+Tab&search=1

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Lipitor+10+mg+Tab&search=1

An XML result is shown below.

<rxnormdata>
    <idGroup>
        <rxnormId>617314</rxnormId>
    </idGroup>
</rxnormdata>

Example: Current-scope search finds a concept with a string from MTHSPL

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1

All sources are searched, the string from MTHSPL is found, and the corresponding rxnormId is returned.

An XML result is shown below.

<rxnormdata>
    <idGroup>
        <rxnormId>197795</rxnormId>
    </idGroup>
</rxnormdata>

Example: srclist limits Current-scope search

XML: https://rxnav.nlm.nih.gov/REST/rxcui?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1&srclist=ATC

JSON: https://rxnav.nlm.nih.gov/REST/rxcui.json?name=Hydroquinone+40+mg+in+1+g+TOPICAL+CREAM+%5BHydroquinone+4%25%5D&allsrc=1&srclist=ATC

Only ATC is searched, and the string is not found; no rxnormId is returned.

An XML result is shown below.

<rxnormdata>
    <idGroup/>
</rxnormdata>